Results for “per”
Small, practical examples. Search by task or narrow things down below.
Sort timestamp strings by their parsed instants
JavaScript: Compare epoch values explicitly when date strings may contain different offsets.
JavaScript✓ Tested
Sort timestamp strings by their parsed instants
TypeScript: Compare epoch values explicitly when date strings may contain different offsets.
TypeScript✓ Tested
Split an array into fixed-size batches
PowerShell: Bound the final index so the last batch can contain fewer elements.
PowerShell✓ Tested
Store a reference in a standard container
C++: reference_wrapper preserves reference semantics while behaving like a copyable container element.
C++✓ Tested
Subscribe to a small external store safely
Subscribe to a small external store safely with a small React component and explicit browser behavior.
React✓ Tested
Sum the decimal digits of an unsigned integer
C: Repeated division and remainder extract digits without converting to text.
C✓ Tested
Take an immutable list snapshot
Java: List.copyOf protects the snapshot from later changes to the source list.
Java✓ Tested
Test whether an array contains a value
PowerShell: The contains operator compares complete items rather than matching substrings.
PowerShell✓ Tested
Test whether an unsigned value is a power of two
C: A nonzero power of two has exactly one set bit.
C✓ Tested
Update rows selected by a related table
SQL: Use EXISTS to limit updates based on an independent eligibility table.
SQL✓ Tested
Update rows selected by a related table
SQL Server: Use EXISTS to limit updates based on an independent eligibility table.
SQL Server✓ Tested
Update rows selected by a related table
Postgres: Use EXISTS to limit updates based on an independent eligibility table.
Postgres✓ Tested