FIND YOUR NEXT FEW LINES

Results for “first”

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

145 snippets foundClear filters
SQLExpressions & aggregates

Replace NULL in a result

Choose a fallback for a missing value.

COALESCE✓ Tested
CArray transformations

Rotate a nonempty array left by one element

C: Save the first item before shifting the remaining elements.

C✓ Tested
C++Sequence algorithms

Rotate a sequence around a selected position

C++: rotate places the element at the middle iterator first while preserving the two segment orders.

C++✓ Tested
jQueryEvents

Run an event handler once

Use jQuery one for a handler that removes itself after the first event.

jQuery✓ Tested
Docker / ComposeStorage & isolation

Share data through a named volume

Keep a file across two short-lived containers.

volume✓ Tested
SQL ServerSelect & page

Substitute a value for NULL

Use SQL Server’s ISNULL expression.

ISNULL✓ Tested
C++Text validation & parsing

Trim surrounding ASCII whitespace

C++: Find the first and last non-whitespace bytes before taking a substring.

C++✓ Tested
SQLSchema design & transactions

Undo a multi-row transfer atomically

SQL: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.

SQL✓ Tested
SQL ServerSchema design & transactions

Undo a multi-row transfer atomically

SQL Server: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.

SQL Server✓ Tested
PostgresSchema design & transactions

Undo a multi-row transfer atomically

Postgres: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.

Postgres✓ Tested
SQLiteSchema design & transactions

Undo a multi-row transfer atomically

SQLite: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.

SQLite✓ Tested
JavaQueues & collection operations

Use a deque as a stack

Java: Use push and pop for last-in, first-out behavior.

Java✓ Tested