FIND YOUR NEXT FEW LINES

Results for “Get-Content”

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

914 snippets foundClear filters
Arduino / CTiming & control

Measure a short delay with micros

Measure elapsed microseconds around a short operation.

micros✓ Tested
C#File operations & paths

Move a file to a new filename

C#: File.Move changes the file path without loading its contents.

C#✓ Tested
TypeScriptTypes & functions

Narrow a union using typeof

Handle text and numeric values with separate branches.

union✓ Tested
TypeScriptText handling & Unicode

Normalize identifier case consistently

TypeScript: Use toLowerCase for a simple case-insensitive ASCII identifier lookup.

TypeScript✓ Tested
C++Tasks & synchronization

Observe an exception from an asynchronous task

C++: Calling get rethrows an exception captured by the future.

C++✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested
TypeScriptArray traversal & selection

Pair corresponding array items by position

TypeScript: Validate equal lengths before zipping when missing counterparts would be an error.

TypeScript✓ Tested
PowerShellFunctions & control

Pass named parameters from a hashtable

Keep a command’s options together in a reusable object.

splatting✓ Tested
TypeScriptRegular expressions & URL encoding

Percent-encode one URL component

TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.

TypeScript✓ Tested
Arduino / CDigital signals & interrupts

Play a fixed digital output pattern

Arduino / C: A pattern table separates the output sequence from its timing.

Arduino / C✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Prevent a variable value from expanding as a filename pattern

Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.

Bash Scripts✓ Tested
Arduino / CSensor calculations

Prevent output chatter with separate thresholds

Arduino / C: Use different on and off thresholds to retain state between them.

Arduino / C✓ Tested