Results for “Get-ChildItem”
Small, practical examples. Search by task or narrow things down below.
Observe an exception from an asynchronous task
C++: Calling get rethrows an exception captured by the future.
C++✓ Tested
Pack two small values into one byte
Arduino / C: Mask each four-bit value before combining it.
Arduino / C✓ Tested
Pair corresponding array items by position
TypeScript: Validate equal lengths before zipping when missing counterparts would be an error.
TypeScript✓ Tested
Pass named parameters from a hashtable
Keep a command’s options together in a reusable object.
splatting✓ Tested
Percent-encode one URL component
TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.
TypeScript✓ Tested
Play a fixed digital output pattern
Arduino / C: A pattern table separates the output sequence from its timing.
Arduino / C✓ Tested
Prevent output chatter with separate thresholds
Arduino / C: Use different on and off thresholds to retain state between them.
Arduino / C✓ Tested
Prevent runtime changes to top-level properties
TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.
TypeScript✓ Tested
Print a floating-point value with fixed precision
Choose the number of decimal places in serial output.
float✓ Tested
Print a message to the Serial Monitor
Send a line once when the sketch starts.
Serial✓ Tested
Print integers in different bases
Inspect a byte in decimal, hexadecimal, and binary.
Serial✓ Tested
Produce a lazy sequence with a generator
TypeScript: A generator yields one value per iteration without building an intermediate array.
TypeScript✓ Tested