Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Count down with a while loop
Bash Scripts: Count down with a while loop with a small standalone Bash program.
Bash Scripts✓ Tested
Count five LED flashes with a for loop
Arduino / C: Repeat an LED action a known number of times and print the current count.
Arduino / C✓ Tested
Count rows satisfying separate conditions
SQL: SUM over CASE expressions calculates several conditional counts in one scan.
SQL✓ Tested
Count rows satisfying separate conditions
SQL Server: SUM over CASE expressions calculates several conditional counts in one scan.
SQL Server✓ Tested
Count rows satisfying separate conditions
Postgres: SUM over CASE expressions calculates several conditional counts in one scan.
Postgres✓ Tested
Count rows satisfying separate conditions
SQLite: SUM over CASE expressions calculates several conditional counts in one scan.
SQLite✓ Tested
Count set bits in an unsigned integer
C: Clearing the lowest set bit on each iteration counts only one iteration per set bit.
C✓ Tested
Count Unicode code points
Java: Use codePointCount when supplementary characters should count as one rather than two UTF-16 units.
Java✓ Tested
Create a dependency with a provider factory
Create a dependency with a provider factory with a standalone Angular component and explicit browser behavior.
Angular✓ 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 table and insert its first row
SQL: Define column types and a primary key, then insert one row using an explicit column list.
SQL✓ Tested
Create a table and insert its first row
SQL Server: Define column types and a primary key, then insert one row using an explicit column list.
SQL Server✓ Tested