Questions tagged [copying]

This tag refers to the process of making an exact duplicate of a file, database, etc.

Use this tag for questions related to copying files, databases, etc. on a system.

374 questions
3
votes
2 answers

What interface will copy cstrings, arrays, and other types to instances of the same type?

Not all instances of a type can be copied to another instance of the same type with an = sign. For example, although it may work on ints: int x = 0; int y = 5; x = y; //x is now: 5 It would not work on char arrays: char x[32]="data to…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
3
votes
1 answer

Selecting a random element from a certain range in a list - python

I am creating a hangman game where i have a list that contains 5 secret words and a hint for each respective word that is read from a text file: list = ['word1', 'hint1', 'word2', 'hint2','word3', 'hint3','word4', 'hint4','word5', 'hint5'] I need…
3
votes
2 answers

Why we must do defensive copying for imutable classes

why we must do Defensive Copying in order to achieve Immutable class? Look at this code: public final class EmailMessage { private final String from; private final String to; private final String message; private final Date …
MaxDevelop
  • 637
  • 1
  • 4
  • 16
3
votes
1 answer

C# - Copying files from an Android Device to desktop

So I want to make a program in C# that allows users to import/export files between an Android's device and a PC. Could someone point me in the right direction because I'm lost, I've read some suggestions on the internet that MTP might have something…
Tim
  • 95
  • 1
  • 3
  • 7
3
votes
2 answers

Visual Studio 2008 project reference

I have a problem with the "Copy to output" functionality in Visual Studio 2008. Maybe I'm misunderstanding how its supposed to work. I have a solution with four projects: TestApp1 (Windows application) TestAppA (Windows application) TestProj1…
Nitramk
  • 1,542
  • 6
  • 25
  • 42
3
votes
1 answer

Powershell - Copying Files to a share

This is my first post so be gentle. I'm starting to use Powershell and found it very intuitive and would like some advice/examples on how to properly script something specific instead of just copying files from one place to another. Files…
3
votes
1 answer

looking for an efficient way to alternate between 2 queues in php

I wrote the following code to print a binary tree row by row. The idea is to use 2 queues and alternate between them. I'm swapping the 2 queues by using a $tmp variable. I don't think this is efficient since I'm copying arrays. Is there a better way…
Jack Peng
  • 576
  • 5
  • 19
3
votes
2 answers

Deduping and copying files in Bash?

I need your help guys! I'll try to be as specific as possible. Scenario: I have a MOUNTED image on a Linux Distro. I copied all the files in this mounted Distro to a folder I have on my Linux System called "raw" (in a sub directory of Files...so…
3
votes
3 answers

Empty .net project just for copying files to output folder?

I have a large 'product' which is deployed as a set of zip files (separated into Web Apps, Web Services, Database, Tools, etc.). I currently use MSBuild to collect files from VSS, build, zip and copy to a network share. I'm moving to TFS and while…
Simes
  • 41
  • 3
3
votes
1 answer

Pop() etiquette

Situation: I'm implementing a list-like container that supports a Pop() function that should return the user the const char* stored at the front of the container. However, I'm not sure as an implementer whether or not I should be returning the…
Erika Electra
  • 1,854
  • 3
  • 20
  • 31
2
votes
4 answers

How can I use a HashMap as a way to access and copy items from a list?

I am working on a videogame with a friend. To account for different types of items, we originally had a class for each item extending an Item class. There wasn't much data in these classes, so I was looking for an alternative so that our workspace…
jchitel
  • 2,999
  • 4
  • 36
  • 49
2
votes
8 answers

Forms application "Not Responding" when copying large files?

I've got a file organizer application I'm working on. The files are regularly 500MB to 2GB. Everything works fine, but it is extremely annoying that the application "Stops Responding." What I'd like to do is a byte by byte or meg by meg copy with…
Aaron
  • 802
  • 7
  • 17
2
votes
1 answer

Copying objects in js (need guidance on pass by reference from docs)

I looked in the js docs and while studying the doc it mentioned in object.assign() If the source value is a reference to an object, it only copies the reference value. In my below snippet, one alters the original object and the other doesn't var…
Bilal Malik
  • 23
  • 1
  • 9
2
votes
1 answer

Copying visual studio projects between solutions

Whats the easiest way to copy a visual studio project between distinct solutions? can i just copy the folder containing the project data in windows explorer?
richzilla
  • 40,440
  • 14
  • 56
  • 86
2
votes
1 answer

Copying png file from a folder to another

I have a PNG file in a folder, I want to copy this file to another folder. Is there a easy way to do this ? Example: //Creating PNG File file = new File(Environment.getExternalStorageDirectory() +…
rahul
  • 2,758
  • 5
  • 32
  • 53