FIND YOUR NEXT FEW LINES

Results for “to”

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

3000 snippets foundClear filters
C++Ordering & set operations

Find a median element without fully sorting

C++: nth_element partitions around the element that would occupy the chosen sorted position.

C++✓ Tested
Docker / ComposeContainer lifecycle

Find a named container in the created state

Docker / Compose: Combine name and status filters to narrow a listing.

Docker / Compose✓ Tested
Arduino / CArrays & embedded state

Find a sample range in one pass

Arduino / C: Initialize extrema from the first element of a nonempty array.

Arduino / 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
Arduino / CArrays & embedded state

Find a value in a small lookup table

Arduino / C: A linear scan is simple and predictable for a small fixed array.

Arduino / 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
C++Sequence algorithms

Find both extremes in one algorithm call

C++: Check for a nonempty input before dereferencing the returned iterators.

C++✓ Tested
GitBranches & ancestry

Find branches that contain a selected commit

Git: branch --contains limits the list to branches whose histories include the chosen revision.

Git✓ Tested
GitCommits & history

Find commits by message

Search commit subjects and bodies for a phrase.

log✓ Tested