Results for “retain”
Small, practical examples. Search by task or narrow things down below.
Combine results without duplicates
Merge compatible result sets with UNION.
UNION✓ Tested
Convert a timestamp to a different fixed offset
C#: ToOffset changes the displayed local time while retaining the same instant.
C#✓ Tested
Count newline characters
Count newline bytes in a C file while retaining EOF as an int.
C✓ Tested
Delegate iteration to another iterable
JavaScript: yield-star forwards items from another iterable while retaining generator composition.
JavaScript✓ Tested
Delegate iteration to another iterable
TypeScript: yield-star forwards items from another iterable while retaining generator composition.
TypeScript✓ Tested
Exclude matching lines
Linux Commands: Use grep -v to retain lines that do not start with a comment marker.
Linux Commands✓ Tested
Expand an array into rows
Use WITH ORDINALITY to retain original element order.
unnest✓ Tested
Filter an array in place with a write index
C: Only retained values advance the write position.
C✓ Tested
Filter parents containing a matching descendant
jQuery: has retains parents with a matching descendant.
jQuery✓ Tested
Find lines unique to the first sorted file
Linux Commands: Use comm -23 to retain only records absent from the second input.
Linux Commands✓ Tested
Find shared set members
Java: Copy a set before retainAll when the original must remain unchanged.
Java✓ Tested
Hide interface controls in print layout
CSS: A print media query can retain article content while removing interactive controls.
CSS✓ Tested