FIND YOUR NEXT FEW LINES

Results for “get”

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

848 snippets foundClear filters
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
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
TypeScriptObject behavior & collections

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
Arduino / CSerial communication

Print a floating-point value with fixed precision

Choose the number of decimal places in serial output.

float✓ Tested
Arduino / CSerial communication

Print a message to the Serial Monitor

Send a line once when the sketch starts.

Serial✓ Tested
Arduino / CSerial communication

Print integers in different bases

Inspect a byte in decimal, hexadecimal, and binary.

Serial✓ Tested
TypeScriptPromises & iteration protocols

Produce a lazy sequence with a generator

TypeScript: A generator yields one value per iteration without building an intermediate array.

TypeScript✓ Tested