copy

Efficient extraction of file from jar

I have an application written in Java that uses a jar file(it uses more than one, but that's not the point). The fact is, the Jar file I'm using contains files that I absolutely MUST extract to the filesystem. So far I'm using Class.getResourceAsStream and FileOutputStream, but this method is somewhat slow. Note that some of these file...

How to Paste a pre-formated text in the cursor position in VS2008?

Hello There! I'm creating an application to help with e-mail replying, so I got a few sample mensages I want to Paste into the e-mail text page, starting from the cursor position. Imagine, I got this app with Button1,2,3,4 etc, and associated to each button is a pre-formated text, so when I hit Button1 it will Paste the text, starting ...

What JavaScript object copy function works with greasemonkey?

I know there is another question related to copying objects in JavaScript here, but the code they provide does not work with greasemonkey. From what I was able to trace, the code for the accepted answer dies/ stops at the line : var temp = new obj.constructor(); Is there any way to see what went wrong ? It's not really necessary I use...

Copy files from subfolder to folder using SSH

How do I copy all files inside /directory/subfolder to /directory using SSH? PS. I'm not going from 1 server to another, I'm just trying copy the files in the subfolder to update the site... ...

vi search copy paste search copy

Hi, I was just wondering if anyone could help out with how to do the following using vi. I have a text file and it might contain something like start of text file: --something1.something2-- --anotherThing1.something2-- end of text file: If I want to take this line and convert it by way of searching for anything matching the first oc...

How to copy multiple files from server to local hard disk in one http request using C++?

How do you copy a group of files from server machine to local hard disk through a C++ web application in one request? This is kind of downloading bulk files to your local machine from a server. I guess in Java you could do this through ZipInputStream and GZipInputStream. Is it possible to achieve this entirely through server side code? ...

Record file copy operation with Git

When I move a file in git using git-mv the status shows that the file has been renamed and even if I alter some portions it still considers to be almost the same thing (which is good because it lets me follow the history of it). When I copy a file the original file has some history I'd like to associate with the new copy. I have tried...

Setting author field in SPListItem won't persist

I am trying to copy an SPListItem (with file) from one site collection to another. I do this by creating the file like this: var archiveFile = newsArchive.Lists[listName].RootFolder.Files.Add(originalItem.File.Name, originalItem.File.OpenBinary()); var archiveItem = archiveFile.Item; through a utility method I wrote i then set all fie...

How can I copy an item from references to disk? (c#)

For example, I have a flash movie in my references. How do I copy this to a location outside of the application? ...

Need a PowerShell script that copies files from the current dir that the script is run from to another location

Hi all, I have a pretty basic PowerShell script that I need help with. This is my first time even attempting to script so bare with me. I work for a software development and they have asked me to write a script that they can package in with their build updates. Basically they will complete a build that get's dropped to a folder (say \se...

Copy Folder/File wiithout modifying attributes?

Is it possible to copy a file or a folder from one location to another without modifying its attribute data? For example if I have a folder on a network drive and it was created on 2/3/2007 and I want to copy it to my c: drive .. but leave the date/time stamp as 2/3/2007...is that possible? ...

where is lstrncpy's head file?

I know lstrcpy is used for string copy for both unicode and ascii, But I can not use lstrncpy, because I can't find the head file. What is the name of the head file, I googled it, and find someone is using it. Many thanks! ...

How do I make a generic class to represent a range using .NET?

I've been trying to make a generic class to represent a range of values but am having some difficulty trying to work out what I'm missing (the compiler comlplains about a missing copy constructor, but all the implementations I've tried have failed). So my questions: Is there a Range template somewhere I've missed to avoid me reinventin...

SQLite: Copy all values from a previous row with one substitution.

Hi y'all, Using SQLite I need to copy nearly all of an existing row from a table, make a change to a single column, and insert the new row into the table. Something roughly like INSERT INTO $tablename (c1, c2, ... , cn) SELECT (c1, c2, ... , cn) FROM $tablenam I tried substituting a some value ci into the the list of SELECT colu...

How do I copy a folder and all subfolders and files in .NET?

I'd like to copy folder with all its subfolders and file from one location to another in .NET. What's the best way to do this? I see the Copy method on the System.IO.File class, but was wondering whether there was an easier, better, or faster way than to crawl the directory tree. ...

SVN: Can I copy a subset of files to a new tag?

In my repo trunk I have a directory unit-tests that I want to keep out of my release tags. What I've been doing is copying trunk to a new tag, then deleting unit-tests. Is this OK? It feels wrong because it takes two revisions to tag every release. Is there a way to exclude a directory from the svn copy? E.g. I have: /trunk/unit-tests ...

Fastest way to copy a single large (30,000 rows) table from one database to another?

I've got a large table in a SQL Server 2005 database and I'd like to copy it over to another database. What's the fastest way to do this? Is there a shortcut to linking servers and doing inserts? ...

clone flex component

Hey I am trying to duplicate a flex component at run time. For example if i have this mx:Button label="btn" id="btn" click="handleClick(event)"/> i should be able to call a function called DuplicateComponent() and it should return me a UI component thts exactly same as above button including the event listeners with it. Can some one ...

How to "clone" an object into a subclass object?

Hi, I have a class 'A' and a class 'B' that inherits class 'A' and extends it with some more fields. Having an object 'a' of type 'A', how can I create an object 'b' of type 'B' that contains all data that object 'a' contained? I have tried a.MemberwiseClone() but that only gives me another type 'A' object. And I cannot cast 'A' into '...

How can I obtain the displayed value instead of actual value in Excel?

I have a cell containing a date ex. "05/11/09" It is currently displayed as "11-MAY-09". How do I copy-paste or use VBA to get the string "11-MAY-09" into the cell next to it ( NOT "05/11/09")? I can't figure it out other than piecing out the date pieces by itself. ...