FIND YOUR NEXT FEW LINES

Results for “library”

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

653 snippets foundClear filters
RustTesting & reusable patterns

Read bytes through an in-memory cursor

Read bytes through an in-memory cursor in a complete Rust program using the standard library.

Rust✓ Tested
PythonFile operations & archives

Read compressed text directly

Python: Open gzip data in text mode with an explicit encoding.

Python✓ Tested
PythonJSON & CSV

Read CSV rows as dictionaries

Read a CSV file using its header row as dictionary keys, so each column can be accessed by name.

csv✓ Tested
PythonStructured data & serialization

Read elements from trusted XML

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

Python✓ Tested
RustFiles & paths

Read file metadata without reading its contents

Read file metadata without reading its contents in a complete Rust program using the standard library.

Rust✓ Tested
GoFiles & paths

Read from an in-memory filesystem

Read from an in-memory filesystem using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonGetting Started

Read one character from ASCII text

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

Python✓ Tested
JavaGetting Started

Read one character from ASCII text

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

Java✓ Tested
PythonStructured data & serialization

Read one JSON document per line

Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.

Python✓ Tested
GoJSON & encoding

Read quoted CSV fields

Read quoted CSV fields using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Read slice indices and values

Read slice indices and values using a complete Go program with explicit sample inputs.

Go✓ Tested
CFiles

Read text in bounded chunks

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

C✓ Tested