Results for “folder”
Small, practical examples. Search by task or narrow things down below.
Handle a failed conversion
Handle a failed conversion using a complete Go program with explicit sample inputs.
Go✓ Tested
Handle a filename pattern with no matches
Use nullglob so an unmatched pattern produces an empty array.
nullglob✓ Tested
Handle a filename that begins with a dash
Linux Commands: Use -- to terminate command options before an unusual filename.
Linux Commands✓ Tested
Handle a nonzero background-job exit
Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.
Bash Scripts✓ Tested
Handle a parsing Result
Handle a parsing Result in a complete Rust program using the standard library.
Rust✓ Tested
Handle an expected command failure
Branch on a command’s exit code without aborting the script.
exit status✓ Tested
Handle an optional value
Handle an optional value in a complete Rust program using the standard library.
Rust✓ Tested
Handle integer overflow without panicking
Handle integer overflow without panicking in a complete Rust program using the standard library.
Rust✓ Tested
Identify whether a name resolves to a builtin
Bash Scripts: type -t reports the command kind without printing a machine-specific path.
Bash Scripts✓ Tested
Implement a method on a struct
Implement a method on a struct in a complete Rust program using the standard library.
Rust✓ Tested
Include every row tied for the highest score
SQLite: Compare with MAX rather than limiting to an arbitrary number of rows.
SQLite✓ Tested
Include missing values in a not-equal filter
SQLite: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.
SQLite✓ Tested