Results for “Array traversal & selection”
Small, practical examples. Search by task or narrow things down below.
Exclude elements from a collection
jQuery: not removes matching elements from the current selection.
jQuery✓ Tested
Expose immutable collection operations
Expose immutable collection operations with a small React component and explicit browser behavior.
React✓ Tested
Filter history by its author identity
Git: The author filter selects commits by their recorded author metadata.
Git✓ Tested
Find a commit that changed the count of a text string
Git: The pickaxe -S option finds commits that add or remove occurrences of a literal string.
Git✓ Tested
Find a sample range in one pass
Arduino / C: Initialize extrema from the first element of a nonempty array.
Arduino / C✓ Tested
Find a value in a small lookup table
Arduino / C: A linear scan is simple and predictable for a small fixed array.
Arduino / C✓ Tested
Find the second-highest distinct value
SQL: Select the maximum below the overall maximum to skip ties at the top.
SQL✓ Tested
Find the second-highest distinct value
SQL Server: Select the maximum below the overall maximum to skip ties at the top.
SQL Server✓ Tested
Find the second-highest distinct value
Postgres: Select the maximum below the overall maximum to skip ties at the top.
Postgres✓ Tested
Find the second-highest distinct value
SQLite: Select the maximum below the overall maximum to skip ties at the top.
SQLite✓ Tested
Flatten a single nesting level
JavaScript: flat defaults to a depth of one and creates a new array.
JavaScript✓ Tested
Flatten a single nesting level
TypeScript: flat defaults to a depth of one and creates a new array.
TypeScript✓ Tested