Results for “control”
Small, practical examples. Search by task or narrow things down below.
Validate an argument at a method boundary
C#: ThrowIfNegative gives callers an explicit argument error for an invalid range.
C#✓ Tested
Write a generic first-or-fallback helper
C#: Constrain a generic helper through its input shape and return an explicit caller-supplied fallback.
C#✓ Tested
Allow several selected options
HTML: A multiple select exposes each selected option as a value with the same control name.
HTML✓ Tested
Blink without blocking the loop
Use elapsed millis time instead of delay for a repeating action.
millis✓ Tested
Choose a service’s internal hostname
Docker / Compose: hostname controls the name reported inside the container.
Docker / Compose✓ Tested
Choose an action with switch
Map a small command value to a result.
switch✓ Tested
Choose which overlapping box receives a pointer
CSS: Z-index controls the stack level of these positioned sibling elements.
CSS✓ Tested
Collect several checked values under one name
HTML: Only checked named checkboxes become successful form controls.
HTML✓ Tested
Compare elapsed time across timer rollover
Use unsigned subtraction when a millisecond counter wraps.
rollover✓ Tested
Constrain a calendar date input
HTML: Use ISO date values for the date control’s minimum and maximum.
HTML✓ Tested
Continue an ordered list at a chosen number
HTML: The start attribute controls the initial ordinal without changing item text.
HTML✓ Tested
Create an archive from an explicit file list
Linux Commands: Use tar -T for a controlled list of relative archive members.
Linux Commands✓ Tested