Results for “id”
Small, practical examples. Search by task or narrow things down below.
Find the first matching value with a fallback
Python: Pass a generator and default to next to avoid building an intermediate list.
Python✓ Tested
Find the mean and median of readings
Python: Use statistics helpers to distinguish an arithmetic mean from a middle value.
Python✓ Tested
Find the nearest matching ancestor
Read a parent row attribute using jQuery closest.
jQuery✓ Tested
Find the second-highest distinct value
SQL: Select the maximum below the overall maximum to skip ties at the top.
SQL✓ Tested
Find the second-highest distinct value
SQL Server: Select the maximum below the overall maximum to skip ties at the top.
SQL Server✓ Tested
Find the second-highest distinct value
Postgres: Select the maximum below the overall maximum to skip ties at the top.
Postgres✓ Tested
Find the second-highest distinct value
SQLite: Select the maximum below the overall maximum to skip ties at the top.
SQLite✓ Tested
Find values missing from another collection
Python: Use a set difference to identify requested IDs absent from the available IDs.
Python✓ Tested
Find values present in exactly one set
Python: Use symmetric difference when either side can contain unmatched values.
Python✓ Tested
Finish all queued animations immediately
jQuery: finish jumps current and queued animations to their final values.
jQuery✓ Tested
Fit as many columns as possible
Use auto-fit and minmax for a CSS grid that responds to its available width.
CSS✓ Tested
Format a date without locale ambiguity
Parse an ISO date and format it consistently.
date✓ Tested