FIND YOUR NEXT FEW LINES

Results for “Lifecycle & observable data”

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

639 snippets foundClear filters
RustParsing & byte data

Parse a hexadecimal integer

Parse a hexadecimal integer in a complete Rust program using the standard library.

Rust✓ Tested
RustParsing & byte data

Parse a signed decimal integer

Parse a signed decimal integer in a complete Rust program using the standard library.

Rust✓ Tested
PythonStructured data & serialization

Parse quoted CSV from an in-memory string

Python: Use StringIO with csv.reader so quoted commas are handled correctly.

Python✓ Tested
C#Collections & data structures

Process a FIFO queue

C#: Queue removes elements in the order they were enqueued.

C#✓ Tested
JavaFile operations & binary data

Process a text file one line at a time

Java: Use a buffered reader to avoid loading a large file into memory.

Java✓ Tested
C#Collections & data structures

Process items by numeric priority

C#: PriorityQueue removes the item with the smallest priority value first.

C#✓ Tested
PythonStructured data & serialization

Produce compact deterministic JSON

Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.

Python✓ Tested
HTMLMetadata & document links

Provide a concise page description

HTML: A description meta element summarizes a document for clients that use that metadata.

HTML✓ Tested
JavaFile operations & binary data

Read a file length in bytes

Java: Files.size inspects metadata without loading the file into a Java string.

Java✓ 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
PythonStructured data & serialization

Read a small INI configuration

Python: Use ConfigParser typed accessors for configuration values stored as text.

Python✓ Tested
CFile positioning & lifecycle

Read a stream again from its beginning

C: rewind returns a seekable stream to offset zero and clears its error and EOF indicators.

C✓ Tested