FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
CGetting Started

Replace one collection element

C: Update an existing element at a known valid index.

C✓ Tested
HTMLInput constraints

Require a nonempty text value

HTML: The required attribute makes an empty text control fail native constraint validation.

HTML✓ Tested
GitInspecting the working tree

Restrict a diff to one chosen path

Git: Use the double dash separator to distinguish a filename from revisions or options.

Git✓ Tested
PowerShellFunctions & parameter validation

Return a collection as one pipeline object

PowerShell: The unary comma prevents the returned array from being enumerated at this boundary.

PowerShell✓ Tested
CArray transformations

Rotate a nonempty array left by one element

C: Save the first item before shifting the remaining elements.

C✓ Tested
ReactEffects & lifecycle

Schedule a one-time update with cleanup

Schedule a one-time update with cleanup with a small React component and explicit browser behavior.

React✓ Tested
AngularComponents & communication

Scope a component’s styles

Scope a component’s styles with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactComponents & props

Select a component variant explicitly

Select a component variant explicitly with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsProcesses & environment

Set an environment value for one child command

Bash Scripts: A command-prefix assignment is visible to that command without overwriting the shell’s current variable.

Bash Scripts✓ Tested
Arduino / CSensor calculations

Smooth a sequence with an exponential filter

Arduino / C: Blend each sample with the previous filtered value.

Arduino / C✓ Tested
HTMLTables & list numbering

Span one header across several columns

HTML: Colspan lets a heading cover a defined number of columns in the table grid.

HTML✓ Tested
GitWorking tree & staging

Stage one file

Add one changed file to the next commit.

add✓ Tested