Determining if an element is in the last row of a table

 stritar.net, written 12:57 CET

Once upon a time I stumbled upon a problem, where I needed to calculate if an element is in the last row of a table. Here's the scenario: you have a number of items, which are put in a table from left to right. When the row is full, the items continue in the next row. Imagine an airplane or a theater where people start sitting front-left and continue to the right until they run out of space, then going to the next row and so on. Now we want to know which people are sitting in the last of the populated rows.

more >
2146 views   •   1 like
date
date
date
date

Featuring: