Results for “z”
Small, practical examples. Search by task or narrow things down below.
Compare two C strings for equality
C: strcmp returns zero only when both null-terminated byte strings are equal.
C✓ Tested
Compute an integer weighted average
SQL: Multiply before summing and guard a zero total weight with NULLIF.
SQL✓ Tested
Compute an integer weighted average
SQL Server: Multiply before summing and guard a zero total weight with NULLIF.
SQL Server✓ Tested
Compute an integer weighted average
Postgres: Multiply before summing and guard a zero total weight with NULLIF.
Postgres✓ Tested
Compute an integer weighted average
SQLite: Multiply before summing and guard a zero total weight with NULLIF.
SQLite✓ Tested
Control an LED from a button
Translate an active-low button input into an LED output.
button✓ Tested
Control tab width in preformatted content
CSS: Tab-size defines the interval of tab stops in a preformatted block.
CSS✓ Tested
Convert a supplied ADC count to volts
Arduino / C: Scale a ten-bit ADC count using an explicit reference voltage.
Arduino / C✓ Tested
Convert Celsius to Fahrenheit
Arduino / C: Use floating-point constants to avoid integer division.
Arduino / C✓ Tested
Convert received ASCII letters to uppercase
Arduino / C: ctype functions should receive an unsigned character value.
Arduino / C✓ Tested
Copy a flash string into a bounded RAM buffer
Arduino / C: strncpy_P reads from program memory into ordinary RAM.
Arduino / C✓ Tested
Copy a multibyte interrupt-owned counter atomically
Arduino / C: ATOMIC_RESTORESTATE restores the interrupt state after reading a shared value.
Arduino / C✓ Tested