FIND YOUR NEXT FEW LINES

Results for “keep original”

Small, practical examples. Search by task or narrow things down below.

169 snippets foundClear filters
Linux CommandsArchives & checksums

Compress a file and keep the original

Create a gzip-compressed copy of a file while leaving the uncompressed original in place.

gzip✓ Tested
CStructures & function interfaces

Keep caller data unchanged by passing a structure by value

C: A value parameter is a copy of the original structure.

C✓ Tested
TypeScriptCollections & records

Filter and transform an array

Keep active objects and extract their names.

filter✓ Tested
PythonStrings & dates

Replace text in a string

Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.

string✓ Tested
PowerShellFile operations & integrity

Append a line while keeping earlier content

PowerShell: Add-Content appends using an explicitly selected encoding.

PowerShell✓ Tested
GitStashing selected work

Apply a stash while keeping the saved entry

Git: Apply restores changes without removing the stash reference.

Git✓ Tested
GitStashing selected work

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
AngularTemplates & bindings

Hide an element while keeping it mounted

Hide an element while keeping it mounted with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CSSBox dimensions & overflow

Hide an element while keeping its space

CSS: Visibility hidden preserves layout geometry even though the element is not painted.

CSS✓ Tested
ReactPerformance & rendering

Keep a callback stable between renders

Keep a callback stable between renders with a small React component and explicit browser behavior.

React✓ Tested
CSSPositioning & stacking

Keep a child’s large z-index inside a stacking context

CSS: Isolation creates a stacking context so an internal stack level cannot outrank an outside sibling’s higher context.

CSS✓ Tested
CSSPositioning & stacking

Keep a control fixed to the viewport during scrolling

CSS: Fixed positioning normally uses the viewport when no ancestor establishes a different fixed containing block.

CSS✓ Tested