FIND YOUR NEXT FEW LINES

Results for “control”

Small, practical examples. Search by task or narrow things down below.

112 snippets foundClear filters
C#Types & reliable control flow

Validate an argument at a method boundary

C#: ThrowIfNegative gives callers an explicit argument error for an invalid range.

C#✓ Tested
C#Types & reliable control flow

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
HTMLInput constraints

Allow several selected options

HTML: A multiple select exposes each selected option as a value with the same control name.

HTML✓ Tested
Arduino / CTiming & control

Blink without blocking the loop

Use elapsed millis time instead of delay for a repeating action.

millis✓ Tested
Docker / ComposeCompose service options

Choose a service’s internal hostname

Docker / Compose: hostname controls the name reported inside the container.

Docker / Compose✓ Tested
PowerShellFunctions & control

Choose an action with switch

Map a small command value to a result.

switch✓ Tested
CSSPositioning & stacking

Choose which overlapping box receives a pointer

CSS: Z-index controls the stack level of these positioned sibling elements.

CSS✓ Tested
HTMLForm behavior

Collect several checked values under one name

HTML: Only checked named checkboxes become successful form controls.

HTML✓ Tested
Arduino / CTiming & control

Compare elapsed time across timer rollover

Use unsigned subtraction when a millisecond counter wraps.

rollover✓ Tested
HTMLInput constraints

Constrain a calendar date input

HTML: Use ISO date values for the date control’s minimum and maximum.

HTML✓ Tested
HTMLTables & list numbering

Continue an ordered list at a chosen number

HTML: The start attribute controls the initial ordinal without changing item text.

HTML✓ Tested
Linux CommandsArchive integrity & packaging

Create an archive from an explicit file list

Linux Commands: Use tar -T for a controlled list of relative archive members.

Linux Commands✓ Tested