FIND YOUR NEXT FEW LINES

Results for “each”

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

179 snippets foundClear filters
TypeScriptArray traversal & selection

Iterate with array indices and values

TypeScript: entries provides each position and value without a separate counter.

TypeScript✓ Tested
PythonStrings & dates

Join strings with a separator

Combine a list of strings into one readable string with a separator between each item.

string✓ Tested
PostgresWindows & text

Join text rows in a chosen order

Combine values using string_agg.

string_agg✓ Tested
SQLiteQueries & text

Join values with a delimiter

Concatenate rows in a specified order.

group_concat✓ Tested
CSSPositioning & stacking

Keep a section heading at a scrolling panel’s top

CSS: Sticky positioning sticks within its scroll container after reaching the specified inset.

CSS✓ Tested
GitBranches & ancestry

List branches already merged into the current branch

Git: The merged filter reports branches whose tips are reachable from HEAD.

Git✓ Tested
TypeScriptTypes & functions

Narrow a union using typeof

Handle text and numeric values with separate branches.

union✓ Tested
SQLiteQueries & text

Number a sorted result

Assign a row number without changing stored data.

row_number✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested
Linux CommandsSorting & joining records

Print only duplicate values

Linux Commands: Use uniq -d after sorting to report each repeated value once.

Linux Commands✓ Tested
Bash ScriptsLoops & decisions

Read a file without losing its last line

Handle spaces, backslashes, and a final line without a newline.

read lines✓ Tested
PostgresJSON & arrays

Read a JSONB field as text

Extract a nested value from a JSON document.

jsonb✓ Tested