Results for “all”
Small, practical examples. Search by task or narrow things down below.
Choose the command a container executes
Docker / Compose: Choose the command a container executes using a locally available Ubuntu image.
Docker / Compose✓ Tested
Choose the signal used for graceful stopping
Docker / Compose: The configured stop signal is recorded in container metadata.
Docker / Compose✓ Tested
Clamp a value to a range
Use C++17 clamp to bound a numeric value.
C++✓ Tested
Clamp an integer to inclusive bounds
C: Explicit comparisons avoid relying on nonstandard min or max macros.
C✓ Tested
Clean up a generator after an early break
JavaScript: Breaking a for-of loop closes a generator and runs its finally block.
JavaScript✓ Tested
Clean up a generator after an early break
TypeScript: Breaking a for-of loop closes a generator and runs its finally block.
TypeScript✓ Tested
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
Collect a serial line in a fixed buffer
Read a short command without dynamic String allocation.
serial line✓ Tested
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
Combine a stable entrypoint with default arguments
Docker / Compose: CMD supplies default arguments to an exec-form ENTRYPOINT.
Docker / Compose✓ Tested
Combine results without duplicates
Merge compatible result sets with UNION.
UNION✓ Tested
Combine text values with a separator
SQL: Use the concatenation operator supported by the selected SQL dialect.
SQL✓ Tested