Results for “id”
Small, practical examples. Search by task or narrow things down below.
Return zero for a sum over no rows
SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL✓ Tested
Return zero for a sum over no rows
SQL Server: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL Server✓ Tested
Return zero for a sum over no rows
Postgres: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
Postgres✓ Tested
Return zero for a sum over no rows
SQLite: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQLite✓ Tested
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
Rotate a rectangular box around its center
CSS: A ninety-degree transform swaps the visible bounding-box width and height.
CSS✓ Tested
Rotate a sequence around a selected position
C++: rotate places the element at the middle iterator first while preserving the two segment orders.
C++✓ Tested
Round a decimal with an explicit rule
Java: Construct BigDecimal from text to avoid importing a binary floating-point approximation.
Java✓ Tested
Run a command in a running container
Execute an additional process inside an existing container.
exec✓ Tested
Run a Compose service as a non-root user
Docker / Compose: user overrides the image’s default identity.
Docker / Compose✓ Tested
Run a first sketch and read serial output
Arduino / C: Run a first sketch and read serial output on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Run an event handler once
Use jQuery one for a handler that removes itself after the first event.
jQuery✓ Tested