FIND YOUR NEXT FEW LINES

Results for “test”

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

985 snippets foundClear filters
PowerShellArray operations

Reverse a copy while preserving the source

PowerShell: Clone the array before using Array.Reverse because Reverse mutates its argument.

PowerShell✓ Tested
PowerShellDates & numeric validation

Round a decimal with a chosen midpoint rule

PowerShell: Use decimal input and an explicit rounding policy for a reproducible decimal result.

PowerShell✓ Tested
Linux CommandsFinding & selecting files

Run a command safely for each matching file

Linux Commands: Use find -exec with argument placeholders so spaces in filenames remain intact.

Linux Commands✓ Tested
PowerShellGetting Started

Run a first PowerShell statement

PowerShell: Run a first PowerShell statement using PowerShell 7.

PowerShell✓ Tested
Arduino / CGetting Started

Run a first sketch and read serial output

Arduino / C: Run a first sketch and read serial output on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
jQueryEvents

Run an event handler once

Use jQuery one for a handler that removes itself after the first event.

jQuery✓ Tested
PowerShellFunctions & parameter validation

Run cleanup after a caught exception

PowerShell: Use finally for cleanup that must occur after either success or failure.

PowerShell✓ Tested
jQueryHTTP requests

Run cleanup after an AJAX failure

jQuery: always runs on success or failure and can clear loading state.

jQuery✓ Tested
jQueryGetting Started

Run code after the document is ready

jQuery: Learn how to run code after the document is ready in a complete browser example.

jQuery✓ Tested
Linux CommandsStreams & byte tools

Save a stream while displaying it

Linux Commands: Use tee to write a copy of standard input to a file.

Linux Commands✓ 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