FIND YOUR NEXT FEW LINES

Results for “items”

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

59 snippets foundClear filters
JavaQueues & collection operations

Remove collection items that satisfy a condition

Java: Use removeIf on a mutable collection to avoid changing it manually inside a for-each loop.

Java✓ Tested
C#Collections & data structures

Remove matching items from a mutable list

C#: List.RemoveAll returns how many items it removed.

C#✓ Tested
JavaScriptArray traversal & selection

Separate a first item from the remaining items

JavaScript: Array destructuring and a rest element produce named pieces of a sequence.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Separate a first item from the remaining items

TypeScript: Array destructuring and a rest element produce named pieces of a sequence.

TypeScript✓ Tested
CSSLayout

Space items with gap

Use CSS gap instead of margins between flex children.

CSS✓ Tested
CSSFlexbox alignment

Stack flex items vertically

CSS: Flex-direction column makes the main axis vertical.

CSS✓ Tested
AngularLists & control flow

Style the first and last list items

Style the first and last list items with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CSSLayout

Wrap a row of items

Allow CSS flex items to wrap when a row runs out of space.

CSS✓ Tested
CSSGrid placement

Center a small item in a grid cell

CSS: Place-items sets both block-axis and inline-axis item alignment.

CSS✓ Tested
PythonGetting Started

Visit every item in a collection

Python: Print each element in the collection’s original order.

Python✓ Tested
C#Getting Started

Visit every item in a collection

C#: Print each element in the collection’s original order.

C#✓ Tested
JavaGetting Started

Visit every item in a collection

Java: Print each element in the collection’s original order.

Java✓ Tested