Results for “sup”
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 controlled-input bindings
Reuse controlled-input bindings with a small React component and explicit browser behavior.
React✓ Tested
Reuse document-title synchronization
Reuse document-title synchronization with a small React component and explicit browser behavior.
React✓ Tested
Reuse event subscription cleanup
Reuse event subscription cleanup with a small React component and explicit browser behavior.
React✓ Tested
Run a command safely for each matching file
Linux Commands: Use find -exec with argument placeholders so spaces in filenames remain intact.
Linux Commands✓ Tested
Run a task on an executor and close it
Java: Java 21 ExecutorService supports try-with-resources to shut down after submitted work.
Java✓ Tested
Save a stream while displaying it
Linux Commands: Use tee to write a copy of standard input to a file.
Linux Commands✓ Tested
Schedule a one-time update with cleanup
Schedule a one-time update with cleanup with a small React component and explicit browser behavior.
React✓ Tested
Scroll a referenced element into view
Scroll a referenced element into view with a small React component and explicit browser behavior.
React✓ Tested