FIND YOUR NEXT FEW LINES

Results for “run”

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

2246 snippets foundClear filters
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
TypeScriptSafe data handling

Safely read a caught error

Check the error type before accessing its message.

unknown✓ 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
Linux CommandsStreams & byte tools

Save a stream while displaying it

Linux Commands: Use tee to write a copy of standard input to a file.

Linux Commands✓ Tested
Docker / ComposeImage management

Save and reload an image archive

Docker / Compose: save preserves image metadata and tags for later loading.

Docker / Compose✓ Tested
GoTesting & reusable helpers

Scan whitespace-separated tokens

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

Go✓ Tested
SQLiteQueries & text

Search a small FTS5 table

Use SQLite’s full-text index to match a term.

FTS5✓ Tested
C#Collections & data structures

Search a sorted array efficiently

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

C#✓ Tested
CArray transformations

Search a sorted array with bsearch

C: The search uses the same ordering comparator as the sorted input.

C✓ Tested
RustVectors & slices

Search a sorted slice

Search a sorted slice in a complete Rust program using the standard library.

Rust✓ Tested
C++Numbers & algorithms

Search a sorted vector

Use binary_search after ensuring C++ values are sorted.

C++✓ Tested
SQLText cleanup & matching

Search for a literal LIKE wildcard

SQL: Declare an escape character so a percent sign in the pattern is literal.

SQL✓ Tested