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 / ComposeBuild images

Set an image’s default command

Use JSON array syntax for a predictable command.

Dockerfile✓ 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
Linux CommandsTransforming text

Translate ASCII lowercase letters to uppercase

Linux Commands: Use tr under a fixed locale for predictable ASCII character ranges.

Linux Commands✓ 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
JavaText validation & formatting

Validate a complete identifier

Java: String.matches requires the regular expression to match the entire input.

Java✓ Tested
CBinary formats & structured parsing

Validate a simple C-style ASCII identifier

C: Check the first character separately from subsequent characters and reject empty input.

C✓ Tested
PowerShellStructured formats & encodings

Write object records to a CSV file

PowerShell: Export-Csv uses property names as headers and quotes values when needed.

PowerShell✓ Tested