Results for “folder size”
Small, practical examples. Search by task or narrow things down below.
Assign a default to an empty or unset variable
Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.
Bash Scripts✓ Tested
Attach an overall count to every row
SQLite: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQLite✓ Tested
Attach behavior to a struct
Attach behavior to a struct using a complete Go program with explicit sample inputs.
Go✓ Tested
Bind a value with let
Bind a value with let in a complete Rust program using the standard library.
Rust✓ Tested
Block deletion of a referenced parent
SQLite: The default foreign-key action prevents deletion while a child still refers to the parent.
SQLite✓ Tested
Borrow local data in a scoped thread
Borrow local data in a scoped thread in a complete Rust program using the standard library.
Rust✓ Tested
Borrow text until a modification is needed
Borrow text until a modification is needed in a complete Rust program using the standard library.
Rust✓ Tested
Borrow text without transferring ownership
Borrow text without transferring ownership in a complete Rust program using the standard library.
Rust✓ Tested
Bound a command execution time
Linux Commands: Use timeout and handle status 124 as an expected time limit.
Linux Commands✓ Tested
Branch on a command’s exit status
Linux Commands: Branch on a command’s exit status using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Branch on whether a pattern exists
Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.
Linux Commands✓ Tested
Build a JSON array from rows
Aggregate ordered text values into JSON.
json_group_array✓ Tested