FIND YOUR NEXT FEW LINES

Results for “value”

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

670 snippets foundClear filters
C++Sequence algorithms

Find the first value satisfying a condition

C++: Compare the returned iterator with end before dereferencing it.

C++✓ Tested
C++Ordering & set operations

Find the insertion position for a sorted value

C++: lower_bound returns the first position whose value is not less than the search key.

C++✓ Tested
CArrays

Find the largest array value

Track the maximum in a nonempty C integer array.

C✓ Tested
C++Numbers & algorithms

Find the largest value

Check for an empty C++ vector before dereferencing max_element.

C++✓ Tested
SQLSubqueries & ranked selection

Find the second-highest distinct value

SQL: Select the maximum below the overall maximum to skip ties at the top.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Find the second-highest distinct value

SQL Server: Select the maximum below the overall maximum to skip ties at the top.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Find the second-highest distinct value

Postgres: Select the maximum below the overall maximum to skip ties at the top.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Find the second-highest distinct value

SQLite: Select the maximum below the overall maximum to skip ties at the top.

SQLite✓ Tested
CArray transformations

Find the smallest value in a nonempty array

C: Initialize from the first element instead of assuming a numeric sentinel.

C✓ Tested
C#Collections & data structures

Find values common to two collections

C#: Intersect returns distinct values shared by the inputs.

C#✓ Tested
PythonMappings & sets

Find values missing from another collection

Python: Use a set difference to identify requested IDs absent from the available IDs.

Python✓ Tested
C#Collections & data structures

Find values missing from another collection

C#: Except removes duplicates as it calculates the set difference.

C#✓ Tested