FIND YOUR NEXT FEW LINES

Results for “read only”

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

990 snippets foundClear filters
RustNumbers & durations

Round and format a decimal value

Round and format a decimal value in a complete Rust program using the standard library.

Rust✓ Tested
GoDates & times

Round down to a whole minute

Round down to a whole minute using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Numeric parsing & calculations

Round halfway floating-point values away from zero

C++: std::round has an explicit halfway rule different from truncation.

C++✓ Tested
Docker / ComposeContainer commands

Run a command in a running container

Execute an additional process inside an existing container.

exec✓ Tested
C++Ownership & optional values

Run cleanup through a scoped destructor

C++: A stack object’s destructor runs when its scope exits, including normal exception unwinding.

C++✓ Tested
GoGetting Started

Run cleanup when a function returns

Run cleanup when a function returns using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Run your first Go program

Run your first Go program using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Getting Started

Run your first program

C#: Start with a complete program that prints one line. Follow the run instructions below.

C#✓ Tested
C++Getting Started

Run your first program

C++: Start with a complete program that prints one line. Follow the run instructions below.

C++✓ Tested
RustNumbers & durations

Saturate arithmetic at the type boundary

Saturate arithmetic at the type boundary in a complete Rust program using the standard library.

Rust✓ Tested
GoTesting & reusable helpers

Scan whitespace-separated tokens

Scan whitespace-separated tokens using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Collections & data structures

Search a sorted array efficiently

C#: Array.BinarySearch requires an array sorted with the same comparison rules.

C#✓ Tested