FIND YOUR NEXT FEW LINES

Results for “copy”

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

62 snippets foundClear filters
JavaQueues & collection operations

Find shared set members

Java: Copy a set before retainAll when the original must remain unchanged.

Java✓ Tested
Docker / ComposeImage management

Give an existing image another tag

Docker / Compose: Tagging adds a reference without copying the image layers.

Docker / Compose✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Inspect every command status in a pipeline

Bash Scripts: Copy PIPESTATUS immediately before another command overwrites it.

Bash Scripts✓ 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
PowerShellHashtables & object records

Merge configuration maps with override precedence

PowerShell: Copy defaults before applying override keys so the original remains unchanged.

PowerShell✓ Tested
CArray transformations

Merge two sorted arrays

C: Advance the pointer belonging to the smaller next element and copy any remaining suffix.

C✓ Tested
GitCommits & history

Read a file from a commit

Inspect committed content without changing your working copy.

show✓ Tested
Linux CommandsStreams & byte tools

Save a stream while displaying it

Linux Commands: Use tee to write a copy of standard input to a file.

Linux Commands✓ Tested
GitRestoring & revising local work

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
Arduino / CEEPROM & program memory

Store a bounded null-terminated text setting

Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.

Arduino / C✓ Tested
C++Ownership & optional values

Store a reference in a standard container

C++: reference_wrapper preserves reference semantics while behaving like a copyable container element.

C++✓ Tested
Arduino / CEEPROM & program memory

Store and retrieve a multibyte integer

Arduino / C: put and get copy the bytes of a typed value.

Arduino / C✓ Tested