FIND YOUR NEXT FEW LINES

Results for “value”

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

670 snippets foundClear filters
SQLiteDates & time

Calculate whole days between dates

Subtract Julian day values for date-only inputs.

julianday✓ Tested
PowerShellCommands & execution context

Capture a command’s success-stream output

PowerShell: Assignment collects output values without requiring text redirection to a file.

PowerShell✓ Tested
Arduino / CGetting Started

Change an LED delay with a variable

Arduino / C: Assign a new value to a variable to change the next LED pulse duration.

Arduino / C✓ Tested
C++Numeric parsing & calculations

Check an upper integer bound before adding

C++: For these nonnegative values, compare against the maximum minus the addend first.

C++✓ Tested
JavaScriptArray traversal & selection

Check array membership with includes

JavaScript: includes uses SameValueZero comparison, which also matches NaN.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Check array membership with includes

TypeScript: includes uses SameValueZero comparison, which also matches NaN.

TypeScript✓ Tested
PowerShellHashtables & object records

Check for a hashtable key before reading it

PowerShell: ContainsKey distinguishes a missing key from a key whose value happens to be null.

PowerShell✓ Tested
PostgresJSON & arrays

Check JSONB containment

Test whether an object contains a key-value pair.

jsonb✓ Tested
C++Tasks & synchronization

Check whether a future is ready without blocking

C++: A zero-duration wait reports timeout until the producer sets a value.

C++✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check whether a variable exists under nounset

Bash Scripts: The plus expansion distinguishes an unset variable without reading its missing value.

Bash Scripts✓ Tested
Bash ScriptsLoops & decisions

Check whether input is a nonnegative integer

Reject empty input and nonnumeric characters before arithmetic.

validation✓ Tested
PowerShellFunctions & control

Choose an action with switch

Map a small command value to a result.

switch✓ Tested