FIND YOUR NEXT FEW LINES

Results for “only”

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

621 snippets foundClear filters
C#File operations & paths

Inspect a file length without reading it

C#: Use FileInfo.Length to retrieve a logical size in bytes.

C#✓ Tested
C#Asynchronous work & URI handling

Inspect a parsed URI

C#: Use Uri properties instead of splitting URL strings manually.

C#✓ Tested
RustFiles & paths

Inspect a path’s filename and extension

Inspect a path’s filename and extension in a complete Rust program using the standard library.

Rust✓ 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
GoErrors & validation

Inspect a typed conversion error

Inspect a typed conversion error using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFunctions & types

Inspect a value with a type switch

Inspect a value with a type switch using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Inspect a value’s type

Inspect a value’s type using a complete Go program with explicit sample inputs.

Go✓ Tested
RustVectors & slices

Inspect overlapping windows

Inspect overlapping windows in a complete Rust program using the standard library.

Rust✓ Tested
GitStashing selected work

Inspect which files a stash changes

Git: stash show can report just filenames before applying anything.

Git✓ Tested
GoSlices & collections

Iterate over bounded chunks

Iterate over bounded chunks using a complete Go program with explicit sample inputs.

Go✓ Tested
RustMaps & sets

Iterate over keys in sorted order

Iterate over keys in sorted order in a complete Rust program using the standard library.

Rust✓ Tested
RustThreads & shared ownership

Join a worker thread and read its result

Join a worker thread and read its result in a complete Rust program using the standard library.

Rust✓ Tested