FIND YOUR NEXT FEW LINES

Results for “all”

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

1115 snippets foundClear filters
PythonStructured data & serialization

Read elements from trusted XML

Python: Use ElementTree to inspect a small trusted XML document.

Python✓ Tested
C++Getting Started

Read one character from ASCII text

C++: Use a valid zero-based index to read the first character.

C++✓ Tested
CGetting Started

Read one character from ASCII text

C: Use a valid zero-based index to read the first character.

C✓ Tested
Docker / ComposeContainer commands

Read output from a completed container

Retrieve the stdout captured by Docker.

logs✓ Tested
Bash ScriptsGetting Started

Read part of a shell string

Bash Scripts: Read part of a shell string with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Read positional parameters in a function

Bash Scripts: Read positional parameters in a function with a small standalone Bash program.

Bash Scripts✓ Tested
CFiles

Read text in bounded chunks

Read a C text file with fgets and a fixed buffer.

C✓ Tested
C++Getting Started

Read the beginning of a text value

C++: Extract or display the first three ASCII characters from a known nonempty string.

C++✓ Tested
CGetting Started

Read the beginning of a text value

C: Extract or display the first three ASCII characters from a known nonempty string.

C✓ Tested
C++Filesystem operations

Read the byte size of a regular file

C++: file_size reads filesystem metadata without loading file contents.

C++✓ Tested
Bash ScriptsGetting Started

Read the first array element

Bash Scripts: Read the first array element with a small standalone Bash program.

Bash Scripts✓ Tested
C++Getting Started

Read the first collection element

C++: Access index zero only after establishing that the collection is nonempty.

C++✓ Tested