FIND YOUR NEXT FEW LINES

Results for “folder”

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

667 snippets foundClear filters
GoConcurrency & cancellation

Range over a closed channel

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

Go✓ Tested
SQLiteWindow analytics

Rank tied scores with competition gaps

SQLite: RANK leaves a gap after tied rows, unlike DENSE_RANK.

SQLite✓ Tested
SQLiteWindow analytics

Rank tied scores without gaps

SQLite: DENSE_RANK assigns equal ranks to ties and increments by one for the next distinct score.

SQLite✓ 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
Linux CommandsStreams & byte tools

Read a byte prefix

Linux Commands: Use GNU head -c for a fixed number of bytes, independent of line boundaries.

Linux Commands✓ Tested
Linux CommandsStreams & byte tools

Read a byte suffix

Linux Commands: Use GNU tail -c to extract a fixed-size ending.

Linux Commands✓ 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
Bash ScriptsLoops & decisions

Read a file without losing its last line

Handle spaces, backslashes, and a final line without a newline.

read lines✓ 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
Bash ScriptsGetting Started

Read a line without losing backslashes

Bash Scripts: Read a line without losing backslashes with a small standalone Bash program.

Bash Scripts✓ Tested
RustParsing & byte data

Read a little-endian integer from bytes

Read a little-endian integer from bytes in a complete Rust program using the standard library.

Rust✓ Tested