Results for “du”
Small, practical examples. Search by task or narrow things down below.
Extract the text after the last delimiter
TypeScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.
TypeScript✓ Tested
Filter a selection
Reduce a jQuery selection to elements with a matching class.
jQuery✓ Tested
Filter aggregate groups
Keep only categories with multiple products.
HAVING✓ 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
Find matching files recursively
Python: Use rglob and sorted relative paths for a reproducible recursive file listing.
Python✓ Tested
Find members absent from another set
TypeScript: Negate a membership test to calculate the set difference.
TypeScript✓ Tested
Find rows shared by two query results
SQL: INTERSECT compares complete selected rows and removes duplicates.
SQL✓ Tested
Find rows shared by two query results
SQL Server: INTERSECT compares complete selected rows and removes duplicates.
SQL Server✓ Tested
Find rows shared by two query results
Postgres: INTERSECT compares complete selected rows and removes duplicates.
Postgres✓ Tested
Find rows shared by two query results
SQLite: INTERSECT compares complete selected rows and removes duplicates.
SQLite✓ Tested
Find rows with a related record
Use EXISTS without duplicating the outer rows.
EXISTS✓ Tested