FIND YOUR NEXT FEW LINES

Results for “target”

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

264 snippets foundClear filters
Arduino / CGetting Started

Select a response with switch

Arduino / C: Select a response with switch on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
TypeScriptUtilities & async

Select fields with the Pick utility type

Expose a smaller view of a larger object type.

Pick✓ Tested
TypeScriptArray traversal & selection

Separate a first item from the remaining items

TypeScript: Array destructuring and a rest element produce named pieces of a sequence.

TypeScript✓ Tested
Arduino / CData & storage

Set and inspect a bit flag

Store several boolean states in one byte.

bitSet✓ Tested
Arduino / CSensor calculations

Smooth a sequence with an exponential filter

Arduino / C: Blend each sample with the previous filtered value.

Arduino / C✓ Tested
Arduino / CArrays & embedded state

Sort a small array in place

Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.

Arduino / C✓ Tested
TypeScriptUTC date operations

Sort timestamp strings by their parsed instants

TypeScript: Compare epoch values explicitly when date strings may contain different offsets.

TypeScript✓ Tested
Arduino / CText & bounded buffers

Split a writable comma-delimited buffer

Arduino / C: strtok modifies its buffer and returns successive tokens.

Arduino / C✓ Tested
TypeScriptArray restructuring

Split an array into bounded batches

TypeScript: Advance by a positive batch size and allow a shorter final chunk.

TypeScript✓ Tested
TypeScriptRegular expressions & URL encoding

Split text on several separator characters

TypeScript: A regex character class can recognize alternative simple delimiters.

TypeScript✓ Tested
Arduino / CDigital signals & interrupts

Stop receiving interrupts when a task finishes

Arduino / C: detachInterrupt removes the registered callback.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Store a bounded null-terminated text setting

Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.

Arduino / C✓ Tested