copy

Keeping db structure and procs in sync

I am trying to setup a test database for automated tests to run against. I know ideally we should be using mock objects, but this is an old app and doing so isn't as easy as it should be. There's simply too much logic in the database. Anyhow, enough backstory. I'm getting a clean db setup that the tests can load with known data so th...

tfs copy folders from one team project to another

i have one TFS server, with 4 team projects in it. i want to copy folders of of one team project into another team project. here's the tree - TFS(Server) |_ A1(Team project1) |_ A2(Team project2) |______(Folder1) |______(Folder2) |______(Folder3) |______(Folder4) |_ A3(Team project3) |_ A4...

copy data from remote server -- got problem

I wanted to copy files from a remote server, but it seems that the remote host is using session, and needs cookies. well I used this method after defining variables... $url="http://example.org/exmple.mp3"; $nn = "\r\n"; $cookies=""; $request = GET . " " . str_replace ( " ", "%20", $url ) . " HTTP/1.1" . $nn . "Host: " . $host . $nn . "...

CMD: Check for quotes

Hello, Let's say, the user drag and drops an file into my batch file, which causes that the batch file copies the file to a certain directory. the problem is the following command: copy "%1" "C:\path\to\it" The problem here is the quotes around%1. When you drag and drop something in a batch file, normally, it wouldn't put quotes, so ...

tfs copy projects on same server

i have 1 tfs server with 2 different team projects - Project 1 and project 2. Project 2 is completely empty. i want to copy some asp .net project 1 folders into project 2. How do i do that? ...

Retrieve a lost subversion repository

I have a Rails application working on Passenger deployed using Capistrano from a subversion repository. The subversion repository is lost. We just have a folder named "cached-copy" which I believe has been made by svn. Is it possible to recreate a subversion repository from this "cached-copy"? ...

script to filter files

I have a directory that have a lot of files, i want to loop to each file and open it search for a specific word and then i the word found copy the file into another directory. Thanks ...

How do you get the selected text of a WPF FlowDocument?

I'm using .NET 3.5 I have a FlowDocument inside a FlowDocumentScrollViewer. I am not using RichTextBox. The FlowDocument comes with a number of "freebies", including text selection and a context menu for copy/paste. How can I find out what text is currently selected in the FlowDocument? I imagine that I could use ApplicationCommands...

Improve write speed for high speed file copy?

Hi, I've been trying to find out the fastest way to code a file copy routine to copy a large file onto a RAID 5 hardware. The average file size is around 2 GB. There are 2 windows boxes (both running win2k3). The first box is the source, where is the large file is located. And the second box has a RAID 5 storage. http://blogs.technet....

Backup configuration files

I need to be able to store configuration files on machines that gets disconnected by plugging off the electricity ;), I'm using basic WinApi to store configuration data (WriteFile), this works unless the machine is plugged off ;), sometimes file isn't saved at all. I was thinking of 2 solutions: 1) Transactional NTFS API (eg. CreateFil...

Need some major batch-fu.

I have this massive folder structure with thousands of folders and subfolders. I need to copy all the DLLs from this structure into a single folder. I've tried the xcopy *.dll c:\output /S /E but that copies the DLLs with the structure. Is there a way to do what I want in a batch file using DOS commands only. ...

get FileChannel without using java.io.* (use pure NIO)

Recently I got a comment to this answer that I should stay away from java.io if I want to use "pure NIO". This is the simplified code (copy a file): private static void copy(File source, File destination) throws IOException { long length = source.length(); FileChannel input = new FileInputStream(source).getChannel(); FileCha...

Copy NSMutablearray to another

I am trying to copy mutablearray to another but it does not show me anything at the UItableview NSMutableArray *objectsToAdd= [[NSMutableArray alloc] initWithObjects:@"one",@"two"]; NSMutableArray *myArray = [[NSMutableArray alloc] initWithObjects:objectsToAdd,nil]; NSMutableArray *list = [[NSMutableArray alloc] init]; [self.list add...

Intelligent file copy algorithm (os independent)

Hi, I'm trying to create, a fast and somewhat intelligent file copy algorithm (in c# but platform independent). My goals: I don't want to use any platform specific code (no pinvokes or anything) I'd like to take advantage of multiple cores but this seems stupid since doing simultaneous reads/writes would seem slower right? (correct ...

Copy a class to another?

I have class A { public int a; public string b; } How can i copy A to another A? In C++ i know i could do *a1 = *a2;. Is there something similar in C#? I know i could write a generic solution using reflection but i hope something exist already. I'm considering changing A to a nullable struct. Step 2 i'll need to do class B ...

Copy part of scaled UIImage

I want to be able to scale and position an image, and then save just part of that image. I currently have a UIImageView inside a UIScrollView. After zooming and positioning the image I hit a button and then have the following code. // imageScale = current scale of UIView // get the new width and height of the scaled UIView float scaledI...

jQuery Clipboard Copy

I need Clipboard Copy functionality, even i m taking help from http://plugins.jquery.com/project/copy link but it is not working fine. <li> <label class="FieldName"> Url: </label> <a id="url" href="<%=Model.FinalPacketUrl %>" target="_blank"> <%=Model.FinalUrl %></a> </li> <li> <label class="FieldNa...

Copy to clipboard not working on FireFox

I had implemented copy to clipboard functionality. It is working fine with all version on IE but not working in FireFox. Please help me solve out this problem. Detail are <script src="../../Scripts/JQPlugins/jquery.clipboard.js" type="text/javascript"></script> <script src="../../Scripts/JQPlugins/jquery.clipboard.pack.js" type="text/j...

SharePoint: Apply source ContentType to destination when copying a SPListItem

Greetings, I've written my own ContentType definition that can be applied to any Document Library. I would like to preserve the data associated with an item via my ContentType when that item is copied by the user to a Document Library to which my ContentType definition is not yet attached. The obvious thing to do, it seems, is to catc...

Copy a javascript URL 'as-is' from a link in a web page?:

I want to copy a javascript URL-char for char. How, for example, would I successfully copy the javascript from the 'View Source' link on this page: http://javascript.about.com/library/blsource.htm doing something like(?): (function(){ var w=open('',''); with(w.document) { write(encodeBlahComponent(document.activeElem...