FIND YOUR NEXT FEW LINES

Results for “New-Item”

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

210 snippets foundClear filters
TypeScriptGetting Started

Count the items in a collection

TypeScript: Read the collection’s length instead of hard-coding the loop limit.

TypeScript✓ Tested
C++Getting Started

Count the items in a collection

C++: Read the collection’s length instead of hard-coding the loop limit.

C++✓ Tested
CGetting Started

Count the items in a collection

C: Read the collection’s length instead of hard-coding the loop limit.

C✓ Tested
C#JSON & binary formats

Enumerate the items of a JSON array

C#: Dispose JsonDocument after reading its elements.

C#✓ Tested
Docker / ComposeImage management

Export a container filesystem into a new image

Docker / Compose: export contains filesystem data; import creates a new image from it.

Docker / Compose✓ Tested
CSSGrid placement

Fill an earlier grid hole with a later small item

CSS: Dense auto-placement may move a later item visually ahead of other items to fill a gap.

CSS✓ Tested
PowerShellCollections & objects

Filter items in a pipeline

Keep numbers that meet a condition.

Where-Object✓ Tested
GoSlices & collections

Filter values into a new slice

Filter values into a new slice using a complete Go program with explicit sample inputs.

Go✓ Tested
C#LINQ transformations

Find a matching item with a fallback

C#: Use the FirstOrDefault overload with an explicit default value.

C#✓ Tested
GoSlices & collections

Find an item’s index

Find an item’s index using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptArray traversal & selection

Find the first matching array item

JavaScript: find returns undefined when no item satisfies the predicate.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Find the first matching array item

TypeScript: find returns undefined when no item satisfies the predicate.

TypeScript✓ Tested