FIND YOUR NEXT FEW LINES

Results for “on”

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

3000 snippets foundClear filters
PostgresReporting & grouped calculations

Compute an integer weighted average

Postgres: Multiply before summing and guard a zero total weight with NULLIF.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Compute an integer weighted average

SQLite: Multiply before summing and guard a zero total weight with NULLIF.

SQLite✓ Tested
PowerShellDates & numeric validation

Compute beyond the fixed-width integer range

PowerShell: BigInteger keeps an exact result when ordinary integer types are too small.

PowerShell✓ Tested
JavaScriptArray restructuring

Concatenate arrays without mutating either input

JavaScript: concat creates a shallow combined sequence.

JavaScript✓ Tested
TypeScriptArray restructuring

Concatenate arrays without mutating either input

TypeScript: concat creates a shallow combined sequence.

TypeScript✓ Tested
Docker / ComposeLimits & process security

Configure bounded retries after a failure

Docker / Compose: on-failure with a count limits automatic restart attempts.

Docker / Compose✓ Tested
Docker / ComposeLimits & process security

Confirm the root filesystem rejects writes

Docker / Compose: A read-only root prevents creating files outside writable mounts.

Docker / Compose✓ Tested
ReactComponents & props

Connect a reusable label using useId

Connect a reusable label using useId with a small React component and explicit browser behavior.

React✓ Tested
ReactAccessibility & events

Connect an invalid field to its explanation

Connect an invalid field to its explanation with a small React component and explicit browser behavior.

React✓ Tested
HTMLInput constraints

Constrain a calendar date input

HTML: Use ISO date values for the date control’s minimum and maximum.

HTML✓ Tested
CSSLayout

Constrain and center a container

Use max-width and auto margins for a centered CSS reading area.

CSS✓ Tested
JavaScriptUTC date operations

Construct a date from Unix seconds

JavaScript: Multiply seconds by 1000 before creating a Date.

JavaScript✓ Tested