Results for “test”
Small, practical examples. Search by task or narrow things down below.
Reverse a copy while preserving the source
PowerShell: Clone the array before using Array.Reverse because Reverse mutates its argument.
PowerShell✓ Tested
Round a decimal with a chosen midpoint rule
PowerShell: Use decimal input and an explicit rounding policy for a reproducible decimal result.
PowerShell✓ Tested
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
Run a first PowerShell statement
PowerShell: Run a first PowerShell statement using PowerShell 7.
PowerShell✓ Tested
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
Run an event handler once
Use jQuery one for a handler that removes itself after the first event.
jQuery✓ Tested
Run cleanup after a caught exception
PowerShell: Use finally for cleanup that must occur after either success or failure.
PowerShell✓ Tested
Run cleanup after an AJAX failure
jQuery: always runs on success or failure and can clear loading state.
jQuery✓ Tested
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
Save a stream while displaying it
Linux Commands: Use tee to write a copy of standard input to a file.
Linux Commands✓ Tested
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
Scope a component’s styles
Scope a component’s styles with a standalone Angular component and explicit browser behavior.
Angular✓ Tested