Results for “k”
Small, practical examples. Search by task or narrow things down below.
Preserve a failure status while an EXIT trap runs
Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.
Bash Scripts✓ Tested
Preserve a fractional result
Arduino / C: Preserve a fractional result on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Preserve a large JSON integer
Preserve a large JSON integer using a complete Go program with explicit sample inputs.
Go✓ Tested
Preserve an aspect ratio
Reserve a 16:9 CSS box without a fixed height.
CSS✓ Tested
Preserve map insertion order
Java: Use LinkedHashMap when iteration should follow the order keys were first added.
Java✓ Tested
Preserve whitespace while wrapping
Use CSS pre-wrap for multiline text that retains spaces.
CSS✓ Tested
Prevent a variable value from expanding as a filename pattern
Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.
Bash Scripts✓ Tested
Prevent output chatter with separate thresholds
Arduino / C: Use different on and off thresholds to retain state between them.
Arduino / C✓ Tested
Print a collection for inspection
Print a collection for inspection in a complete Rust program using the standard library.
Rust✓ Tested
Print a fixed text buffer
Arduino / C: Print a fixed text buffer on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Print a floating-point value with fixed precision
Choose the number of decimal places in serial output.
float✓ Tested
Print a label beside a number
Arduino / C: Combine Serial.print and Serial.println to put text and a value on one line.
Arduino / C✓ Tested