FIND YOUR NEXT FEW LINES

Results for “run”

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

2246 snippets foundClear filters
SQLiteReporting & grouped calculations

Group by more than one field

SQLite: Each distinct combination of grouping fields produces its own row.

SQLite✓ Tested
GoGetting Started

Group fields in a struct

Group fields in a struct using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Ordering & set operations

Group matching values while preserving their order

C++: stable_partition keeps the relative order within both predicate groups.

C++✓ Tested
PythonMappings & sets

Group records by a field

Python: Accumulate related values with defaultdict without checking whether each group exists.

Python✓ Tested
JavaScriptObject behavior & collections

Group records into map entries

JavaScript: Initialize an array for a missing Map key before appending its values.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested
CStructures & function interfaces

Group related values in nested structures

C: Nested members model a record that owns another simple record.

C✓ Tested
JavaStream transformations

Group strings by their length

Java: Choose a TreeMap supplier when group keys must have deterministic order.

Java✓ Tested
RustGetting Started

Grow a vector

Grow a vector in a complete Rust program using the standard library.

Rust✓ Tested
CDynamic memory & ownership

Grow an allocation without losing it on failure

C: Assign realloc to a temporary pointer so the original allocation remains available if growth fails.

C✓ Tested
GoGetting Started

Handle a failed conversion

Handle a failed conversion using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Filesystem operations

Handle a failed file open through stream state

C++: An unopened input stream is not an empty successful file read.

C++✓ Tested