Results for “all”
Small, practical examples. Search by task or narrow things down below.
Store and inspect a fixed set of bits
C++: bitset offers named operations and a readable binary representation.
C++✓ Tested
Store and iterate over an array
Bash Scripts: Store and iterate over an array with a small standalone Bash program.
Bash Scripts✓ Tested
Store text in a variable
Bash Scripts: Store text in a variable with a small standalone Bash program.
Bash Scripts✓ Tested
Subscribe to and clean up a window event
Subscribe to and clean up a window event with a small React component and explicit browser behavior.
React✓ Tested
Substitute a value for NULL
Use SQL Server’s ISNULL expression.
ISNULL✓ Tested
Sum a row and its immediate predecessor
SQL: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
SQL✓ Tested
Sum a row and its immediate predecessor
SQL Server: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
SQL Server✓ Tested
Sum a row and its immediate predecessor
Postgres: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
Postgres✓ Tested
Sum a row and its immediate predecessor
SQLite: A ROWS frame counts physical ordered rows rather than all peers with the same sort value.
SQLite✓ Tested
Sum array values
Iterate over a fixed C array using a size-derived element count.
C✓ Tested
Sum vector values
Use std::accumulate with a wide initial value.
C++✓ Tested
Supply a default for an unset Compose variable
Docker / Compose: The default interpolation form supplies a value when the variable is absent or empty.
Docker / Compose✓ Tested