FIND YOUR NEXT FEW LINES

Results for “Stashing selected work”

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

608 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
C#Collections

Look up a dictionary value

Use TryGetValue for a C# dictionary lookup with a fallback.

C#✓ 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 ScriptsFunctions & arguments

Look up values in an associative array

Use named keys for a small in-memory configuration table.

dictionary✓ 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
Docker / ComposeGetting Started

Make a Compose service’s filesystem read-only

Docker / Compose: Make a Compose service’s filesystem read-only in a small Compose file.

Docker / Compose✓ Tested
HTMLForm behavior

Make an unavailable select option unselectable

HTML: A disabled option remains visible but cannot be selected through normal keyboard navigation.

HTML✓ Tested
GoGetting Started

Map a command with switch

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

Go✓ Tested
RustGetting Started

Match enum variants

Match enum variants in a complete Rust program using the standard library.

Rust✓ Tested
GoDates & times

Measure a duration between instants

Measure a duration between instants using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryEvents

Mirror input text

Update a result as the user types using a jQuery input event.

jQuery✓ Tested