FIND YOUR NEXT FEW LINES

Results for “File operations & binary data”

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

1473 snippets foundClear filters
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
Docker / ComposeExecution & file transfer

Pipe input into a container process

Docker / Compose: The interactive flag keeps standard input open without allocating a terminal.

Docker / Compose✓ Tested
Docker / ComposeDockerfile patterns

Prepare an owned directory before dropping root

Docker / Compose: Create and chown the writable application path before USER.

Docker / Compose✓ Tested
Bash ScriptsArray operations

Prepend items while preserving existing array values

Bash Scripts: Construct a new array with the new values before the quoted original expansion.

Bash Scripts✓ Tested
C++Ordering & set operations

Preserve equal-key order while sorting records

C++: stable_sort retains encounter order for records whose selected sort keys compare equal.

C++✓ Tested
JavaQueues & collection operations

Preserve map insertion order

Java: Use LinkedHashMap when iteration should follow the order keys were first added.

Java✓ Tested
C#Collections & data structures

Process a FIFO queue

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

C#✓ 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
Docker / ComposeBuild images

Provide a default environment value

Set a runtime default that can be overridden at startup.

Dockerfile✓ Tested
AngularLifecycle & observable data

Publish updated state through a BehaviorSubject

Publish updated state through a BehaviorSubject with a standalone Angular component and explicit browser behavior.

Angular✓ Tested