Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Parse quoted CSV from an in-memory string
Python: Use StringIO with csv.reader so quoted commas are handled correctly.
Python✓ Tested
Pipe input into a container process
Docker / Compose: The interactive flag keeps standard input open without allocating a terminal.
Docker / Compose✓ Tested
Prepare an owned directory before dropping root
Docker / Compose: Create and chown the writable application path before USER.
Docker / Compose✓ Tested
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
Preserve equal-key order while sorting records
C++: stable_sort retains encounter order for records whose selected sort keys compare equal.
C++✓ Tested
Preserve map insertion order
Java: Use LinkedHashMap when iteration should follow the order keys were first added.
Java✓ Tested
Process a FIFO queue
C#: Queue removes elements in the order they were enqueued.
C#✓ Tested
Process items by numeric priority
C#: PriorityQueue removes the item with the smallest priority value first.
C#✓ Tested
Produce compact deterministic JSON
Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.
Python✓ Tested
Provide a concise page description
HTML: A description meta element summarizes a document for clients that use that metadata.
HTML✓ Tested
Provide a default environment value
Set a runtime default that can be overridden at startup.
Dockerfile✓ Tested
Publish updated state through a BehaviorSubject
Publish updated state through a BehaviorSubject with a standalone Angular component and explicit browser behavior.
Angular✓ Tested