Results for “read-only”
Small, practical examples. Search by task or narrow things down below.
Give a result column a readable name
Postgres: Use AS to label a computed result column.
Postgres✓ Tested
Give a result column a readable name
SQLite: Use AS to label a computed result column.
SQLite✓ Tested
Group related readings in a struct
Arduino / C: A struct keeps a sample’s fields together without dynamic allocation.
Arduino / C✓ Tested
Hash a file without reading it all at once
Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.
Python✓ Tested
Identify the current page in a breadcrumb
HTML: An ordered breadcrumb list sits inside a named navigation region, with aria-current on the current location.
HTML✓ Tested
Initialize a map entry only when absent
Java: Use computeIfAbsent when creating a collection for a new key.
Java✓ Tested
Initialize a resource only once
Initialize a resource only once using a complete Go program with explicit sample inputs.
Go✓ Tested
Insert only keys absent from a destination
SQL: NOT EXISTS supports a set-based missing-row insert in a single-writer example.
SQL✓ Tested
Insert only keys absent from a destination
SQL Server: NOT EXISTS supports a set-based missing-row insert in a single-writer example.
SQL Server✓ Tested
Insert only keys absent from a destination
Postgres: NOT EXISTS supports a set-based missing-row insert in a single-writer example.
Postgres✓ Tested
Insert only keys absent from a destination
SQLite: NOT EXISTS supports a set-based missing-row insert in a single-writer example.
SQLite✓ Tested
Keep an optional value only when valid
Keep an optional value only when valid in a complete Rust program using the standard library.
Rust✓ Tested