FIND YOUR NEXT FEW LINES

Results for “z”

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

416 snippets foundClear filters
Arduino / CGetting Started

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
Arduino / CTiming & control

Repeat an action a fixed number of times

Use a counter and delay for a simple finite sequence.

for loop✓ Tested
Bash ScriptsArguments & decisions

Repeat until a condition becomes true

Bash Scripts: An until loop continues while its test returns a nonzero status.

Bash Scripts✓ Tested
Arduino / CText & bounded buffers

Replace a token inside an Arduino String

Arduino / C: replace modifies all occurrences in the existing object.

Arduino / C✓ Tested
PostgresWindows & text

Replace all matching text

Normalize repeated whitespace with a regular expression.

regexp_replace✓ Tested
CFile positioning & lifecycle

Replace bytes at a known position in a binary file

C: Open in update mode and seek before writing a fixed-size replacement.

C✓ Tested
PowerShellText & data

Replace repeated whitespace

Normalize runs of whitespace to one space.

regex✓ Tested
Arduino / CSensor calculations

Represent a decimal quantity with a scaled integer

Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.

Arduino / C✓ Tested
Arduino / CGetting Started

Represent an enabled state

Arduino / C: Represent an enabled state on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Require every bit in a mask

Arduino / C: Masking followed by equality tests whether all required flags are set.

Arduino / C✓ Tested
Arduino / CGetting Started

Reuse an LED action with a function

Arduino / C: Put a short LED sequence in a named function and call it twice.

Arduino / C✓ Tested
CNumeric parsing & arithmetic

Round a halfway floating-point value

C: The C round function rounds halfway cases away from zero.

C✓ Tested