FIND YOUR NEXT FEW LINES

Results for “integer”

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

114 snippets foundClear filters
JavaScriptArray restructuring

Generate a bounded integer range

JavaScript: Array.from supplies each output position to its mapping function.

JavaScript✓ Tested
TypeScriptArray restructuring

Generate a bounded integer range

TypeScript: Array.from supplies each output position to its mapping function.

TypeScript✓ Tested
C++Numeric parsing & calculations

Handle a failed string-to-integer conversion

C++: stoi throws invalid_argument when no conversion can be performed.

C++✓ Tested
RustErrors & optional values

Handle integer overflow without panicking

Handle integer overflow without panicking in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsGetting Started

Increase an integer variable

Bash Scripts: Increase an integer variable with a small standalone Bash program.

Bash Scripts✓ Tested
PythonStructured data & serialization

Pack and unpack a network-order integer

Python: Use an explicit byte order so the binary format is independent of the host architecture.

Python✓ Tested
C++Numeric parsing & calculations

Parse a complete integer without exceptions

C++: from_chars reports both an error code and the first unconsumed character.

C++✓ Tested
RustParsing & byte data

Parse a delimited integer record

Parse a delimited integer record in a complete Rust program using the standard library.

Rust✓ Tested
PowerShellDates & numeric validation

Parse a hexadecimal integer

PowerShell: Convert.ToInt32 accepts an explicit base for a validated hexadecimal string.

PowerShell✓ Tested
RustParsing & byte data

Parse a hexadecimal integer

Parse a hexadecimal integer in a complete Rust program using the standard library.

Rust✓ Tested
C++Numeric parsing & calculations

Parse a hexadecimal integer with from_chars

C++: An explicit radix controls digit interpretation without a locale dependency.

C++✓ Tested
RustParsing & byte data

Parse a signed decimal integer

Parse a signed decimal integer in a complete Rust program using the standard library.

Rust✓ Tested