FIND YOUR NEXT FEW LINES

Results for “collection”

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

146 snippets foundClear filters
Arduino / CArrays & embedded state

Advance an index around a fixed collection

Arduino / C: Modulo wraps a bounded nonnegative index to zero.

Arduino / C✓ Tested
C#Collections & data structures

Combine collections as a distinct set

C#: Union retains each value once across both inputs.

C#✓ Tested
PythonGetting Started

Count the items in a collection

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

Python✓ 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
JavaGetting Started

Count the items in a collection

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

Java✓ Tested
JavaScriptGetting Started

Count the items in a collection

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

JavaScript✓ Tested
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
jQueryCollections & styling

Exclude elements from a collection

jQuery: not removes matching elements from the current selection.

jQuery✓ Tested
ReactCustom hooks

Expose immutable collection operations

Expose immutable collection operations with a small React component and explicit browser behavior.

React✓ Tested
PowerShellHashtables & object records

Find differences between two collections

PowerShell: Compare-Object marks reference-only values with a left arrow and difference-only values with a right arrow.

PowerShell✓ Tested