Results for “all”
Small, practical examples. Search by task or narrow things down below.
Format an integer into a caller-owned buffer
C++: to_chars avoids allocation and reports whether the buffer was large enough.
C++✓ Tested
Forward all arguments without changing their boundaries
Bash Scripts: Quoted at-sign preserves empty arguments and embedded spaces.
Bash Scripts✓ Tested
Group mutually exclusive choices
Use the same name for HTML radio buttons and a fieldset legend.
HTML✓ Tested
Group related form controls semantically
Group related form controls semantically with a small React component and explicit browser behavior.
React✓ Tested
Grow an allocation without losing it on failure
C: Assign realloc to a temporary pointer so the original allocation remains available if growth fails.
C✓ Tested
Handle a form locally
Prevent default form navigation while displaying input with jQuery.
jQuery✓ Tested
Handle dynamically added buttons
Delegate a jQuery event from a stable parent to later children.
jQuery✓ Tested
Handle the Enter key specifically
Handle the Enter key specifically with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Hash a file without reading it all at once
Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.
Python✓ Tested
Ignore small movements around a center value
Arduino / C: Values inside the deadband become zero while others keep their direction.
Arduino / C✓ Tested
Increment a shared counter atomically
C#: Interlocked performs an indivisible update without a separate lock for this operation.
C#✓ Tested
Insert Docker’s small init process
Docker / Compose: The init option adds a PID 1 process that reaps children and forwards signals.
Docker / Compose✓ Tested