Results for “read”
Small, practical examples. Search by task or narrow things down below.
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
Inspect a file length without reading it
C#: Use FileInfo.Length to retrieve a logical size in bytes.
C#✓ Tested
Join a worker thread and read its result
Join a worker thread and read its result in a complete Rust program using the standard library.
Rust✓ Tested
Limit the bytes read from a stream
Limit the bytes read from a stream using a complete Go program with explicit sample inputs.
Go✓ Tested
List branches already merged into the current branch
Git: The merged filter reports branches whose tips are reachable from HEAD.
Git✓ Tested
Make a Compose service’s filesystem read-only
Docker / Compose: Make a Compose service’s filesystem read-only in a small Compose file.
Docker / Compose✓ Tested
Mark up a machine-readable date
Pair a readable date with an ISO datetime attribute in HTML.
HTML✓ Tested
Mount a host directory read-only
Expose existing files without allowing the container to change them.
bind mount✓ Tested
Pass an argument into a worker thread
C++: Thread arguments are copied by default; std::ref explicitly passes a reference.
C++✓ Tested