Results for “value”
Small, practical examples. Search by task or narrow things down below.
Calculate whole days between dates
Subtract Julian day values for date-only inputs.
julianday✓ Tested
Capture a command’s success-stream output
PowerShell: Assignment collects output values without requiring text redirection to a file.
PowerShell✓ Tested
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
Check an upper integer bound before adding
C++: For these nonnegative values, compare against the maximum minus the addend first.
C++✓ Tested
Check array membership with includes
JavaScript: includes uses SameValueZero comparison, which also matches NaN.
JavaScript✓ Tested
Check array membership with includes
TypeScript: includes uses SameValueZero comparison, which also matches NaN.
TypeScript✓ Tested
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
Check JSONB containment
Test whether an object contains a key-value pair.
jsonb✓ Tested
Check whether a future is ready without blocking
C++: A zero-duration wait reports timeout until the producer sets a value.
C++✓ Tested
Check whether a variable exists under nounset
Bash Scripts: The plus expansion distinguishes an unset variable without reading its missing value.
Bash Scripts✓ Tested
Check whether input is a nonnegative integer
Reject empty input and nonnumeric characters before arithmetic.
validation✓ Tested
Choose an action with switch
Map a small command value to a result.
switch✓ Tested