FIND YOUR NEXT FEW LINES

Results for “conditional”

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

24 snippets foundClear filters
Bash ScriptsArguments & decisions

Compare a value literally inside a conditional

Bash Scripts: Quoting the right side of an equality test makes wildcard characters literal.

Bash Scripts✓ Tested
AngularGetting Started

Render a conditional branch with @if

Render a conditional branch with @if with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Choose between two render branches

Choose between two render branches with a small React component and explicit browser behavior.

React✓ Tested
SQLReporting & grouped calculations

Count rows satisfying separate conditions

SQL: SUM over CASE expressions calculates several conditional counts in one scan.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Count rows satisfying separate conditions

SQL Server: SUM over CASE expressions calculates several conditional counts in one scan.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Count rows satisfying separate conditions

Postgres: SUM over CASE expressions calculates several conditional counts in one scan.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Count rows satisfying separate conditions

SQLite: SUM over CASE expressions calculates several conditional counts in one scan.

SQLite✓ Tested
SQLExpressions & aggregates

Label rows with CASE

Derive a readable label from a condition.

CASE✓ Tested
ReactPerformance & rendering

Mount expensive content only when requested

Mount expensive content only when requested with a small React component and explicit browser behavior.

React✓ Tested
SQLReporting & grouped calculations

Turn known group values into columns

SQL: Conditional aggregation gives a portable pivot when the category set is known.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Turn known group values into columns

SQL Server: Conditional aggregation gives a portable pivot when the category set is known.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Turn known group values into columns

Postgres: Conditional aggregation gives a portable pivot when the category set is known.

Postgres✓ Tested