Results for “Collections & data structures”
Small, practical examples. Search by task or narrow things down below.
Filter values into a new slice
Filter values into a new slice using a complete Go program with explicit sample inputs.
Go✓ Tested
Find an element’s position among siblings
jQuery: index without arguments reports a zero-based sibling position.
jQuery✓ Tested
Find an item’s index
Find an item’s index using a complete Go program with explicit sample inputs.
Go✓ Tested
Find members absent from another set
JavaScript: Negate a membership test to calculate the set difference.
JavaScript✓ Tested
Find members absent from another set
TypeScript: Negate a membership test to calculate the set difference.
TypeScript✓ Tested
Find parents whose every child meets a rule
SQL: Combine existence with the absence of a violating child to exclude parents with no children.
SQL✓ Tested
Find parents whose every child meets a rule
SQL Server: Combine existence with the absence of a violating child to exclude parents with no children.
SQL Server✓ Tested
Find parents whose every child meets a rule
Postgres: Combine existence with the absence of a violating child to exclude parents with no children.
Postgres✓ Tested
Find parents whose every child meets a rule
SQLite: Combine existence with the absence of a violating child to exclude parents with no children.
SQLite✓ Tested
Find parents with at least two child rows
SQL: Use a correlated count when testing a per-parent threshold.
SQL✓ Tested
Find parents with at least two child rows
SQL Server: Use a correlated count when testing a per-parent threshold.
SQL Server✓ Tested
Find parents with at least two child rows
Postgres: Use a correlated count when testing a per-parent threshold.
Postgres✓ Tested