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
TypeScriptObject behavior & collections

Group records into map entries

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

TypeScript✓ Tested
JavaRecords & reliable control flow

Narrow an object with a pattern variable

Java: Pattern matching avoids a separate cast after a successful instanceof check.

Java✓ Tested
JavaScriptObject behavior & collections

Build an object from key-value entries

JavaScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Build an object from key-value entries

TypeScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

TypeScript✓ Tested
GitCommit history & revision selection

Check what kind of Git object a revision names

Git: cat-file -t distinguishes a commit, tree, blob, or annotated tag.

Git✓ Tested
Linux CommandsGetting Started

Count newline-terminated records

Linux Commands: Count newline-terminated records using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
PowerShellGetting Started

Create an object with named properties

PowerShell: Create an object with named properties using PowerShell 7.

PowerShell✓ Tested
TypeScriptTypes & functions

Describe an object with an interface

Require named fields on a reusable object shape.

interface✓ Tested
C#JSON & binary formats

Deserialize a JSON object into a dictionary

C#: Specify the value type expected from a known JSON shape.

C#✓ Tested
JavaScriptUTC date operations

Detect an invalid Date object

JavaScript: An invalid Date has a NaN time value.

JavaScript✓ Tested
TypeScriptUTC date operations

Detect an invalid Date object

TypeScript: An invalid Date has a NaN time value.

TypeScript✓ Tested
AngularComponents & communication

Emit a typed object from a child

Emit a typed object from a child with a standalone Angular component and explicit browser behavior.

Angular✓ Tested