Results for “int”
Small, practical examples. Search by task or narrow things down below.
Check whether a floating-point value is finite
Check whether a floating-point value is finite in a complete Rust program using the standard library.
Rust✓ Tested
Check whether a value is a safe integer
JavaScript: Number.isSafeInteger also checks the exact-integer range supported by Number.
JavaScript✓ Tested
Check whether a value is a safe integer
TypeScript: Number.isSafeInteger also checks the exact-integer range supported by Number.
TypeScript✓ Tested
Check whether input is a nonnegative integer
Reject empty input and nonnumeric characters before arithmetic.
validation✓ Tested
Choose a service’s internal hostname
Docker / Compose: hostname controls the name reported inside the container.
Docker / Compose✓ Tested
Choose floating-point arithmetic
Choose floating-point arithmetic in a complete Rust program using the standard library.
Rust✓ Tested
Choose floating-point division
Choose floating-point division using a complete Go program with explicit sample inputs.
Go✓ Tested
Choose which overlapping box receives a pointer
CSS: Z-index controls the stack level of these positioned sibling elements.
CSS✓ Tested
Clamp a number to a valid interval
Clamp a number to a valid interval in a complete Rust program using the standard library.
Rust✓ Tested
Clamp a value to an allowed interval
Clamp a value to an allowed interval using a complete Go program with explicit sample inputs.
Go✓ Tested
Clamp an integer to inclusive bounds
C: Explicit comparisons avoid relying on nonstandard min or max macros.
C✓ Tested
Clear an owning pointer after releasing its allocation
C: Assigning NULL helps prevent accidental reuse through the same variable.
C✓ Tested