FIND YOUR NEXT FEW LINES

Results for “tr”

Small, practical examples. Search by task or narrow things down below.

1534 snippets foundClear filters
TypeScriptArray traversal & selection

Check array membership with includes

TypeScript: includes uses SameValueZero comparison, which also matches NaN.

TypeScript✓ Tested
JavaScriptArray traversal & selection

Check whether any item matches

JavaScript: some stops once a predicate succeeds.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Check whether any item matches

TypeScript: some stops once a predicate succeeds.

TypeScript✓ Tested
JavaScriptArray traversal & selection

Check whether every item matches

JavaScript: every stops at the first failed predicate and returns true for an empty array.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Check whether every item matches

TypeScript: every stops at the first failed predicate and returns true for an empty array.

TypeScript✓ Tested
Bash ScriptsFiles & reliability

Clean up a temporary directory automatically

Use an EXIT trap so temporary files are removed when the script ends.

mktemp✓ Tested
Linux CommandsTransforming text

Collapse repeated spaces

Linux Commands: Use tr -s when repeated occurrences of a character should become one.

Linux Commands✓ Tested
jQueryTraversal & selection

Collect matching ancestors

jQuery: parents can return several ancestors, ordered from the nearest outward.

jQuery✓ Tested
C#Collections & data structures

Combine collections as a distinct set

C#: Union retains each value once across both inputs.

C#✓ Tested
SQLSchema design & transactions

Commit multiple related changes together

SQL: The first transaction prepares the fixtures. The second commits both updates as one unit.

SQL✓ Tested
SQL ServerSchema design & transactions

Commit multiple related changes together

SQL Server: The first transaction prepares the fixtures. The second commits both updates as one unit.

SQL Server✓ Tested
PostgresSchema design & transactions

Commit multiple related changes together

Postgres: The first transaction prepares the fixtures. The second commits both updates as one unit.

Postgres✓ Tested