Results for “keep”
Small, practical examples. Search by task or narrow things down below.
Run a one-off container
Run a command and remove its stopped container automatically.
run✓ Tested
Scroll wide code locally
Keep long code inside a horizontally scrollable CSS container.
CSS✓ Tested
Select a range of array elements
Bash Scripts: Quote a sliced at-sign expansion to keep each selected element separate.
Bash Scripts✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Serialize a hashtable as JSON
Produce compact JSON for a small data object.
JSON✓ Tested
Share data through a named volume
Keep a file across two short-lived containers.
volume✓ Tested
Share ownership with a counted smart pointer
C++: Copies of shared_ptr keep the owned value alive until the last owner is released.
C++✓ Tested
Stash only the staged changes
Git: The staged option saves index changes while keeping unrelated unstaged edits.
Git✓ Tested
Toggle an output using an explicit software state
Arduino / C: Keep the intended output state in a Boolean variable.
Arduino / C✓ Tested
Trim and discard blank lines
JavaScript: Split a text block, trim each line, and keep nonempty values.
JavaScript✓ Tested
Trim and discard blank lines
TypeScript: Split a text block, trim each line, and keep nonempty values.
TypeScript✓ Tested
Understand setup() and loop()
Arduino / C: See initialization run once and the main loop run repeatedly.
Arduino / C✓ Tested