FIND YOUR NEXT FEW LINES

Results for “value”

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

670 snippets foundClear filters
C#Dates & precise numbers

Clamp a number to inclusive bounds

C#: Math.Clamp returns the nearest endpoint when the value lies outside the range.

C#✓ Tested
PowerShellDates & numeric validation

Clamp a number to inclusive bounds

PowerShell: Math.Clamp chooses the nearest endpoint for an out-of-range value.

PowerShell✓ Tested
jQueryForm serialization & state

Collect repeated form field names

jQuery: serializeArray preserves multiple values as name-value records.

jQuery✓ Tested
C#Collections & data structures

Combine collections as a distinct set

C#: Union retains each value once across both inputs.

C#✓ Tested
SQLJoins & subqueries

Combine matching rows with INNER JOIN

Read product names with their matching stock values.

INNER JOIN✓ Tested
SQLSubqueries & ranked selection

Compare a row with its own group average

SQL: A correlated aggregate computes a different comparison value for each group.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Compare a row with its own group average

SQL Server: A correlated aggregate computes a different comparison value for each group.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Compare a row with its own group average

Postgres: A correlated aggregate computes a different comparison value for each group.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Compare a row with its own group average

SQLite: A correlated aggregate computes a different comparison value for each group.

SQLite✓ Tested
PostgresWindows & text

Compare a row with the previous row

Read a preceding value with LAG.

LAG✓ Tested
JavaScriptNumbers & numeric validation

Compare bounded floating-point results with a tolerance

JavaScript: Use an absolute error threshold for values known to be near one.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Compare bounded floating-point results with a tolerance

TypeScript: Use an absolute error threshold for values known to be near one.

TypeScript✓ Tested