FIND YOUR NEXT FEW LINES

Results for “byte”

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

114 snippets foundClear filters
Arduino / CGetting Started

Inspect a byte as hexadecimal

Arduino / C: Inspect a byte as hexadecimal on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CSerial protocols

Inspect a byte without consuming it

Arduino / C: peek leaves the next byte available for a later read.

Arduino / C✓ Tested
Linux CommandsStreams & byte tools

Inspect bytes as hexadecimal values

Linux Commands: Use od with explicit formatting and no address column.

Linux Commands✓ Tested
GoTesting & reusable helpers

Limit the bytes read from a stream

Limit the bytes read from a stream using a complete Go program with explicit sample inputs.

Go✓ Tested
C#JSON & binary formats

Measure the byte length of UTF-8 text

C#: Character count and encoded byte count can differ for non-ASCII text.

C#✓ Tested
JavaEncoding & structured values

Measure UTF-8 bytes separately from characters

Java: Encode a Java string before measuring its serialized byte length.

Java✓ Tested
CStrings & byte buffers

Move overlapping bytes safely

C: memmove supports overlapping ranges, unlike memcpy.

C✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / 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 / CEEPROM & program memory

Read a byte lookup table from flash

Arduino / C: PROGMEM tables require the AVR program-memory access functions.

Arduino / C✓ Tested
Linux CommandsStreams & byte tools

Read a byte prefix

Linux Commands: Use GNU head -c for a fixed number of bytes, independent of line boundaries.

Linux Commands✓ Tested