Results for “pre”
Small, practical examples. Search by task or narrow things down below.
Exclude files from the build context
Docker / Compose: A dockerignore file prevents selected local files from being copied.
Docker / Compose✓ Tested
Extract a basename without an external process
Bash Scripts: Double hash removes the longest matching prefix ending in a slash.
Bash Scripts✓ Tested
Extract the text after the last delimiter
JavaScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.
JavaScript✓ Tested
Extract the text after the last delimiter
TypeScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.
TypeScript✓ Tested
Filter aggregate groups
Keep only categories with multiple products.
HAVING✓ Tested
Find a value in a small lookup table
Arduino / C: A linear scan is simple and predictable for a small fixed array.
Arduino / C✓ Tested
Find commits by message
Search commit subjects and bodies for a phrase.
log✓ Tested
Find empty regular files
Linux Commands: Use the empty predicate with a file type constraint.
Linux Commands✓ Tested
Find lines common to two sorted files
Linux Commands: Use comm -12 to suppress the two columns of unmatched lines.
Linux Commands✓ Tested
Find matching files recursively
PowerShell: Select files explicitly and sort their names for predictable presentation.
PowerShell✓ Tested
Find sorted set members missing from another set
C++: set_difference writes elements present in the first sorted input but absent from the second.
C++✓ Tested
Find the final day of a month
JavaScript: Day zero of the following UTC month selects the previous month’s final day.
JavaScript✓ Tested