FIND YOUR NEXT FEW LINES

Results for “library”

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

653 snippets foundClear filters
jQueryHTTP requests

Fetch and display JSON

jQuery: getJSON parses a successful JSON response.

jQuery✓ Tested
PythonCollections

Filter a list with a condition

Build a new list containing only the values that satisfy a condition using a list comprehension.

list✓ Tested
JavaCollections

Filter even numbers

Use a Java stream to collect only even values.

Java✓ Tested
jQueryCollections & styling

Filter parents containing a matching descendant

jQuery: has retains parents with a matching descendant.

jQuery✓ Tested
GoSlices & collections

Filter values into a new slice

Filter values into a new slice using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Strings

Find a substring

Check the result of std::string::find against npos.

C++✓ Tested
CStrings

Find a substring

Use strstr to find a literal substring in a C string.

C✓ Tested
CArrays

Find an array element

Use a bounded linear search over a C array.

C✓ Tested
jQueryCollections & styling

Find an element’s position among siblings

jQuery: index without arguments reports a zero-based sibling position.

jQuery✓ Tested
GoSlices & collections

Find an item’s index

Find an item’s index using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonNumbers & calculations

Find common factors and multiples

Python: Use the integer gcd and lcm helpers to avoid floating-point calculations.

Python✓ Tested
RustMaps & sets

Find common set members

Find common set members in a complete Rust program using the standard library.

Rust✓ Tested