Results for “copy”
Small, practical examples. Search by task or narrow things down below.
Find shared set members
Java: Copy a set before retainAll when the original must remain unchanged.
Java✓ Tested
Give an existing image another tag
Docker / Compose: Tagging adds a reference without copying the image layers.
Docker / Compose✓ Tested
Inspect every command status in a pipeline
Bash Scripts: Copy PIPESTATUS immediately before another command overwrites it.
Bash Scripts✓ Tested
Keep caller data unchanged by passing a structure by value
C: A value parameter is a copy of the original structure.
C✓ Tested
Merge configuration maps with override precedence
PowerShell: Copy defaults before applying override keys so the original remains unchanged.
PowerShell✓ Tested
Merge two sorted arrays
C: Advance the pointer belonging to the smaller next element and copy any remaining suffix.
C✓ Tested
Read a file from a commit
Inspect committed content without changing your working copy.
show✓ Tested
Save a stream while displaying it
Linux Commands: Use tee to write a copy of standard input to a file.
Linux Commands✓ Tested
Stop tracking a generated file while keeping it locally
Git: Removing a path from the index leaves its working copy intact when cached is specified.
Git✓ Tested
Store a bounded null-terminated text setting
Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.
Arduino / C✓ Tested
Store a reference in a standard container
C++: reference_wrapper preserves reference semantics while behaving like a copyable container element.
C++✓ Tested
Store and retrieve a multibyte integer
Arduino / C: put and get copy the bytes of a typed value.
Arduino / C✓ Tested