FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
ReactAsync work & status

Ignore a result after its effect is cleaned up

Ignore a result after its effect is cleaned up with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsGetting Started

Increase an integer variable

Bash Scripts: Increase an integer variable with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsText parsing & arithmetic

Increment a counter without an unexpected errexit

Bash Scripts: An assignment avoids the zero-result exit status of a standalone arithmetic post-increment.

Bash Scripts✓ Tested
ReactState & reducers

Initialize state lazily

Initialize state lazily with a small React component and explicit browser behavior.

React✓ Tested
PowerShellCommands & execution context

Inspect a URI through typed properties

PowerShell: The Uri class separates URL components without manual string splitting.

PowerShell✓ Tested
AngularPipes & formatting

Inspect structured data with JsonPipe

Inspect structured data with JsonPipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
C++Text validation & parsing

Iterate over all regular-expression matches

C++: A regex iterator yields successive matches without manually updating an offset.

C++✓ Tested
SQLRelationships & missing data

Join a parent to pre-aggregated totals

SQL: Aggregate the child rows first to produce at most one joined row per parent.

SQL✓ Tested
SQL ServerRelationships & missing data

Join a parent to pre-aggregated totals

SQL Server: Aggregate the child rows first to produce at most one joined row per parent.

SQL Server✓ Tested
PostgresRelationships & missing data

Join a parent to pre-aggregated totals

Postgres: Aggregate the child rows first to produce at most one joined row per parent.

Postgres✓ Tested
SQLiteRelationships & missing data

Join a parent to pre-aggregated totals

SQLite: Aggregate the child rows first to produce at most one joined row per parent.

SQLite✓ Tested
PowerShellStrings & literal text

Join several strings with a separator

PowerShell: The join operator returns one string from an input collection.

PowerShell✓ Tested