FIND YOUR NEXT FEW LINES

Results for “cr”

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

1833 snippets foundClear filters
Bash ScriptsLoops & decisions

Read a file without losing its last line

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

read lines✓ 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
PostgresJSON & arrays

Read a JSONB field as text

Extract a nested value from a JSON document.

jsonb✓ 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
GoHTTP & URLs

Read a named request cookie

Read a named request cookie using a complete Go program with explicit sample inputs.

Go✓ Tested
TypeScriptSafe data handling

Read a nested optional value

Avoid dereferencing a missing nested object.

optional chaining✓ Tested
SQLSubqueries & ranked selection

Read a page after a known unique key

SQL: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Read a page after a known unique key

SQL Server: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Read a page after a known unique key

Postgres: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Read a page after a known unique key

SQLite: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQLite✓ Tested
TypeScriptUtilities & async

Read a property with keyof

Keep the key and returned value tied to an object type.

keyof✓ Tested
GitTags & repository configuration

Read a repository-specific configuration value

Git: The local scope makes configuration lookup predictable for this practice repository.

Git✓ Tested