Results for “Sorting & joining records”
Small, practical examples. Search by task or narrow things down below.
Use a fallback for a missing hashtable entry
PowerShell: Test the key explicitly so legitimate false or zero values are preserved.
PowerShell✓ Tested
Validate a required argument
Java: Use requireNonNull with a useful message at an API boundary.
Java✓ Tested
Collect repeated form field names
jQuery: serializeArray preserves multiple values as name-value records.
jQuery✓ Tested
Count items by group
Group repeated values and report each count.
Group-Object✓ Tested
Count words using a Map
Update a keyed counter without losing its value type.
Map✓ Tested
Declare LF normalization for a file type
Git: A gitattributes rule records text normalization expectations for matching paths.
Git✓ Tested
Delete rows selected by a related table
SQL: A correlated EXISTS limits the delete to explicitly listed records.
SQL✓ Tested
Delete rows selected by a related table
SQL Server: A correlated EXISTS limits the delete to explicitly listed records.
SQL Server✓ Tested
Delete rows selected by a related table
Postgres: A correlated EXISTS limits the delete to explicitly listed records.
Postgres✓ Tested
Delete rows selected by a related table
SQLite: A correlated EXISTS limits the delete to explicitly listed records.
SQLite✓ Tested
Filter and transform an array
Keep active objects and extract their names.
filter✓ Tested
Filter rows with WHERE
Keep products below a chosen price.
WHERE✓ Tested