FIND YOUR NEXT FEW LINES

Results for “read file”

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

1171 snippets foundClear filters
C++Containers & compound values

Insert a map value only when a key is absent

C++: try_emplace preserves the old value when insertion does not take place.

C++✓ Tested
PythonNumbers & calculations

Insert a value while preserving sorted order

Python: Use insort on an already sorted list; insertion still shifts later list elements.

Python✓ Tested
PowerShellGetting Started

Insert a variable into a string

PowerShell: Insert a variable into a string using PowerShell 7.

PowerShell✓ Tested
RustMaps & sets

Insert and retrieve a map value

Insert and retrieve a map value in a complete Rust program using the standard library.

Rust✓ Tested
Docker / ComposeLimits & process security

Insert Docker’s small init process

Docker / Compose: The init option adds a PID 1 process that reaps children and forwards signals.

Docker / Compose✓ Tested
PowerShellStrings & literal text

Insert values into a multiline template

PowerShell: A double-quoted here-string expands variable references.

PowerShell✓ Tested
Arduino / CSerial protocols

Inspect a byte without consuming it

Arduino / C: peek leaves the next byte available for a later read.

Arduino / C✓ Tested
GitGetting Started

Inspect a clean working tree

Git: Inspect a clean working tree inside the disposable repository created by the input setup.

Git✓ Tested
Docker / ComposeGetting Started

Inspect a completed container’s exit code

Docker / Compose: Inspect a completed container’s exit code using a locally available Ubuntu image.

Docker / Compose✓ Tested
GitRemotes & collaboration

Inspect a GitHub remote URL

Configure and inspect an example origin without contacting the network.

GitHub✓ Tested
GitBranches & ancestry

Inspect a revision with detached HEAD

Git: Detached mode is useful for inspection; create a branch before keeping new work.

Git✓ Tested
C++Text validation & parsing

Inspect a substring without allocating a copy

C++: A string_view refers to existing storage and must not outlive that storage.

C++✓ Tested