FIND YOUR NEXT FEW LINES

Results for “library”

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

653 snippets foundClear filters
RustMaps & sets

Collect unique sorted values

Collect unique sorted values in a complete Rust program using the standard library.

Rust✓ Tested
RustGetting Started

Combine Boolean conditions

Combine Boolean conditions in a complete Rust program using the standard library.

Rust✓ Tested
GoErrors & validation

Combine independent validation errors

Combine independent validation errors using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonGetting Started

Combine text with a name

Python: Construct a greeting from a fixed prefix and a stored name.

Python✓ Tested
JavaGetting Started

Combine text with a name

Java: Construct a greeting from a fixed prefix and a stored name.

Java✓ Tested
GoGetting Started

Combine two Boolean conditions

Combine two Boolean conditions using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryCollections & styling

Combine two selections

jQuery: add returns a combined collection in document order.

jQuery✓ Tested
PythonGetting Started

Compare a value with a limit

Python: Turn a comparison into a readable yes or no result.

Python✓ Tested
JavaGetting Started

Compare a value with a limit

Java: Turn a comparison into a readable yes or no result.

Java✓ Tested
RustStrings & Unicode

Compare ASCII text ignoring case

Compare ASCII text ignoring case in a complete Rust program using the standard library.

Rust✓ Tested
PythonNumbers & calculations

Compare floating-point calculations with tolerance

Python: Use isclose instead of exact equality for results affected by floating-point rounding.

Python✓ Tested
JavaPrecise numeric calculations

Compare floating-point results with a tolerance

Java: For this bounded example, compare the absolute difference against a chosen error threshold.

Java✓ Tested