FIND YOUR NEXT FEW LINES

Results for “format”

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

650 snippets foundClear filters
CBinary formats & structured parsing

Serialize a 16-bit integer in big-endian order

C: Explicit shifts make a byte format independent of the CPU’s native byte order.

C✓ Tested
PowerShellStructured formats & encodings

Serialize nested objects with an explicit depth

PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.

PowerShell✓ Tested
CArray transformations

Sort an integer array with qsort

C: The comparator uses relational comparisons to avoid subtraction overflow.

C✓ Tested
C#LINQ transformations

Split values into fixed-size chunks

C#: Enumerable.Chunk creates arrays and allows a shorter final chunk.

C#✓ Tested
JavaStream transformations

Take a page from a stream

Java: Use skip and limit with a known stable input order.

Java✓ Tested
C#LINQ transformations

Take a page from an ordered sequence

C#: Apply a stable order before Skip and Take for predictable paging.

C#✓ Tested
C#LINQ transformations

Test whether any or all values match

C#: Any and All short-circuit instead of materializing filtered collections.

C#✓ Tested
C#LINQ transformations

Transform each item with Select

C#: Project each input value into a new value without modifying the source array.

C#✓ Tested
JavaStream transformations

Transform each stream value

Java: Use map to turn each input into a corresponding output.

Java✓ Tested
RustIterators & transformations

Transform each value with map

Transform each value with map in a complete Rust program using the standard library.

Rust✓ Tested
JavaText validation & formatting

Treat dynamic regex input as literal text

Java: Use Pattern.quote so metacharacters in a search term lose their special meaning.

Java✓ Tested
C#JSON & binary formats

Update a JSON document with mutable nodes

C#: JsonNode permits targeted changes before serializing a document again.

C#✓ Tested