Results for “all”
Small, practical examples. Search by task or narrow things down below.
Compare small floating-point results with a tolerance
C: Use an absolute difference threshold for this known bounded magnitude.
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
Count a button’s falling edge in the main loop
Arduino / C: Compare each reading with the previous state to detect transitions.
Arduino / C✓ Tested
Count a falling edge with an interrupt
Increment a counter when an external input changes.
attachInterrupt✓ Tested
Count a leading run of allowed characters
C: strspn counts bytes at the start that belong to a specified character set.
C✓ Tested
Create a small file at build time
Docker / Compose: Create a small file at build time with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Create a small pure formatting pipe
Create a small pure formatting pipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Create a small table with headers
HTML: Learn how to create a small table with headers in a complete browser example.
HTML✓ Tested
Define and call a shell function
Bash Scripts: Define and call a shell function with a small standalone Bash program.
Bash Scripts✓ Tested
Display a fallback for missing data
SQL: Return a supplied label when a column contains NULL.
SQL✓ Tested
Display a fallback for missing data
SQL Server: Return a supplied label when a column contains NULL.
SQL Server✓ Tested
Display a fallback for missing data
Postgres: Return a supplied label when a column contains NULL.
Postgres✓ Tested