FIND YOUR NEXT FEW LINES

Results for “standard”

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

703 snippets foundClear filters
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#LINQ transformations

Find a matching item with a fallback

C#: Use the FirstOrDefault overload with an explicit default value.

C#✓ 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
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
Linux CommandsFiles & folders

Find files by extension

Search a directory tree for regular files with a particular extension and print their paths.

find✓ Tested
PythonFile operations & archives

Find matching files recursively

Python: Use rglob and sorted relative paths for a reproducible recursive file listing.

Python✓ Tested
RustMaps & sets

Find members missing from another set

Find members missing from another set in a complete Rust program using the standard library.

Rust✓ Tested
JavaQueues & collection operations

Find set members missing from another set

Java: Use removeAll on a copy to calculate a set difference.

Java✓ Tested