FIND YOUR NEXT FEW LINES

Results for “k”

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

1871 snippets foundClear filters
AngularGetting Started

Store reactive state in a signal

Store reactive state in a signal with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Arduino / CArrays & embedded state

Store samples in a fixed-size ring buffer

Arduino / C: The write position wraps while the storage size stays constant.

Arduino / C✓ Tested
Arduino / CGetting Started

Store several readings in an array

Arduino / C: Store several readings in an array on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Bash ScriptsGetting Started

Store text in a variable

Bash Scripts: Store text in a variable with a small standalone Bash program.

Bash Scripts✓ Tested
CSSInteraction selectors

Style a card based on a selected descendant

CSS: Has matches the parent when its relative selector finds a checked control inside it.

CSS✓ Tested
AngularLists & control flow

Style the first and last list items

Style the first and last list items with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
HTMLForm behavior

Submit a readonly value while preventing edits

HTML: Readonly controls remain in form data, unlike disabled controls.

HTML✓ Tested
ReactPerformance & rendering

Subscribe to a small external store safely

Subscribe to a small external store safely with a small React component and explicit browser behavior.

React✓ Tested
ReactEffects & lifecycle

Subscribe to and clean up a window event

Subscribe to and clean up a window event with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsInput streams & redirection

Substitute values into a multiline template

Bash Scripts: An unquoted heredoc delimiter enables parameter expansion in the template.

Bash Scripts✓ Tested
RustNumbers & durations

Subtract durations without underflow

Subtract durations without underflow in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsLoops & decisions

Sum a range of integers

Use an arithmetic loop without launching external processes.

arithmetic✓ Tested