FIND YOUR NEXT FEW LINES

Results for “read-only”

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

990 snippets foundClear filters
GitInspecting the working tree

Restrict a diff to one chosen path

Git: Use the double dash separator to distinguish a filename from revisions or options.

Git✓ Tested
C++Tasks & synchronization

Retrieve the result of an asynchronous task

C++: The explicit async launch policy requests asynchronous execution rather than deferred evaluation.

C++✓ Tested
GoErrors & validation

Return a descriptive validation error

Return a descriptive validation error using a complete Go program with explicit sample inputs.

Go✓ Tested
RustGetting Started

Return a value from a loop

Return a value from a loop in a complete Rust program using the standard library.

Rust✓ Tested
PostgresRows & writes

Return an inserted row

Read generated data directly from INSERT.

RETURNING✓ Tested
C#Types & reliable control flow

Return multiple named values from a method

C#: Named value tuples give lightweight field names without a separate class.

C#✓ Tested
GitBranches & ancestry

Return to the previously checked-out branch

Git: The dash shorthand selects the previous branch in the checkout history.

Git✓ Tested
GoGetting Started

Return two values from a function

Return two values from a function using a complete Go program with explicit sample inputs.

Go✓ Tested
GoSlices & collections

Reverse slice order

Reverse slice order using a complete Go program with explicit sample inputs.

Go✓ Tested
SQL ServerTransactions & tables

Roll back a trial update

Group a change in a transaction and undo it.

transaction✓ Tested
C++Sequence algorithms

Rotate a sequence around a selected position

C++: rotate places the element at the middle iterator first while preserving the two segment orders.

C++✓ Tested
C#Dates & precise numbers

Round a decimal using an explicit midpoint rule

C#: Use decimal literals for decimal arithmetic and choose the midpoint rounding behavior.

C#✓ Tested