copy

How to copy only values in excel vba from a range?

一世执手 提交于 2019-12-09 03:50:38
问题 I'm trying to copy values from a table to a Range, in Excel using vba Macros, but I dont want the table format, only its values. How can I achieve this? Here is part of the code: 'Source range Set r = Sheets("Sheet1").Range("Table1") 'Destination range Set dest = Range(.Cells(linhaAtual, 1), .Cells(linhaAtual + r.Rows.Count - 1, 5)) r.Copy Destination:= dest 回答1: You can skip the copy command altogether by assigning the values of the source range to your destination range: 'Source range Set r

Xcode - build phase or script for copying only modified files to App Bundle

橙三吉。 提交于 2019-12-09 00:42:34
Mac OS X 10.5 compatibility required. Xcode 3.2.5. My app looks in the bundle's Resources folder, for a "data" folder. "data" contains a hierarchy of subfolders and data. The contents are constantly being modified. I don't need to navigate or modify this data within Xcode. Q. When building, how can I copy "data" (say, from the Xcode project's folder) to the Resources folder, but only copying those files within "data" that have been modified since the last build? (Simply copying all files every time I build is not feasible; the file sizes are too large, slowing build times.) Thanks for any help

Copying an Object in Java without affecting the original via copy constructor

折月煮酒 提交于 2019-12-09 00:11:45
问题 I'm trying to copy an Object, which will then be modified, without changing the original object. I found this solution and it seemed the best approach would be a copy constructor - from my understanding, this would give me a deep copy (a completely separate object from the original). So I tried that. However, I've noticed that when the following code executes, it's effecting all previous objects from which it was copied. When I call surveyCopy.take() , which will change values inside of the

Computing estimated times of file copies / movements?

十年热恋 提交于 2019-12-08 18:01:14
问题 Inspired by this xckd cartoon I wondered exactly what is the best mechanism to provide an estimate to the user of a file copy / movement? The alt tag on xkcd reads as follows: They could say "the connection is probably lost," but it's more fun to do naive time-averaging to give you hope that if you wait around for 1,163 hours, it will finally finish. Ignoring the funny, is that really how it's done in Windows? How about other OS? Is there a better way? 回答1: Have a look at my answer to a

PHP Copy command failing when spaces?

余生颓废 提交于 2019-12-08 17:23:10
问题 I am executing the following commands: <?php copy ("http://localhost/.../DSCF8253.JPG" , "sites/default/files/DSCF8253.JPG"); // Success! copy ("http://localhost/.../DSCF8260.JPG" , "sites/default/files/DSCF8260.JPG"); // Success! copy ("http://localhost/.../HERMAN 085.jpg" , "sites/default/files/HERMAN 085.jpg" ); // Fail! ?> The first two copy fine, but not the last one. Why? It must have something to do with the filenames (the last one has a SPACE before the 085). Any help would be greatly

When does returning a value outside of a function uses move vs copy?

橙三吉。 提交于 2019-12-08 16:44:07
问题 After reading this question. I created this small little test: class A{ public: A(){} A(const A&){printf("copy\n");} A(A&&){printf("move\n");} static A f(){ A a; return a;} static A g(){ A a; return (a);}//could be return *&a; too. static A h(){ A a; return true?a:a;} }; The result is (without RVO and NRVO): f uses move g uses move h uses copy As far as I know the rules used to decide whether to use copy or move are described in 12.8.32: When the criteria for elision of a copy operation are

File copy using robo copy and process

a 夏天 提交于 2019-12-08 15:46:35
问题 I am creating a File copy program which will copy large number of files(~100,000) with size ~50 KB using ROBOCOPY command. For each file, I am creating a new process and passing the ROBOCOPY command and arguments as follow: using (Process p = new Process) { p.StartInfo.Arguments = string.Format("/C ROBOCOPY {0} {1} {2}", sourceDir, destinationDir, fileName); p.StartInfo.FileName = "CMD.EXE"; p.StartInfo.CreateNoWindow = true; p.StartInfo.UseShellExecute = false; p.Start(); p.WaitForExit(); }

How to use the Copy-Item cmdlet correctly to copy piped files

人盡茶涼 提交于 2019-12-08 14:58:09
问题 I am building a small script which should copy all .zip files to a special folder called F:\tempzip . I tried it with Copy-Item cmdlet, but I didn't manage to do it. The script should copy all files from this folder (recursively) which are ".zip". This is the part of the script I am talking about: get-childitem F:\Work\xxx\xxx\xxx -recurse ` | where {$_.extension -eq ".zip"} ` | copy-item F:\tempzip What do I have to add? 回答1: When piping items to copy-item you need to tell it that "F:

Qt or PyQt - check when file is used by another process. Wait until finish copy

余生颓废 提交于 2019-12-08 13:57:28
问题 Good morning, What is the best strategy for check when a big file o big directory has finished to copy? I want wait until a file has finish fully to copy. Is there a code example in q I'm working on mac os x. thanks Update I use QFileSystemWatcher. the problem is that I receive file or directory change notification when o copy it is in progress. So user copy a big folder (inside many files), the operating system copy process start, it take 5 minuts, but in same times my application receive

Recursive function for copy of multilevel folder is not working

倾然丶 夕夏残阳落幕 提交于 2019-12-08 13:44:45
问题 Recursive function for copy of multilevel folder is not working. I have a code to copy all the mulitilevel folder to new folder. But in between I feel there is problem of proper path recognition, see the code below.. <?php $source = '/var/www/html/pranav_test'; $destination = '/var/www/html/parth'; copy_recursive_dirs($source, $destination); function copy_recursive_dirs($dirsource, $dirdest) { // recursive function to copy // all subdirectories and contents: if(is_dir($dirsource)) { $dir