FIND YOUR NEXT FEW LINES

Results for “File operations & paths”

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

946 snippets foundClear filters
Docker / ComposeGetting Started

Drop Linux capabilities for a simple command

Docker / Compose: Drop Linux capabilities for a simple command using a locally available Ubuntu image.

Docker / Compose✓ Tested
GoFunctions & types

Embed a struct for shared fields

Embed a struct for shared fields using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeCompose service options

Enable an init process for a service

Docker / Compose: init adds a small PID 1 process to forward signals and reap children.

Docker / Compose✓ Tested
SQLiteTables & writes

Enable and use foreign keys

Turn on relationship enforcement for the connection.

foreign keys✓ Tested
GoJSON & encoding

Encode a struct with JSON field names

Encode a struct with JSON field names using a complete Go program with explicit sample inputs.

Go✓ Tested
RustParsing & byte data

Encode an integer as big-endian bytes

Encode an integer as big-endian bytes in a complete Rust program using the standard library.

Rust✓ Tested
GoJSON & encoding

Encode and decode Base64 text

Encode and decode Base64 text using a complete Go program with explicit sample inputs.

Go✓ Tested
GoJSON & encoding

Encode bytes as hexadecimal

Encode bytes as hexadecimal using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Encode URL query parameters

Encode URL query parameters using a complete Go program with explicit sample inputs.

Go✓ Tested
RustTesting & reusable patterns

Exercise a function with a table of inputs

Exercise a function with a table of inputs in a complete Rust program using the standard library.

Rust✓ Tested
SQLiteJSON data

Expand a JSON array into rows

Iterate array elements using a table-valued function.

json_each✓ Tested
RustNumbers & durations

Express a duration in milliseconds

Express a duration in milliseconds in a complete Rust program using the standard library.

Rust✓ Tested