FIND YOUR NEXT FEW LINES

Results for “list”

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

135 snippets foundClear filters
AngularGetting Started

Provide an @empty list state

Provide an @empty list state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularLists & control flow

Remove a list item by identifier

Remove a list item by identifier with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PythonCollections

Remove duplicates from a list

Remove repeated hashable values while preserving the order in which they first appeared.

list✓ Tested
C#Collections & data structures

Remove matching items from a mutable list

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

C#✓ Tested
ReactPerformance & rendering

Render a bounded preview of a long list

Render a bounded preview of a long list with a small React component and explicit browser behavior.

React✓ Tested
AngularGetting Started

Render a list with @for and stable tracking

Render a list with @for and stable tracking with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
ReactGetting Started

Render a list with stable keys

Render a list with stable keys with a small React component and explicit browser behavior.

React✓ Tested
HTMLTables & list numbering

Represent a hierarchy with nested lists

HTML: Place the nested list inside its parent list item to preserve the hierarchy.

HTML✓ Tested
HTMLTables & list numbering

Restart numbering at an individual list item

HTML: A value on one ordered-list item sets its ordinal and affects following items.

HTML✓ Tested
PythonIteration & sequences

Separate records into two lists

Python: Build two explicit partitions so callers can use both matching and rejected values.

Python✓ Tested
ReactLists & filtering

Sort a copy without mutating the original list

Sort a copy without mutating the original list with a small React component and explicit browser behavior.

React✓ Tested
JavaCollections

Sort a list

Sort a mutable Java list in natural ascending order.

Java✓ Tested