Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Generate every combination of two sets
Postgres: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.
Postgres✓ Tested
Generate every combination of two sets
SQLite: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.
SQLite✓ Tested
Give a document a descriptive browser title
HTML: The title element supplies the browser document title independently of the visible heading.
HTML✓ Tested
Group matching values while preserving their order
C++: stable_partition keeps the relative order within both predicate groups.
C++✓ Tested
Handle malformed JSON
C#: Catch JsonException for malformed JSON without swallowing unrelated failures.
C#✓ Tested
Handle malformed JSON input
Python: Catch JSONDecodeError without hiding unrelated programming errors.
Python✓ Tested
Include zero counts for missing relationships
SQL: Count the non-null child key after a left join so a missing relationship produces zero.
SQL✓ Tested
Include zero counts for missing relationships
SQL Server: Count the non-null child key after a left join so a missing relationship produces zero.
SQL Server✓ Tested
Include zero counts for missing relationships
Postgres: Count the non-null child key after a left join so a missing relationship produces zero.
Postgres✓ Tested
Include zero counts for missing relationships
SQLite: Count the non-null child key after a left join so a missing relationship produces zero.
SQLite✓ Tested
Initialize a map entry only when absent
Java: Use computeIfAbsent when creating a collection for a new key.
Java✓ Tested
Inspect changes to a container’s writable layer
Docker / Compose: diff marks added, changed, and deleted filesystem paths.
Docker / Compose✓ Tested