Results for “target”
Small, practical examples. Search by task or narrow things down below.
Repeat a serial message three times
Arduino / C: Repeat a serial message three times on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Repeat a string a fixed number of times
TypeScript: String.repeat requires a nonnegative finite repetition count.
TypeScript✓ Tested
Repeat an action a fixed number of times
Use a counter and delay for a simple finite sequence.
for loop✓ Tested
Repeat while a condition holds
TypeScript: Count down while a positive number remains, updating the loop variable on each iteration.
TypeScript✓ Tested
Replace a text file with an atomic rename
Prepare new content beside the target before renaming it into place.
atomic write✓ Tested
Replace a token inside an Arduino String
Arduino / C: replace modifies all occurrences in the existing object.
Arduino / C✓ Tested
Replace an array segment in place
TypeScript: splice returns removed items and inserts replacements at the chosen position.
TypeScript✓ Tested
Replace one collection element
TypeScript: Update an existing element at a known valid index.
TypeScript✓ Tested
Represent a decimal quantity with a scaled integer
Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.
Arduino / C✓ Tested
Represent an enabled state
Arduino / C: Represent an enabled state on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Require every bit in a mask
Arduino / C: Masking followed by equality tests whether all required flags are set.
Arduino / C✓ Tested
Require two conditions to be true
TypeScript: Combine a lower and an upper bound to check whether a value is in range.
TypeScript✓ Tested