Results for “Types & reliable control flow”
Small, practical examples. Search by task or narrow things down below.
Include a nonvisible value in form data
HTML: A named hidden input contributes data without adding a visible editing control.
HTML✓ Tested
Join array items with a one-character separator
Bash Scripts: A local IFS controls the separator used by the quoted star expansion.
Bash Scripts✓ Tested
Keep a tall section inside a local vertical scroller
CSS: A bounded height and overflow auto keep long content from stretching the surrounding page.
CSS✓ Tested
Keep an action button from submitting a form
HTML: Specify type button for controls whose purpose is a local action.
HTML✓ Tested
Measure a short delay with micros
Measure elapsed microseconds around a short operation.
micros✓ Tested
Mirror input text
Update a result as the user types using a jQuery input event.
jQuery✓ Tested
Move a box visually without changing its layout slot
CSS: Transforms change the painted geometry while leaving surrounding normal-flow layout unchanged.
CSS✓ Tested
Narrow a union using typeof
Handle text and numeric values with separate branches.
union✓ Tested
Number a sorted result
Assign a row number without changing stored data.
row_number✓ Tested
Pad a label with leading zeroes
PowerShell: Use a numeric format specifier to control the displayed width.
PowerShell✓ Tested
Parse a hexadecimal integer with from_chars
C++: An explicit radix controls digit interpretation without a locale dependency.
C++✓ Tested
Pass named parameters from a hashtable
Keep a command’s options together in a reusable object.
splatting✓ Tested