FIND YOUR NEXT FEW LINES

Results for “when”

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

230 snippets foundClear filters
PostgresSubqueries & ranked selection

Include missing values in a not-equal filter

Postgres: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Include missing values in a not-equal filter

SQLite: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.

SQLite✓ Tested
C++Tasks & synchronization

Increment a shared counter safely

C++: Atomic increments prevent lost updates when two threads change the same counter.

C++✓ Tested
SQLChange & combine data

Insert a row with named columns

Add a record without relying on implicit column order.

INSERT✓ Tested
PythonMappings & sets

Invert a dictionary with unique values

Python: Swap keys and values when the values are hashable and unique.

Python✓ Tested
SQLRelationships & missing data

Join through a lookup table

SQL: Use explicit aliases and join keys when enriching records through two relationships.

SQL✓ Tested
SQL ServerRelationships & missing data

Join through a lookup table

SQL Server: Use explicit aliases and join keys when enriching records through two relationships.

SQL Server✓ Tested
PostgresRelationships & missing data

Join through a lookup table

Postgres: Use explicit aliases and join keys when enriching records through two relationships.

Postgres✓ Tested
SQLiteRelationships & missing data

Join through a lookup table

SQLite: Use explicit aliases and join keys when enriching records through two relationships.

SQLite✓ Tested
CSSPositioning & stacking

Keep a control fixed to the viewport during scrolling

CSS: Fixed positioning normally uses the viewport when no ancestor establishes a different fixed containing block.

CSS✓ Tested
Arduino / CArrays & embedded state

Keep a counter from wrapping at its maximum

Arduino / C: Increment only when the value is below its limit.

Arduino / C✓ Tested
JavaScriptArray restructuring

Keep both matching and rejected values

JavaScript: Use two explicit outputs when a caller needs both sides of a classification.

JavaScript✓ Tested