FIND YOUR NEXT FEW LINES

Results for “library”

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

653 snippets foundClear filters
GoFiles & paths

Read text line by line

Read text line by line using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonGetting Started

Read the beginning of a text value

Python: Extract or display the first three ASCII characters from a known nonempty string.

Python✓ Tested
JavaGetting Started

Read the beginning of a text value

Java: Extract or display the first three ASCII characters from a known nonempty string.

Java✓ Tested
PythonGetting Started

Read the first collection element

Python: Access index zero only after establishing that the collection is nonempty.

Python✓ Tested
JavaGetting Started

Read the first collection element

Java: Access index zero only after establishing that the collection is nonempty.

Java✓ Tested
RustIterators & transformations

Read values until a condition changes

Read values until a condition changes in a complete Rust program using the standard library.

Rust✓ Tested
GoConcurrency & cancellation

Receive a result from a goroutine

Receive a result from a goroutine using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryForm serialization & state

Refresh a cached data attribute deliberately

jQuery: After the first read, data caches a parsed value; removeData forces a new attribute read.

jQuery✓ Tested
jQueryDeferred work & queues

Reject a deferred result

jQuery: fail receives the reason supplied to reject.

jQuery✓ Tested
RustNumbers & durations

Reject a narrowing integer conversion

Reject a narrowing integer conversion in a complete Rust program using the standard library.

Rust✓ Tested
GoFiles & paths

Reject an escaping relative path

Reject an escaping relative path using a complete Go program with explicit sample inputs.

Go✓ Tested
GoErrors & validation

Reject an integer outside a byte’s range

Reject an integer outside a byte’s range using a complete Go program with explicit sample inputs.

Go✓ Tested