Results for “empty”
Small, practical examples. Search by task or narrow things down below.
Sum a row and its immediate predecessor
Postgres: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
Postgres✓ Tested
Sum numeric values
Provide an initial accumulator for JavaScript reduce, including empty arrays.
JavaScript✓ Tested
Sum typed values with reduce
Accumulate numeric array elements.
reduce✓ Tested
Supply a default for an unset Compose variable
Docker / Compose: The default interpolation form supplies a value when the variable is absent or empty.
Docker / Compose✓ Tested
Test a function’s success status
Bash Scripts: Test a function’s success status with a small standalone Bash program.
Bash Scripts✓ Tested
Test numeric divisibility with a remainder
Bash Scripts: The modulo operator computes an integer remainder.
Bash Scripts✓ Tested
Transfer unique ownership with move
C++: Moving a unique_ptr leaves the source empty and gives ownership to the destination.
C++✓ Tested
Trim and discard blank lines
JavaScript: Split a text block, trim each line, and keep nonempty values.
JavaScript✓ Tested
Trim and discard blank lines
TypeScript: Split a text block, trim each line, and keep nonempty values.
TypeScript✓ Tested
Turn a condition into a result label
SQL Server: Use CASE to describe stock availability for each row.
SQL Server✓ Tested
Turn a condition into a result label
Postgres: Use CASE to describe stock availability for each row.
Postgres✓ Tested
Turn JSON into typed rows
Project JSON array items into SQL columns.
OPENJSON✓ Tested