FIND YOUR NEXT FEW LINES

Results for “read-only”

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

990 snippets foundClear filters
SQLiteBulk changes & set operations

Increment a stored value in the database

SQLite: An in-database arithmetic update avoids a separate application read-modify-write step.

SQLite✓ Tested
GoConcurrency & cancellation

Increment an atomic counter

Increment an atomic counter using a complete Go program with explicit sample inputs.

Go✓ 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
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
Arduino / CSerial protocols

Inspect a byte without consuming it

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

Arduino / 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
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
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