Results for “items”
Small, practical examples. Search by task or narrow things down below.
Find what remains after division
C++: Use the remainder operator to count items left after forming complete groups.
C++✓ Tested
Find what remains after division
C: Use the remainder operator to count items left after forming complete groups.
C✓ Tested
Flatten nested collections with SelectMany
C#: Concatenate the items from several sequences into one sequence.
C#✓ Tested
Give an item the remaining horizontal space
CSS: A growing flex item absorbs free space after fixed items have been sized.
CSS✓ Tested
Remove matching elements
Remove selected list items from the DOM with jQuery.
jQuery✓ Tested
Replace an array segment in place
JavaScript: splice returns removed items and inserts replacements at the chosen position.
JavaScript✓ Tested
Replace an array segment in place
TypeScript: splice returns removed items and inserts replacements at the chosen position.
TypeScript✓ Tested
Restart numbering at an individual list item
HTML: A value on one ordered-list item sets its ordinal and affects following items.
HTML✓ Tested
Test whether an array contains a value
PowerShell: The contains operator compares complete items rather than matching substrings.
PowerShell✓ Tested
Turn JSON into typed rows
Project JSON array items into SQL columns.
OPENJSON✓ Tested
Visit adjacent pairs
Python: Use itertools.pairwise to process neighboring items without indexing.
Python✓ Tested