FIND YOUR NEXT FEW LINES

Results for “keys”

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

44 snippets foundClear filters
GoMaps & sets

Sort map keys for stable output

Sort map keys for stable output using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Collections & data structures

Use case-insensitive dictionary keys

C#: Choose an ordinal comparer when case-insensitive keys represent identifiers.

C#✓ Tested
Bash ScriptsArray operations

Visit associative-array keys in a stable order

Bash Scripts: Associative arrays have no defined iteration order, so sort their keys explicitly.

Bash Scripts✓ Tested
SQLSubqueries & ranked selection

Read a page after a known unique key

SQL: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Read a page after a known unique key

SQL Server: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Read a page after a known unique key

Postgres: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Read a page after a known unique key

SQLite: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.

SQLite✓ Tested
TypeScriptCollections & records

Type a dictionary with Record

Limit a lookup table to a known set of keys.

Record✓ Tested
SQLiteJSON data

Expand a JSON array into rows

Iterate array elements using a table-valued function.

json_each✓ Tested
JavaStream transformations

Group strings by their length

Java: Choose a TreeMap supplier when group keys must have deterministic order.

Java✓ Tested
JavaStream transformations

Index records by a unique key

Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.

Java✓ Tested
PythonMappings & sets

Invert a dictionary with unique values

Python: Swap keys and values when the values are hashable and unique.

Python✓ Tested