FIND YOUR NEXT FEW LINES

Results for “empty”

Small, practical examples. Search by task or narrow things down below.

487 snippets foundClear filters
PostgresWindow analytics

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
JavaScriptArrays

Sum numeric values

Provide an initial accumulator for JavaScript reduce, including empty arrays.

JavaScript✓ Tested
TypeScriptCollections & records

Sum typed values with reduce

Accumulate numeric array elements.

reduce✓ Tested
Docker / ComposeCompose service options

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
Bash ScriptsGetting Started

Test a function’s success status

Bash Scripts: Test a function’s success status with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsText parsing & arithmetic

Test numeric divisibility with a remainder

Bash Scripts: The modulo operator computes an integer remainder.

Bash Scripts✓ Tested
C++Ownership & optional values

Transfer unique ownership with move

C++: Moving a unique_ptr leaves the source empty and gives ownership to the destination.

C++✓ Tested
JavaScriptText handling & Unicode

Trim and discard blank lines

JavaScript: Split a text block, trim each line, and keep nonempty values.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Trim and discard blank lines

TypeScript: Split a text block, trim each line, and keep nonempty values.

TypeScript✓ Tested
SQL ServerGetting Started

Turn a condition into a result label

SQL Server: Use CASE to describe stock availability for each row.

SQL Server✓ Tested
PostgresGetting Started

Turn a condition into a result label

Postgres: Use CASE to describe stock availability for each row.

Postgres✓ Tested
SQL ServerJSON & results

Turn JSON into typed rows

Project JSON array items into SQL columns.

OPENJSON✓ Tested