FIND YOUR NEXT FEW LINES

Results for “read-only”

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

990 snippets foundClear filters
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
C++Text validation & parsing

Iterate over all regular-expression matches

C++: A regex iterator yields successive matches without manually updating an offset.

C++✓ 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
JavaScriptObjects & JSON

Iterate over object entries

Read JavaScript property names and values using Object.entries.

JavaScript✓ Tested
GoFiles & paths

Join portable path components

Join portable path components using a complete Go program with explicit sample inputs.

Go✓ Tested
RustStrings & Unicode

Join string slices

Join string slices in a complete Rust program using the standard library.

Rust✓ Tested
JavaStrings

Join strings with a separator

Build a Java string from several values using String.join.

Java✓ Tested
GoStrings & text

Join words with a separator

Join words with a separator using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CArrays & embedded state

Keep a counter from wrapping at its maximum

Arduino / C: Increment only when the value is below its limit.

Arduino / C✓ Tested
SQLExpressions & aggregates

Label rows with CASE

Derive a readable label from a condition.

CASE✓ Tested