FIND YOUR NEXT FEW LINES

Results for “Stream transformations”

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

85 snippets foundClear filters
CArray transformations

Find the smallest value in a nonempty array

C: Initialize from the first element instead of assuming a numeric sentinel.

C✓ Tested
RustIterators & transformations

Flatten nested collections

Flatten nested collections in a complete Rust program using the standard library.

Rust✓ Tested
C#LINQ transformations

Flatten nested collections with SelectMany

C#: Concatenate the items from several sequences into one sequence.

C#✓ Tested
CArray transformations

Insert into an array with spare capacity

C: Move the trailing elements before inserting and keep the logical length separate from capacity.

C✓ Tested
Linux CommandsStreams & byte tools

Inspect bytes as hexadecimal values

Linux Commands: Use od with explicit formatting and no address column.

Linux Commands✓ Tested
CArray transformations

Merge two sorted arrays

C: Advance the pointer belonging to the smaller next element and copy any remaining suffix.

C✓ Tested
RustIterators & transformations

Number items while iterating

Number items while iterating in a complete Rust program using the standard library.

Rust✓ Tested
C#LINQ transformations

Pair corresponding collection elements

C#: Zip stops at the shorter sequence, so validate lengths separately if mismatches are an error.

C#✓ Tested
RustIterators & transformations

Pair corresponding values

Pair corresponding values in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Parse only valid integers

Parse only valid integers in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Partition values into two collections

Partition values into two collections in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsInput streams & redirection

Pass a variable to standard input

Bash Scripts: A here-string supplies the expanded value followed by a newline.

Bash Scripts✓ Tested