FIND YOUR NEXT FEW LINES

Results for “int”

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

797 snippets foundClear filters
C#JSON & binary formats

Read a big-endian binary integer

C#: Use BinaryPrimitives when the protocol byte order differs from or must not depend on the host.

C#✓ Tested
JavaEncoding & structured values

Read a big-endian integer from bytes

Java: Set a byte order explicitly when handling a binary protocol.

Java✓ Tested
GoJSON & encoding

Read a big-endian integer from bytes

Read a big-endian integer from bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CDigital input & output

Read a button with the internal pull-up

Treat a grounded input as a pressed button.

INPUT_PULLUP✓ Tested
RustParsing & byte data

Read a little-endian integer from bytes

Read a little-endian integer from bytes in a complete Rust program using the standard library.

Rust✓ Tested
Arduino / CSerial protocols

Read an integer from serial input

Arduino / C: parseInt skips leading nonnumeric characters and reads the next integer.

Arduino / C✓ Tested
Arduino / CDigital signals & interrupts

Read an unpressed button with an internal pull-up

Arduino / C: An open input configured with INPUT_PULLUP reads high.

Arduino / C✓ Tested
Bash ScriptsInput streams & redirection

Read complete lines into an array

Bash Scripts: Mapfile with -t removes each line terminator but preserves other whitespace.

Bash Scripts✓ Tested
PowerShellStructured formats & encodings

Read JSON into a hashtable

PowerShell: AsHashtable produces dictionary-style results for keys that are data rather than fixed property names.

PowerShell✓ Tested
Bash ScriptsInput streams & redirection

Read null-delimited filenames into an array

Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.

Bash Scripts✓ Tested
RustNumbers & durations

Reject a narrowing integer conversion

Reject a narrowing integer conversion in a complete Rust program using the standard library.

Rust✓ Tested
GoErrors & validation

Reject an integer outside a byte’s range

Reject an integer outside a byte’s range using a complete Go program with explicit sample inputs.

Go✓ Tested