Results for “range”
Small, practical examples. Search by task or narrow things down below.
Arrange children with flexbox
CSS: Learn how to arrange children with flexbox in a complete browser example.
CSS✓ Tested
Calculate an integer beyond the 64-bit range
C#: Use BigInteger for arbitrary-precision integer arithmetic.
C#✓ Tested
Calculate beyond the long integer range
Java: Use BigInteger when a fixed-width primitive type would overflow.
Java✓ Tested
Calculate integers beyond Number’s precise range
JavaScript: Use BigInt operands together to avoid precision loss.
JavaScript✓ Tested
Calculate integers beyond Number’s precise range
TypeScript: Use BigInt operands together to avoid precision loss.
TypeScript✓ Tested
Check both ends of a range
Arduino / C: Check both ends of a range on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Check whether a range is already sorted
C++: is_sorted reports ordering without modifying the input.
C++✓ Tested
Choose among several numeric ranges
Bash Scripts: An if-elif chain evaluates branches in order and executes the first match.
Bash Scripts✓ Tested
Clamp a numeric setting to a valid range
Bash Scripts: Use arithmetic comparisons before applying a user-supplied bounded setting.
Bash Scripts✓ Tested
Clamp a value to a range
Use C++17 clamp to bound a numeric value.
C++✓ Tested
Compute beyond the fixed-width integer range
PowerShell: BigInteger keeps an exact result when ordinary integer types are too small.
PowerShell✓ Tested
Copy a range without changing the source
JavaScript: Array.slice returns a shallow copy of the selected half-open range.
JavaScript✓ Tested