Results for “first”
Small, practical examples. Search by task or narrow things down below.
Choose among several numeric ranges
Bash Scripts: An if-elif chain evaluates branches in order and executes the first match.
Bash Scripts✓ Tested
Commit multiple related changes together
SQL: The first transaction prepares the fixtures. The second commits both updates as one unit.
SQL✓ Tested
Commit multiple related changes together
SQL Server: The first transaction prepares the fixtures. The second commits both updates as one unit.
SQL Server✓ Tested
Commit multiple related changes together
Postgres: The first transaction prepares the fixtures. The second commits both updates as one unit.
Postgres✓ Tested
Commit multiple related changes together
SQLite: The first transaction prepares the fixtures. The second commits both updates as one unit.
SQLite✓ Tested
Compare a row with the previous row
Read a preceding value with LAG.
LAG✓ Tested
Consume positional arguments one at a time
Bash Scripts: Check the argument count before accessing the first parameter with nounset enabled.
Bash Scripts✓ Tested
Count the elements in an array
Bash Scripts: The array length form counts assigned elements, not characters in the first value.
Bash Scripts✓ Tested
Encode a value as little-endian bytes
Arduino / C: Store the least significant byte first when the protocol requires it.
Arduino / C✓ Tested
Enhance a layout above a minimum viewport width
CSS: A mobile-first min-width query adds columns when enough horizontal space is available.
CSS✓ Tested
Find a sample range in one pass
Arduino / C: Initialize extrema from the first element of a nonempty array.
Arduino / C✓ Tested
Find sorted set members missing from another set
C++: set_difference writes elements present in the first sorted input but absent from the second.
C++✓ Tested