Results for “select”
Small, practical examples. Search by task or narrow things down below.
Copy a range without changing the source
JavaScript: Array.slice returns a shallow copy of the selected half-open range.
JavaScript✓ Tested
Copy a range without changing the source
TypeScript: Array.slice returns a shallow copy of the selected half-open range.
TypeScript✓ Tested
Count commits reachable from a revision
Git: rev-list --count counts reachable commits without printing commit identifiers.
Git✓ Tested
Create a branch at the original base of a stash
Git: stash branch checks out the stash’s base and reapplies the saved work there.
Git✓ Tested
Display a hint for a truly empty container
CSS: The empty selector requires no element or text children, including whitespace text nodes.
CSS✓ Tested
Exclude a directory from a recursive search
Linux Commands: Use prune to avoid descending into generated dependencies.
Linux Commands✓ Tested
Exclude elements from a collection
jQuery: not removes matching elements from the current selection.
jQuery✓ Tested
Extract a filename from a path
Linux Commands: Use basename with an explicit suffix when removing a known extension.
Linux Commands✓ Tested
Extract a parent directory from a path
Linux Commands: Use dirname without needing the path to exist.
Linux Commands✓ 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 empty regular files
Linux Commands: Use the empty predicate with a file type constraint.
Linux Commands✓ Tested