Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Load functions from a trusted local script
Bash Scripts: Source executes a file in the current shell so its function definitions remain available.
Bash Scripts✓ Tested
Look up a map entry
Look up a map entry using a complete Go program with explicit sample inputs.
Go✓ Tested
Loop over an array safely
Preserve spaces in array elements while iterating.
array✓ Tested
Loop over an inclusive range
Loop over an inclusive range in a complete Rust program using the standard library.
Rust✓ Tested
Make a pair of columns unique together
SQL: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL✓ Tested
Make a pair of columns unique together
SQL Server: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL Server✓ Tested
Make a pair of columns unique together
Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.
Postgres✓ Tested
Make a pair of columns unique together
SQLite: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQLite✓ Tested
Map a command with switch
Map a command with switch using a complete Go program with explicit sample inputs.
Go✓ Tested
Map an input range to an output range
Scale an integer reading to a different interval.
map✓ Tested
Mark a longer quotation and its source
HTML: Blockquote marks quoted content; a visible source link remains useful because cite is metadata.
HTML✓ Tested
Match a known text prefix
SQL: A percent wildcard matches zero or more characters following the prefix.
SQL✓ Tested