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
TypeScriptSafe data handling

Update an object with a readonly input

Create a changed copy while retaining the original.

readonly✓ Tested
ReactGetting Started

Update an object without mutating state

Update an object without mutating state with a small React component and explicit browser behavior.

React✓ Tested
CSSVisual treatment & accessibility

Align an image within its content box

CSS: Object-position places the rendered object when fitting leaves spare space or crops an edge.

CSS✓ Tested
Linux CommandsSorting & joining records

Check whether a file is already sorted

Linux Commands: Use sort -C for a quiet status check that does not rewrite the file.

Linux Commands✓ Tested
JavaScriptObject behavior & collections

Copy nested structured data independently

JavaScript: structuredClone creates an independent copy of supported structured values.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Copy nested structured data independently

TypeScript: structuredClone creates an independent copy of supported structured values.

TypeScript✓ Tested
PowerShellCollections & objects

Count items by group

Group repeated values and report each count.

Group-Object✓ Tested
Linux CommandsSorting & joining records

Count repeated lines after sorting

Linux Commands: Group identical lines before uniq -c, then normalize its leading padding.

Linux Commands✓ Tested
JavaRecords & reliable control flow

Define an immutable data record

Java: A local record gives a small Java data carrier named accessors and value semantics.

Java✓ Tested
JavaScriptObject behavior & collections

Distinguish an own property from an inherited one

JavaScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Distinguish an own property from an inherited one

TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

TypeScript✓ Tested
PowerShellCollections & objects

Filter items in a pipeline

Keep numbers that meet a condition.

Where-Object✓ Tested