FIND YOUR NEXT FEW LINES

Results for “Form behavior”

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

1212 snippets foundClear filters
Docker / ComposeImage management

Inspect the operating system recorded in an image

Docker / Compose: Image metadata records the OS expected by its executable layers.

Docker / Compose✓ Tested
Linux CommandsTransforming text

Join lines from two files side by side

Linux Commands: Use paste to pair lines by position with a chosen separator.

Linux Commands✓ Tested
JavaScriptObject behavior & collections

List an object’s own enumerable keys

JavaScript: Object.keys omits inherited and non-enumerable properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

List an object’s own enumerable keys

TypeScript: Object.keys omits inherited and non-enumerable properties.

TypeScript✓ Tested
C#JSON & binary formats

Measure the byte length of UTF-8 text

C#: Character count and encoded byte count can differ for non-ASCII text.

C#✓ 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
CBinary formats & structured parsing

Parse a bounded simple record with sscanf

C: A width limit protects the destination buffer and the consumed count detects trailing junk.

C✓ Tested
RustIterators & transformations

Parse only valid integers

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

Rust✓ Tested
JavaStream transformations

Partition a collection by a predicate

Java: Use partitioningBy to retain both matching and nonmatching values.

Java✓ Tested