Results for “read file”
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
Look up a map key
Use find to read a C++ map without inserting a missing key.
C++✓ 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
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 self-contained article
HTML: Article identifies a standalone composition that can be read independently.
HTML✓ Tested
Match enum variants
Match enum variants in a complete Rust program using the standard library.
Rust✓ Tested
Measure a duration between instants
Measure a duration between instants using a complete Go program with explicit sample inputs.
Go✓ Tested
Measure a short delay with micros
Measure elapsed microseconds around a short operation.
micros✓ Tested
Measure a short text value
Python: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
Python✓ Tested