FIND YOUR NEXT FEW LINES

Results for “when”

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

230 snippets foundClear filters
SQL ServerGetting Started

Remove duplicate result values

SQL Server: Use DISTINCT when repeated category values are not useful.

SQL Server✓ Tested
PostgresGetting Started

Remove duplicate result values

Postgres: Use DISTINCT when repeated category values are not useful.

Postgres✓ Tested
SQLiteGetting Started

Remove duplicate result values

SQLite: Use DISTINCT when repeated category values are not useful.

SQLite✓ Tested
C++Filesystem operations

Rename a known file through filesystem

C++: filesystem::rename reports an error by exception when the operation fails.

C++✓ Tested
Arduino / CTiming & control

Repeat an action a fixed number of times

Use a counter and delay for a simple finite sequence.

for loop✓ Tested
SQLExpressions & aggregates

Replace NULL in a result

Choose a fallback for a missing value.

COALESCE✓ Tested
GitMerging & replaying changes

Replay an unpublished branch on a newer base

Git: Rebase updates the base of local feature commits when their changes do not conflict.

Git✓ Tested
HTMLInput constraints

Require numeric values on a chosen step

HTML: The step interval is measured from the minimum value when one is provided.

HTML✓ Tested
C#Asynchronous work & URI handling

Resolve a relative URI against a base

C#: Use a base URI ending in a slash when the final path component represents a directory.

C#✓ Tested
CSSInteraction & themes

Respect dark color preference

Apply different CSS colors when the browser requests a dark theme.

CSS✓ Tested
CSSInteraction & themes

Respect reduced motion

Disable a CSS animation when the user prefers reduced motion.

CSS✓ Tested
GitRestoring & revising local work

Restore a file’s content from an older commit

Git: Specify a source revision when the desired contents are not in the current index.

Git✓ Tested