Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Write and read a UTF-8 file
Write and read a UTF-8 file using a complete Go program with explicit sample inputs.
Go✓ Tested
Write and read a UTF-8 file
Write and read a UTF-8 file in a complete Rust program using the standard library.
Rust✓ Tested
Write object records to a CSV file
PowerShell: Export-Csv uses property names as headers and quotes values when needed.
PowerShell✓ Tested
Write several messages through one file descriptor
Bash Scripts: Open a destination once and close the descriptor after writing.
Bash Scripts✓ Tested
Write text to a new practice file
Linux Commands: Write text to a new practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Write UTF-8 text to a file
Save a string without adding an extra newline.
Set-Content✓ Tested
Accept different types with a generic function
Accept different types with a generic function in a complete Rust program using the standard library.
Rust✓ Tested
Append an item to a small array
PowerShell: The plus-equals operator builds a new array; use a generic list for repeated large additions.
PowerShell✓ Tested
Assign a network-scoped alias
Docker / Compose: An alias gives an endpoint an additional name on that network.
Docker / Compose✓ Tested
Attach an existing container to another network
Docker / Compose: network connect adds an attachment without recreating the container.
Docker / Compose✓ Tested
Build a mutable generic list
PowerShell: A generic list supports repeated additions without copying an entire array each time.
PowerShell✓ Tested
Capture a surrounding value in a closure
Capture a surrounding value in a closure in a complete Rust program using the standard library.
Rust✓ Tested