FIND YOUR NEXT FEW LINES

Results for “one-off”

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

621 snippets foundClear filters
GitStashing selected work

Stash edits to one chosen file

Git: A pathspec limits the stash to selected paths while other changes remain in the working tree.

Git✓ Tested
GitBranches & ancestry

Test whether one revision is an ancestor of another

Git: merge-base --is-ancestor reports its answer through the exit status.

Git✓ Tested
AngularLifecycle & observable data

Tie a subscription’s lifetime to its component

Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Toggle a CSS class from component state

Toggle a CSS class from component state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactState & reducers

Update one array item by its identifier

Update one array item by its identifier with a small React component and explicit browser behavior.

React✓ Tested
SQLChange & combine data

Update one matching row

Change a value with an explicit filter.

UPDATE✓ Tested
SQLGetting Started

Update one row using its primary key

SQL: Use a precise WHERE condition to change only the intended row in a scratch table.

SQL✓ Tested
SQL ServerGetting Started

Update one row using its primary key

SQL Server: Use a precise WHERE condition to change only the intended row in a scratch table.

SQL Server✓ Tested
PostgresGetting Started

Update one row using its primary key

Postgres: Use a precise WHERE condition to change only the intended row in a scratch table.

Postgres✓ Tested
SQLiteGetting Started

Update one row using its primary key

SQLite: Use a precise WHERE condition to change only the intended row in a scratch table.

SQLite✓ Tested
SQLBulk changes & set operations

Update several classifications in one statement

SQL: A CASE expression computes the new value for each row covered by the update predicate.

SQL✓ Tested
SQL ServerBulk changes & set operations

Update several classifications in one statement

SQL Server: A CASE expression computes the new value for each row covered by the update predicate.

SQL Server✓ Tested