FIND YOUR NEXT FEW LINES

Results for “first”

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

145 snippets foundClear filters
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
CArray transformations

Find the smallest value in a nonempty array

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

C✓ Tested
Arduino / CGetting Started

Hello World: Blink

Arduino / C: Blink the built-in LED slowly and then quickly, repeating both rates in loop().

Arduino / C✓ Tested
HTMLTables & list numbering

Identify headers for individual table rows

HTML: Scope row associates the first header cell with the data cells in that row.

HTML✓ Tested
SQLRelationships & missing data

Join a parent to pre-aggregated totals

SQL: Aggregate the child rows first to produce at most one joined row per parent.

SQL✓ Tested
SQL ServerRelationships & missing data

Join a parent to pre-aggregated totals

SQL Server: Aggregate the child rows first to produce at most one joined row per parent.

SQL Server✓ Tested
PostgresRelationships & missing data

Join a parent to pre-aggregated totals

Postgres: Aggregate the child rows first to produce at most one joined row per parent.

Postgres✓ Tested
SQLiteRelationships & missing data

Join a parent to pre-aggregated totals

SQLite: Aggregate the child rows first to produce at most one joined row per parent.

SQLite✓ Tested
C++Numeric parsing & calculations

Parse a complete integer without exceptions

C++: from_chars reports both an error code and the first unconsumed character.

C++✓ Tested
JavaQueues & collection operations

Preserve map insertion order

Java: Use LinkedHashMap when iteration should follow the order keys were first added.

Java✓ Tested
C#Collections & data structures

Process items by numeric priority

C#: PriorityQueue removes the item with the smallest priority value first.

C#✓ Tested
GitCommit history & revision selection

Read a file from the parent commit

Git: HEAD~1 names the first parent one generation before HEAD.

Git✓ Tested