Results for “library”
Small, practical examples. Search by task or narrow things down below.
Find descendants inside a container
jQuery: Learn how to find descendants inside a container in a complete browser example.
jQuery✓ Tested
Find matching files recursively
Python: Use rglob and sorted relative paths for a reproducible recursive file listing.
Python✓ Tested
Find members missing from another set
Find members missing from another set in a complete Rust program using the standard library.
Rust✓ Tested
Find set members missing from another set
Java: Use removeAll on a copy to calculate a set difference.
Java✓ Tested
Find shared set members
Java: Copy a set before retainAll when the original must remain unchanged.
Java✓ Tested
Find the first matching stream value
Java: Use findFirst and an explicit default for an empty result.
Java✓ Tested
Find the first matching value
Find the first matching value in a complete Rust program using the standard library.
Rust✓ Tested
Find the first matching value with a fallback
Python: Pass a generator and default to next to avoid building an intermediate list.
Python✓ Tested
Find the greatest common divisor
Java: BigInteger.gcd calculates an exact nonnegative common divisor.
Java✓ Tested
Find the largest array value
Track the maximum in a nonempty C integer array.
C✓ Tested
Find the largest value
Check for an empty C++ vector before dereferencing max_element.
C++✓ Tested
Find the last day of a month
Java: Use YearMonth so leap years and month lengths are handled by the calendar library.
Java✓ Tested