FIND YOUR NEXT FEW LINES

Results for “read-only”

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

990 snippets foundClear filters
C++Tasks & synchronization

Pass an argument into a worker thread

C++: Thread arguments are copied by default; std::ref explicitly passes a reference.

C++✓ Tested
Linux CommandsSorting & joining records

Print only duplicate values

Linux Commands: Use uniq -d after sorting to report each repeated value once.

Linux Commands✓ Tested
Linux CommandsSearching text

Print only the matching portions

Linux Commands: Use extended regex and -o to extract digit sequences.

Linux Commands✓ Tested
Arduino / CEEPROM & program memory

Read 16-bit values from a flash table

Arduino / C: pgm_read_word retrieves a complete word from program memory.

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
Arduino / CGetting Started

Read a button in the Serial Monitor

Arduino / C: Use a pull-up input and if/else to report three button readings.

Arduino / C✓ Tested
Arduino / CDigital input & output

Read a button with the internal pull-up

Treat a grounded input as a pressed button.

INPUT_PULLUP✓ 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
Linux CommandsStreams & byte tools

Read a byte suffix

Linux Commands: Use GNU tail -c to extract a fixed-size ending.

Linux Commands✓ Tested
PowerShellGetting Started

Read a collection element

PowerShell: Read a collection element using PowerShell 7.

PowerShell✓ Tested
Docker / ComposeGetting Started

Read a completed example’s output

Docker / Compose: Read a completed example’s output using a locally available Ubuntu image.

Docker / Compose✓ Tested