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
HTMLMetadata & document links

Give a document a descriptive browser title

HTML: The title element supplies the browser document title independently of the visible heading.

HTML✓ Tested
CStructures & function interfaces

Give a reusable record type a short name

C: A typedef names a structure type without changing its representation.

C✓ Tested
JavaScriptObject behavior & collections

Group records into map entries

JavaScript: Initialize an array for a missing Map key before appending its values.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested
PythonStructured data & serialization

Handle malformed JSON input

Python: Catch JSONDecodeError without hiding unrelated programming errors.

Python✓ Tested
RustFunctions & data types

Implement a method on a struct

Implement a method on a struct in a complete Rust program using the standard library.

Rust✓ Tested
SQLRelationships & missing data

Include zero counts for missing relationships

SQL: Count the non-null child key after a left join so a missing relationship produces zero.

SQL✓ Tested
SQL ServerRelationships & missing data

Include zero counts for missing relationships

SQL Server: Count the non-null child key after a left join so a missing relationship produces zero.

SQL Server✓ Tested
PostgresRelationships & missing data

Include zero counts for missing relationships

Postgres: Count the non-null child key after a left join so a missing relationship produces zero.

Postgres✓ Tested
SQLiteRelationships & missing data

Include zero counts for missing relationships

SQLite: Count the non-null child key after a left join so a missing relationship produces zero.

SQLite✓ Tested
CStructures & function interfaces

Initialize structure fields by name

C: Designated initializers make field assignments independent of their declaration order.

C✓ Tested
Docker / ComposeNetworks & volume metadata

Inspect a user-defined network’s driver

Docker / Compose: The default driver for a local user-defined network is bridge.

Docker / Compose✓ Tested