Results for “read-only”
Small, practical examples. Search by task or narrow things down below.
Keep only the latest requested result
Keep only the latest requested result with a small React component and explicit browser behavior.
React✓ Tested
Keep only the most recent items
Python: Use a bounded deque to discard the oldest item as new values arrive.
Python✓ Tested
Keep only values satisfying a condition
Keep only values satisfying a condition in a complete Rust program using the standard library.
Rust✓ Tested
Keep scratch data only for the container lifetime
Docker / Compose: Separate tmpfs mounts do not share data between container runs.
Docker / Compose✓ Tested
List newly added staged files only
Git: Filter the cached diff by added status while leaving modified files out.
Git✓ Tested
List only containers belonging to a label
Docker / Compose: A label filter selects explicitly tagged resources.
Docker / Compose✓ Tested
List only staged filenames
Git: The cached diff compares the index with HEAD rather than comparing working files with the index.
Git✓ Tested
List only volumes matching a label
Docker / Compose: A label filter avoids relying on broad name patterns.
Docker / Compose✓ Tested
Mark up a machine-readable date
Pair a readable date with an ISO datetime attribute in HTML.
HTML✓ Tested
Merge a branch only by fast-forward
Refuse to create an unexpected merge commit.
merge✓ Tested
Mount expensive content only when requested
Mount expensive content only when requested with a small React component and explicit browser behavior.
React✓ Tested
Parse only valid integers
Parse only valid integers in a complete Rust program using the standard library.
Rust✓ Tested