FIND YOUR NEXT FEW LINES

Results for “only”

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

621 snippets foundClear filters
GoConcurrency & cancellation

Queue values in a buffered channel

Queue values in a buffered channel using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Text validation & encoding

Quote a literal search term for a regex

C#: Regex.Escape prevents metacharacters in a literal term from changing the pattern.

C#✓ Tested
GoConcurrency & cancellation

Range over a closed channel

Range over a closed channel using a complete Go program with explicit sample inputs.

Go✓ Tested
C#JSON & binary formats

Read a big-endian binary integer

C#: Use BinaryPrimitives when the protocol byte order differs from or must not depend on the host.

C#✓ Tested
GoJSON & encoding

Read a big-endian integer from bytes

Read a big-endian integer from bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
RustThreads & shared ownership

Read a channel until all senders close

Read a channel until all senders close in a complete Rust program using the standard library.

Rust✓ Tested
GitCommit history & revision selection

Read a complete commit message

Git: The B placeholder includes the subject and body without extra metadata.

Git✓ Tested
Docker / ComposeContainer commands

Read a field from container metadata

Use an inspect template for stable machine-readable output.

inspect✓ Tested
GitCommit history & revision selection

Read a file from the parent commit

Git: HEAD~1 names the first parent one generation before HEAD.

Git✓ Tested
C#File operations & paths

Read a filename stem and extension

C#: Use Path helpers instead of splitting a path on dots or directory separators.

C#✓ Tested
GoTesting & reusable helpers

Read a fixed-size stream prefix

Read a fixed-size stream prefix using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonJSON & CSV

Read a JSON file

Load a JSON document from disk into Python objects using an explicitly selected text encoding.

json✓ Tested