FIND YOUR NEXT FEW LINES

Results for “Arrays & embedded state”

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

517 snippets foundClear filters
SQLReporting & grouped calculations

Return zero for a sum over no rows

SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Return zero for a sum over no rows

SQL Server: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Return zero for a sum over no rows

Postgres: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Return zero for a sum over no rows

SQLite: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQLite✓ Tested
CSSInteraction & themes

Reuse colors with custom properties

Define a CSS custom property and use it for text color.

CSS✓ Tested
CArrays

Reverse an array in place

Swap C array elements from opposite ends.

C✓ Tested
jQueryHTTP requests

Run cleanup after an AJAX failure

jQuery: always runs on success or failure and can clear loading state.

jQuery✓ Tested
CSSResponsive design

Scale text within limits

Use CSS clamp to bound responsive font sizing.

CSS✓ Tested
CSSResponsive design

Scroll wide code locally

Keep long code inside a horizontally scrollable CSS container.

CSS✓ Tested
SQLText cleanup & matching

Search for a literal LIKE wildcard

SQL: Declare an escape character so a percent sign in the pattern is literal.

SQL✓ Tested
SQL ServerText cleanup & matching

Search for a literal LIKE wildcard

SQL Server: Declare an escape character so a percent sign in the pattern is literal.

SQL Server✓ Tested
PostgresText cleanup & matching

Search for a literal LIKE wildcard

Postgres: Declare an escape character so a percent sign in the pattern is literal.

Postgres✓ Tested