Results for “Object behavior & collections”
Small, practical examples. Search by task or narrow things down below.
Sort and deduplicate values
Sort a C++ vector and erase adjacent duplicates.
C++✓ Tested
Sort dictionaries by a value
Sort a list of dictionaries by a numeric field, leaving the original list unchanged.
sort✓ Tested
Sort values with LINQ
Create an ascending sequence from C# integer values.
C#✓ Tested
Span a group header across several rows
HTML: Rowspan can label a group of related rows without repeating the label.
HTML✓ Tested
Span one header across several columns
HTML: Colspan lets a heading cover a defined number of columns in the table grid.
HTML✓ Tested
Start a disclosure open while keeping it collapsible
HTML: The open attribute sets the initial details state without JavaScript.
HTML✓ Tested
Start a named queue explicitly
jQuery: Named queues wait until dequeue starts them.
jQuery✓ Tested
Stop a child event from reaching its parent
jQuery: stopPropagation leaves other handlers on the same element intact.
jQuery✓ Tested
Stop a nested click from reaching its parent
Stop a nested click from reaching its parent with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Stop an event from reaching a parent handler
Stop an event from reaching a parent handler with a small React component and explicit browser behavior.
React✓ Tested
Stop current animation and discard later work
jQuery: stop with clearQueue and jumpToEnd finishes the current animation and removes pending ones.
jQuery✓ Tested
Store and cancel a timer handle
Store and cancel a timer handle with a small React component and explicit browser behavior.
React✓ Tested