FIND YOUR NEXT FEW LINES

Results for “File operations & binary data”

Small, practical examples. Search by task or narrow things down below.

1473 snippets foundClear filters
Bash ScriptsFunction scope & composition

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
GoGetting Started

Look up a map entry

Look up a map entry using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsLoops & decisions

Loop over an array safely

Preserve spaces in array elements while iterating.

array✓ Tested
RustGetting Started

Loop over an inclusive range

Loop over an inclusive range in a complete Rust program using the standard library.

Rust✓ Tested
SQLConstraints & defaults

Make a pair of columns unique together

SQL: A composite primary key permits repeated individual values while forbidding a duplicate combination.

SQL✓ Tested
SQL ServerConstraints & defaults

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
PostgresConstraints & defaults

Make a pair of columns unique together

Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.

Postgres✓ Tested
SQLiteConstraints & defaults

Make a pair of columns unique together

SQLite: A composite primary key permits repeated individual values while forbidding a duplicate combination.

SQLite✓ Tested
GoGetting Started

Map a command with switch

Map a command with switch using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CData & storage

Map an input range to an output range

Scale an integer reading to a different interval.

map✓ Tested
HTMLText semantics

Mark a longer quotation and its source

HTML: Blockquote marks quoted content; a visible source link remains useful because cite is metadata.

HTML✓ Tested
SQLText cleanup & matching

Match a known text prefix

SQL: A percent wildcard matches zero or more characters following the prefix.

SQL✓ Tested