copying

SQL Server: Copying column within table

Hi, what is the easiest way to copy the all the values from a column in a table to another column in the same table? ...

Best way to copy between two Stream instances - C#

What is the best way to copy the contents of one stream to another? Is there a standard utility method for this? ...

Using an interface to convert an object from one type to another?

Suppose I have two classes with the same interface: interface ISomeInterface { int foo{get; set;} int bar{get; set;} } class SomeClass : ISomeInterface {} class SomeOtherClass : ISomeInterface {} Suppose I have an instance of ISomeInterface that represents a SomeClass. Is there an easy way to copy that into a new instance ...

Automatically Copying folders until a certain limit is reached

Greetings. 1 - Let's say I have about 500 folders of variable size with a total size of 100 GB. 2 - I want to distribute these folders automatically in other folders until the size of 700 MB is reached with the best optimization of space. Example: In folder "CD--01" I want to have the maximum number of folders possible without passing...

com.finder.desktopservices asks for admin password when copying files

Hi I am trying to copy files from my mac to a network drive. When copying the files, an empty file is created at the destination and I get a prompt saying I might have to enter an administrator password to change the file named "whatever my file name is". When I press continue, the password dialog shows it is com.apple.desktopservices w...

How do I copy my entire working copy between hard drives?

Whenever I try to copy an entire working copy using simple drag and drop between two computers (e.g. from an old computer to a new one, or from one VM to another) in order to avoid having to redownload the entire several GB set of code from our online repository I get an error as soon as I reach any of the hidden SVN-BASE files. Is ther...

C# memcpy equivalent

Hi Guys, I have 2 objects from the same type and i would like to shallow copy one state to the other. In C++ i have memcpy which is great. How can i do it in C#? The MemberwiseClone() is not good enough because it creates & returns a new object and i like to copy to an existing object. I thought of using reflection but i'm afraid it will...

Copy array of objects to array of different type

Previously, I ran into a problem trying to share a type definition between my ASMX webservice and my .aspx page (webclient) http://stackoverflow.com/questions/667619/confused-on-c-array-of-objects-and-implicit-type-conversion As I understand the advice, the "problem" this creates can be solved by copying the array of objects created in...

Can I "transplant" a ClickOnce application from one PC to another?

My wife's old work computer has a ClickOnce-deployed app on it that she now needs on her new work computer. (It runs on her old computer fine, but her old computer doesn't run fine at all, hence the new one.) The source distribution for the app is long gone; it was hosted on the workstation of an employee who left long ago. Can the ap...

copy the symbolic link in Solaris

I am trying to copy a link on Solaris OS but find that it does not simply copy the link instead copies the whole contents of the directory/file the link is poinitng to? Which is not in other OSes like AIX,HP-UX,Linux. Is this a normal behaviour of Solaris OS? ...

Forms application "Not Responding" when copying large files?

Hey Folks, 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 some Application.DoEvents() in there after each read/write action. Something...

copying a text file- c++

I'm copying over text from one file to another, with certain changes. I have input.txt, tmp.txt and output.txt. The idea is to copy a few lines over to tmp.txt (until we reach a delimiter), move the text from tmp.txt to output.txt, wipe tmp.txt and then continue the cycle until we reach the end of input.txt. I'm having trouble with ...

DOS COPY the first file in a directory

How to copy the first file in any directory starting with .rar extension? ...

AS3: copyPixels - Maintaining Transparency On Multiple Copies

I need to copy multiple images with transparency to the same BitmapData without the overlapping images' transparencies overwriting the existing pixels. By default when you use the copyPixels method on a BitmapData with transparency to a BitmapData without transparency, the images layer like I want. The issue is I need to render to a Bit...

Copying text from a textbox in C++

Specifically, a program is running and I want to extract the text from a text box inside the program. Generally, what methods/topics should I be using to "get inside" another .exe running on my system and extract data from a text box inside it using C++? I just want a pointer towards the way in which I might achieve this. Thanks. ...

Copying an NSArray with mutable copies of the original elements

I am creating an array of dictionaries in a class. I want to return a copy of that array to any other object that asks for it. This copy that is passed to other objects needs to be modified without modifying the original. So I am using the following in a getter method of my class that holds the "master" array: [[NSMutableArray alloc] i...

prevent accidental object copying in C++

In our company's coding standard, we have been told to "be aware of the ways (accidental) copying can be prevented". I am not really sure what this means, but assume that they mean we should stop classes from being copied if this is not required. What I can think of is as follows: Make the copy constructor of a class private. Make th...

How to create target directory structure for copy files in classic ASP?

Hi, I want to copy a file to target directory. It is simple with copyFile command of File system object. But I need some enhancement like, If target directory is not exist then it'll create target directory and then copy a file. Can you help me achieve it? Let me know if there are other ways to do same. Thanks. Solution: 'Create f...

How do I read hex numbers into an unsigned int in C [Solved]

I'm wanting to read hex numbers from a text file into an unsigned integer so that I can execute Machine instructions. It's just a simulation type thing that looks inside the text file and according to the values and its corresponding instruction outputs the new values in the registers. For example, the instructions would be: 1RXY -> ...

Copying delegates

I was just reading a page on events on MSDN, and I came across a snippet of example code that is puzzling me. The code in question is this: // Make a temporary copy of the event to avoid possibility of // a race condition if the last subscriber unsubscribes // immediately after the null check and before the event is raised. EventHandle...