FIND YOUR NEXT FEW LINES

Results for “Collections & data structures”

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

694 snippets foundClear filters
CStructures & function interfaces

Iterate over a fixed array of records

C: Compute the array element count with sizeof at the point where it is still an array.

C✓ Tested
GoSlices & collections

Iterate over bounded chunks

Iterate over bounded chunks using a complete Go program with explicit sample inputs.

Go✓ 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
SQLRelationships & missing data

Join through a lookup table

SQL: Use explicit aliases and join keys when enriching records through two relationships.

SQL✓ Tested
SQL ServerRelationships & missing data

Join through a lookup table

SQL Server: Use explicit aliases and join keys when enriching records through two relationships.

SQL Server✓ Tested
PostgresRelationships & missing data

Join through a lookup table

Postgres: Use explicit aliases and join keys when enriching records through two relationships.

Postgres✓ Tested
SQLiteRelationships & missing data

Join through a lookup table

SQLite: Use explicit aliases and join keys when enriching records through two relationships.

SQLite✓ Tested
CStructures & function interfaces

Keep function state between calls

C: A static local variable retains its stored value for the lifetime of the process.

C✓ Tested
SQLRelationships & missing data

Keep parent rows while filtering joined children

SQL: Put a child filter in ON when unmatched parents must remain in the result.

SQL✓ Tested