FIND YOUR NEXT FEW LINES

Results for “Hashtables & object records”

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

151 snippets foundClear filters
SQLRelationships & missing data

Find records without any related rows

SQL: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQL✓ Tested
SQL ServerRelationships & missing data

Find records without any related rows

SQL Server: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQL Server✓ Tested
PostgresRelationships & missing data

Find records without any related rows

Postgres: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

Postgres✓ Tested
SQLiteRelationships & missing data

Find records without any related rows

SQLite: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQLite✓ Tested
PythonMappings & sets

Group records by a field

Python: Accumulate related values with defaultdict without checking whether each group exists.

Python✓ 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
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
JavaScriptObjects & JSON

Iterate over object entries

Read JavaScript property names and values using Object.entries.

JavaScript✓ Tested
JavaScriptObject behavior & collections

List an object’s own enumerable keys

JavaScript: Object.keys omits inherited and non-enumerable properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

List an object’s own enumerable keys

TypeScript: Object.keys omits inherited and non-enumerable properties.

TypeScript✓ Tested
ReactPerformance & rendering

Memoize an object passed to a provider

Memoize an object passed to a provider with a small React component and explicit browser behavior.

React✓ Tested
JavaScriptObjects & JSON

Merge object settings

Use object spread to apply JavaScript overrides to defaults.

JavaScript✓ Tested