FIND YOUR NEXT FEW LINES

Results for “all”

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

1115 snippets foundClear filters
Docker / ComposeGetting Started

Choose the command a container executes

Docker / Compose: Choose the command a container executes using a locally available Ubuntu image.

Docker / Compose✓ Tested
Docker / ComposeLimits & process security

Choose the signal used for graceful stopping

Docker / Compose: The configured stop signal is recorded in container metadata.

Docker / Compose✓ Tested
C++Numbers & algorithms

Clamp a value to a range

Use C++17 clamp to bound a numeric value.

C++✓ Tested
CNumeric parsing & arithmetic

Clamp an integer to inclusive bounds

C: Explicit comparisons avoid relying on nonstandard min or max macros.

C✓ Tested
JavaScriptPromises & iteration protocols

Clean up a generator after an early break

JavaScript: Breaking a for-of loop closes a generator and runs its finally block.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Clean up a generator after an early break

TypeScript: Breaking a for-of loop closes a generator and runs its finally block.

TypeScript✓ Tested
ReactEffects & lifecycle

Clean up a subscription when a child unmounts

Clean up a subscription when a child unmounts with a small React component and explicit browser behavior.

React✓ Tested
Arduino / CSerial communication

Collect a serial line in a fixed buffer

Read a short command without dynamic String allocation.

serial line✓ Tested
ReactForms & validation

Collect selected options from a multi-select

Collect selected options from a multi-select with a small React component and explicit browser behavior.

React✓ Tested
Docker / ComposeDockerfile patterns

Combine a stable entrypoint with default arguments

Docker / Compose: CMD supplies default arguments to an exec-form ENTRYPOINT.

Docker / Compose✓ Tested
SQLChange & combine data

Combine results without duplicates

Merge compatible result sets with UNION.

UNION✓ Tested
SQLText cleanup & matching

Combine text values with a separator

SQL: Use the concatenation operator supported by the selected SQL dialect.

SQL✓ Tested