FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
JavaFile operations & binary data

Load a small properties configuration

Java: Use a Reader to make the configuration character encoding explicit.

Java✓ 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
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
Arduino / CSensor calculations

Maintain a rolling sum in a circular window

Arduino / C: Subtract the overwritten sample before adding the next one.

Arduino / C✓ 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
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
AngularLifecycle & observable data

Measure a node after the first render

Measure a node after the first render with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Arduino / CTiming & control

Measure a short delay with micros

Measure elapsed microseconds around a short operation.

micros✓ Tested
ReactEffects & lifecycle

Measure an element after layout

Measure an element after layout with a small React component and explicit browser behavior.

React✓ Tested