FIND YOUR NEXT FEW LINES

Results for “as”

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

2533 snippets foundClear filters
CNumeric parsing & arithmetic

Compute a two-dimensional vector length

C: hypot avoids unnecessary intermediate overflow compared with squaring both inputs directly.

C✓ Tested
SQLReporting & grouped calculations

Compute an integer weighted average

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

SQL✓ Tested
SQL ServerReporting & grouped calculations

Compute an integer weighted average

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

SQL Server✓ Tested
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
TypeScriptArray restructuring

Concatenate arrays without mutating either input

TypeScript: concat creates a shallow combined sequence.

TypeScript✓ 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
TypeScriptUTC date operations

Construct a date from Unix seconds

TypeScript: Multiply seconds by 1000 before creating a Date.

TypeScript✓ Tested
RustGetting Started

Construct a named-field struct

Construct a named-field struct in a complete Rust program using the standard library.

Rust✓ Tested
RustFunctions & data types

Construct a struct with default values

Construct a struct with default values in a complete Rust program using the standard library.

Rust✓ Tested