Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Thursday, March 7, 2024

Rust pop-quiz: table totals

#Rust pop-quiz

Let's just say, for some reason, that I post data tables with an eye toward summation. You know: just because (it how I be).




From rows of data, sum the last column and conclude the table with a total:-row

Bonus: total on any given columns, c.

hint: column-view?

Rust pop-quiz answer: tabla

In answer to the Rust pop-quiz about HTML-formatting data tables, ...

Behold! ./tabla.




Most of the work to effect this was done in the html_utils book lib where you see the BONUS section (right justify numbers) is handled there, as well. 


Wednesday, March 6, 2024

Rust pop-quiz: enHTMLTablify data rows

#Rust pop-quiz.

Do you see this tweet?

Turn these data:

Token amount value
USK 210.84 $210.63
LUNA 179.0488 $204.456
axlUSDC 47.642972 $47.64

into an HTML-table.

BONUS: If the input-datum is USD, right-justify that cell.