Results for “when”
Small, practical examples. Search by task or narrow things down below.
Collapse repeated spaces
Linux Commands: Use tr -s when repeated occurrences of a character should become one.
Linux Commands✓ Tested
Combine matching rows with INNER JOIN
Read product names with their matching stock values.
INNER JOIN✓ Tested
Combine results without duplicates
Merge compatible result sets with UNION.
UNION✓ Tested
Compare a command case-sensitively
Arduino / C: strcmp returns zero when both null-terminated strings match.
Arduino / C✓ Tested
Compare elapsed time across timer rollover
Use unsigned subtraction when a millisecond counter wraps.
rollover✓ Tested
Compare two C strings for equality
C: strcmp returns zero only when both null-terminated byte strings are equal.
C✓ Tested
Compare with a calculated value
Find products above the average price.
subquery✓ Tested
Compute a generated column
Store inputs and derive a value from them.
generated column✓ Tested
Compute beyond the fixed-width integer range
PowerShell: BigInteger keeps an exact result when ordinary integer types are too small.
PowerShell✓ Tested
Convert an object’s properties into a hashtable
PowerShell: Enumerate PSObject.Properties when the set of property names is known only at runtime.
PowerShell✓ Tested
Convert between integer bases
JavaScript: Supply a radix when parsing a nondecimal integer string.
JavaScript✓ Tested
Convert between integer bases
TypeScript: Supply a radix when parsing a nondecimal integer string.
TypeScript✓ Tested