FIND YOUR NEXT FEW LINES

Results for “Deferred work & queues”

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

550 snippets foundClear filters
GoStrings & text

Join words with a separator

Join words with a separator using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsFunction scope & composition

Keep a function variable local

Bash Scripts: Local prevents an ordinary function assignment from replacing a caller variable.

Bash Scripts✓ Tested
RustErrors & optional values

Keep an optional value only when valid

Keep an optional value only when valid in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsProcesses & environment

Keep loop state by avoiding a pipeline subshell

Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.

Bash Scripts✓ Tested
RustVectors & slices

Keep only values satisfying a condition

Keep only values satisfying a condition in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsGetting Started

Limit a beginner function variable to local scope

Bash Scripts: Limit a beginner function variable to local scope with a small standalone Bash program.

Bash Scripts✓ Tested
GoTesting & reusable helpers

Limit the bytes read from a stream

Limit the bytes read from a stream using a complete Go program with explicit sample inputs.

Go✓ Tested
GitCommit history & revision selection

List all files stored in a commit

Git: ls-tree inspects the committed tree without relying on working files.

Git✓ Tested
GitWorking tree & staging

List changed files without the full diff

Inspect affected paths before staging.

diff✓ Tested
C#Files & paths

List matching files

Enumerate immediate text files and sort their names in C#.

C#✓ Tested
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