FIND YOUR NEXT FEW LINES

Results for “file”

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

838 snippets foundClear filters
Docker / ComposeCompose applications

Wait for an initialization job

Start a service only after its dependency completes successfully.

Compose✓ Tested
GoConcurrency & cancellation

Wait for concurrent workers

Wait for concurrent workers using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptFiles & async

Wait for multiple promises

Use Promise.all to collect JavaScript results in input order.

JavaScript✓ Tested
RustFunctions & data types

Wrap a value in a distinct type

Wrap a value in a distinct type in a complete Rust program using the standard library.

Rust✓ Tested
GoErrors & validation

Wrap an error with context

Wrap an error with context using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFunctions & types

Write a generic slice helper

Write a generic slice helper using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellStrings & literal text

Write a multiline string without expanding variables

PowerShell: A single-quoted here-string preserves dollar signs literally.

PowerShell✓ Tested
CFiles

Write and read binary bytes

Round-trip a byte buffer through a C binary file.

C✓ Tested
PythonJSON & CSV

Write dictionaries to CSV

Write a list of dictionaries to a CSV file with a header row and a predictable column order.

csv✓ Tested
RustTesting & reusable patterns

Write formatted text into a byte buffer

Write formatted text into a byte buffer in a complete Rust program using the standard library.

Rust✓ Tested