Results for “Testing & reusable helpers”
Small, practical examples. Search by task or narrow things down below.
Find parents with at least two child rows
SQL Server: Use a correlated count when testing a per-parent threshold.
SQL Server✓ Tested
Find parents with at least two child rows
Postgres: Use a correlated count when testing a per-parent threshold.
Postgres✓ Tested
Find parents with at least two child rows
SQLite: Use a correlated count when testing a per-parent threshold.
SQLite✓ Tested
Find the mean and median of readings
Python: Use statistics helpers to distinguish an arithmetic mean from a middle value.
Python✓ Tested
Name an intermediate query with a CTE
Make a filtered result reusable within one statement.
CTE✓ Tested
Pass named parameters from a hashtable
Keep a command’s options together in a reusable object.
splatting✓ Tested
Read a filename stem and extension
C#: Use Path helpers instead of splitting a path on dots or directory separators.
C#✓ Tested
Stash unstaged work while leaving staged edits available
Git: Keep-index preserves the staged state for testing or committing while stashing the rest.
Git✓ Tested