Search Results

Search found 12603 results on 505 pages for 'shadow copy'.

Page 7/505 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • .net File.Copy very slow when copying many small files (not over network)

    - by Guavaman
    I'm making a simple folder sync backup tool for myself and ran into quite a roadblock using File.Copy. Doing tests copying a folder of ~44,000 small files (Windows mail folders) to another drive in my system, I found that using File.Copy was over 3x slower than using a command line and running xcopy to copy the same files/folders. My C# version takes over 16+ minutes to copy the files, whereas xcopy takes only 5 minutes. I've tried searching for help on this topic, but all I find is people complaining about slow file copying of large files over a network. This is neither a large file problem nor a network copying problem. I found an interesting article about a better File.Copy replacement, but the code as posted has some errors which causes problems with the stack and I am nowhere near knowledgeable enough to fix the problems in his code. Are there any common or easy ways to replace File.Copy with something more speedy?

    Read the article

  • C++ copy-construct construct-and-assign question

    - by Andy
    Blockquote Here is an extract from item 56 of the book "C++ Gotchas": It's not uncommon to see a simple initialization of a Y object written any of three different ways, as if they were equivalent. Y a( 1066 ); Y b = Y(1066); Y c = 1066; In point of fact, all three of these initializations will probably result in the same object code being generated, but they're not equivalent. The initialization of a is known as a direct initialization, and it does precisely what one might expect. The initialization is accomplished through a direct invocation of Y::Y(int). The initializations of b and c are more complex. In fact, they're too complex. These are both copy initializations. In the case of the initialization of b, we're requesting the creation of an anonymous temporary of type Y, initialized with the value 1066. We then use this anonymous temporary as a parameter to the copy constructor for class Y to initialize b. Finally, we call the destructor for the anonymous temporary. To test this, I did a simple class with a data member (program attached at the end) and the results were surprising. It seems that for the case of b, the object was constructed by the copy constructor rather than as suggested in the book. Does anybody know if the language standard has changed or is this simply an optimisation feature of the compiler? I was using Visual Studio 2008. Code sample: #include <iostream> class Widget { std::string name; public: // Constructor Widget(std::string n) { name=n; std::cout << "Constructing Widget " << this->name << std::endl; } // Copy constructor Widget (const Widget& rhs) { std::cout << "Copy constructing Widget from " << rhs.name << std::endl; } // Assignment operator Widget& operator=(const Widget& rhs) { std::cout << "Assigning Widget from " << rhs.name << " to " << this->name << std::endl; return *this; } }; int main(void) { // construct Widget a("a"); // copy construct Widget b(a); // construct and assign Widget c("c"); c = a; // copy construct! Widget d = a; // construct! Widget e = "e"; // construct and assign Widget f = Widget("f"); return 0; } Output: Constructing Widget a Copy constructing Widget from a Constructing Widget c Assigning Widget from a to c Copy constructing Widget from a Constructing Widget e Constructing Widget f Copy constructing Widget from f I was most surprised by the results of constructing d and e.

    Read the article

  • How to copy path on a mac?

    - by AngryHacker
    Windows refugee here. On Windows you can easily copy the path and paste it elsewhere to get to the directory. Here is the situation on the Mac. I am in the Finder 20 folders down and I see the file I want. I go to my application and want to open it, so I pick Open Document from the File menu. However, it is exceedingly difficult and time-consuming to get to the place I want. Is there a way to copy the path in the finder and paste it in the File Open dialog of my application?

    Read the article

  • Rendering shadow sprites in cocos2d-x

    - by lukeluke
    I am writing a 2D game with cocos2d-x. I want to put a "shadow" sprite on a background sprite using the equation: MAX(0, Cd*1 - Cs*S) where Cd is the destination color (that is, a background pixel), Cs is the source color (the shadow pixel) , S is the scale factor (between 0 and 1). The MAX() function is used to avoid negative results. This is a lighting effect: when the shadow sprite pixel is 0, there is no effect on the background pixel, otherwise, the background pixel becomes darker. Now, the only way that comes to my mind is to change the blending equation to GL_FUNC_SUBTRACT, but it doesn't compile with cocos2d-x (can't found it)... I would subclass the CCSprite class in order to implement the draw() method in order to change, when needed, the blending equation, call the original draw() method and restore the blending equation to its previous state at the end of the method. So my questions are two: how to use glBlendEquation() with cocos2d-x? Keep in mind that i am writing a game for iphone/android/windows. are shadows handled this way in 2D games? Thx

    Read the article

  • Command-line sort and copy text files to one single file renders an error

    - by user169997
    I stumbled on question 217394 which explains how to copy files sorted alphabetically into one single file. Trying to implement the command myself rendered the following error message: The system cannot find the file specified. The command I am trying to run is here: for /f %i in ('dir /a-d /o-n /b O:\OrdersExport\Order*.txt') do @type %i C:\Users\Admin\Documents\OrderImport.txt The error does not appear if I browsed to the folder in question first: C:\O: C:\cd OrdersImport I simply want one line to copy from destination to that single file. By the way, if it matters, O: is a mapped folder over network

    Read the article

  • Is there a way to create a copy-on-write copy of a directory?

    - by BCS
    I'm thinking of a situation where I would have something that creates a copy of a directory, tweaks a few files, and then does some processing on the result. This wold be done fairly often, maybe a few dozen times a day. (The exact use case is testing patch submissions; dupe the code, patch it, build/test/report/etc.) What I'm looking for could be done by creating a new directory structure and populating it with hard links from the origonal. However this only works if all the tools you use delete and recreate files rather than edit them in place. Is there a way to have the file system do copy-on-write for a file? Note: I'm aware that many FSs use COW at a block level (all updates are done via writes to new blocks) but this is not what I want.

    Read the article

  • esxi 5.1 - copy paste host config doesn't work?

    - by w--
    I followed these instructions for esxi 5.1 to enable copy paste from the host config. (search for "To enable this option for all the virtual machines in the ESX/ESXi host:") http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1026437 But copy and paste doesn't work for new VMs or existing VMs. Did I do something wrong somewhere? I've rebooted VMs and even rebooted host. I can confirm that if I do a per VM configuration, it works. Just not a central host config. Here is a screenshot of my /etc/vmware/config file

    Read the article

  • Copy a file from source directory to target base directory and maintain source path

    - by Citizen Dos
    Forgive me, I am probably not using the right terms to describe the problem and misunderstanding the most basic usage for a couple of common commands. I have a simple find statement that is locating files that I want to copy. I want to tack on the -exec cp {} and have cp copy the file from the source directory to a new base directory, but include the full path. For example: "find . -name *.txt" locates /user/username/projects/source.txt "cp {} [now what?]" copies the file to /user/newuser/projects/source.txt

    Read the article

  • Large file copy from NFS to local disk performance drop

    - by Bernhard
    I'm trying to copy a 200GB file from an NFS mount to a local disk. The local disk is an XFS filesystem on a LVM on top of a RAID 5 system (hardware RAID controler). I'm using rsync to monitor the transfer speed. At the beginning the IO speed is about 200MB/s, stable for the first 18GB. But then the performance drops by a factor of 10-20 and never recovers to the initial rate. Sometimes it reaches about 50-100MB/s but just for a few seconds and then the process seems to hang for a bit. At the same time all file-stat operations on the target filesystem are blocking for a long time (minutes). Also interrupting the copy process blocks for several minutes, a sub-sequent delete of the partly copied file takes also several minutes. Any ideas what could be causing this?

    Read the article

  • Copy & Paste Images Wiki functionality?

    - by Jakub
    I was discussing this with some coworkers, they would like a wiki, but are turned off by the need to constantly [browse] and [upload] files. They like the functionality of Lotus Notes that they can copy & paste screenshots (or crops etc) directly into Notes databases / libraries. But they are not fans of Lotus notes behond that (performance, etc,) Anyone work with a free (open source hopefully) wiki of documenting application that just allows copy & paste of text & image content? Would be great to have one internally installed that we could use for documentation without constantly uploading/attaching files. Not sure if I am asking for functionality that is not available in a browser.

    Read the article

  • Recursively copy only new or changed files

    - by Niklas
    I'm sure this must have been asked and answered before, but I just can't find it right now... I have a Visual Studio post-build action that currently does a recursive copy (using xcopy) of an output folder to a different folder. This takes longer than I like and I'd like to only copy newly created and newer (changed) files each time (which xcopy doesn't seem to support). I cannot depend on any not-installed-by-default tool since the solution is used by different developers on different machines. What would a superuser do?

    Read the article

  • How to copy and paste code with retaining the format

    - by Sab
    This question may have been asked before but I was unable to find any solution. So here goes: When I browse and see some code that I would like to copy I simply use ctrl+c and ctrl+v. Most of the time this works fine. But in some cases (websites like stackoverflow and others ) when I copy the code and paste it , it only comes on one line in eclipse. I have tried pasting this code into eclipse and select all and hitting auto format but this doesnt help either. I have also pasted the code into komodo and word. But to no avail. The code simply refuses to align itself. Does anyone know any solution to this?

    Read the article

  • Reliable file copy (move) process - mostly Unix/Linux

    - by mfinni
    Short story : We have a need for a rock-solid reliable file mover process. We have source directories that are often being written to that we need to move files from. The files come in pairs - a big binary, and a small XML index. We get a CTL file that defines these file bundles. There is a process that operates on the files once they are in the destination directory; that gets rid of them when it's done. Would rsync do the best job, or do we need to get more complex? Long story as follows : We have multiple sources to pull from : one set of directories are on a Windows machine (that does have Cygwin and an SSH daemon), and a whole pile of directories are on a set of SFTP servers (Most of these are also Windows.) Our destinations are a list of directories on AIX servers. We used to use a very reliable Perl script on the Windows/Cygwin machine when it was our only source. However, we're working on getting rid of that machine, and there are other sources now, the SFTP servers, that we cannot presently run our own scripts on. For security reasons, we can't run the copy jobs on our AIX servers - they have no access to the source servers. We currently have a homegrown Java program on a Linux machine that uses SFTP to pull from the various new SFTP source directories, copies to a local tmp directory, verifies that everything is present, then copies that to the AIX machines, and then deletes the files from the source. However, we're finding any number of bugs or poorly-handled error checking. None of us are Java experts, so fixing/improving this may be difficult. Concerns for us are: With a remote source (SFTP), will rsync leave alone any file still being written? Some of these files are large. From reading the docs, it seems like rysnc will be very good about not removing the source until the destination is reliably written. Does anyone have experience confirming or disproving this? Additional info We will be concerned about the ingestion process that operates on the files once they are in the destination directory. We don't want it operating on files while we are in the process of copying them; it waits until the small XML index file is present. Our current copy job are supposed to copy the XML file last. Sometimes the network has problems, sometimes the SFTP source servers crap out on us. Sometimes we typo the config files and a destination directory doesn't exist. We never want to lose a file due to this sort of error. We need good logs If you were presented with this, would you just script up some rsync? Or would you build or buy a tool, and if so, what would it be (or what technologies would it use?) I (and others on my team) are decent with Perl.

    Read the article

  • Slow network file copy on Windows 7

    - by Jason V.
    I wrote a program that uses xcopy to transfer files (usually between 1KB and 2MB) over our intranet. Usually, I am copying files from my host machine (Windows 7 x64) to a VMWare virtual machine running Windows Server 2008 (the VM is running on my host machine, if that matters). On Windows XP, the file transfers usually only require a few seconds to complete. But on my Windows 7 machine, the transfer of the first file (1.5 MB) takes around 1.5 minutes to complete. This is true whether I use xcopy, robocopy, or programmatically using File.Copy(). I noticed that if I use File.Copy, the first transfer is very slow and subsequent transfers are much faster. Any clue how I can speed up the process? Is there a setting in Windows 7 (or server 2008) that I could try?

    Read the article

  • Opt-out of copy constructor

    - by sheepsimulator
    This might be a silly question, but... I've been writing a number of classes that utilize non-copyable members. These classes are never initialized via the copy constructor in my source. When I try to compile without supplying my own copy-constructor, g++ throws out many errors about how it can't build a default copy constructor, due to the non-copyable member objects. Is there a way to tell the compiler to just not give me a copy constructor?

    Read the article

  • ESXi 4.0 - cannot copy files

    - by Peter
    I am unable to copy files or make directories on my installation of VMWare ESXi 4.0. I have done so in the past (copied an iso onto a datastore). But something has changed and I have no idea what. I cannot copy using the datastore browser (get a dialog saying "Expected a PUT_FILE_DONE message. Got SESSION_COMPLETE"). I cannot create a directory through datastore browser (get a dialog saying "Cannot complete file creation operation"). When I ssh to the ESXi server I cannot create files or folders under /vmfs/volumes. But I can manipulate files elswhere (including /vmfs). Here are the permissions for the directories (I am logged in as root). ~ # ls -lh /vmfs/volumes/ drwxr-xr-t 1 root root 1.2k Sep 3 12:19 4a76f260-36b7eb85-c3b3-0024e8314929 drwxr-xr-x 1 root root 8 Jan 1 1970 4a76f261-d6190a9e-3b89-0024e8314929 drwxr-xr-t 1 root root 1.4k Sep 22 10:38 4a76f262-4ac21f0a-6bc1-0024e8314929 l--------- 0 root root 1.9k Jan 1 1970 Hypervisor1 - c42ce27f-eb8d7f70-7f70-0e7a85e8edc4 l--------- 0 root root 1.9k Jan 1 1970 Hypervisor2 - bbf1477b-4aec1d8c-caa5-5e8720bebd85 l--------- 0 root root 1.9k Jan 1 1970 Hypervisor3 - efd8efe3-03bc1cbf-15e0-080efd9e7379 drwxr-xr-x 1 root root 8 Jan 1 1970 bbf1477b-4aec1d8c-caa5-5e8720bebd85 drwxr-xr-x 1 root root 8 Jan 1 1970 c42ce27f-eb8d7f70-7f70-0e7a85e8edc4 l--------- 0 root root 1.9k Jan 1 1970 datastore1 - 4a76f260-36b7eb85-c3b3-0024e8314929 l--------- 0 root root 1.9k Jan 1 1970 datastore2 - 4a76f262-4ac21f0a-6bc1-0024e8314929 drwxr-xr-x 1 root root 8 Jan 1 1970 efd8efe3-03bc1cbf-15e0-080efd9e7379 ~ # touch /vmfs/foo.txt ~ # touch /vmfs/volumes/foo.txt touch: /vmfs/volumes/foo.txt: Operation not permitted I've googled and found nothing helpful. Does anyone out there have an idea as to what is going on? Thanks in Advance. Pete.

    Read the article

  • ESXi 4.0 - cannot copy files

    - by user21368
    I am unable to copy files or make directories on my installation of VMWare ESXi 4.0. I have done so in the past (copied an iso onto a datastore). But something has changed and I have no idea what. I cannot copy using the datastore browser (get a dialog saying "Expected a PUT_FILE_DONE message. Got SESSION_COMPLETE"). I cannot create a directory through datastore browser (get a dialog saying "Cannot complete file creation operation"). When I ssh to the ESXi server I cannot create files or folders under /vmfs/volumes. But I can manipulate files elswhere (including /vmfs). Here are the permissions for the directories (I am logged in as root). ~ # ls -lh /vmfs/volumes/ drwxr-xr-t 1 root root 1.2k Sep 3 12:19 4a76f260-36b7eb85-c3b3-0024e8314929 drwxr-xr-x 1 root root 8 Jan 1 1970 4a76f261-d6190a9e-3b89-0024e8314929 drwxr-xr-t 1 root root 1.4k Sep 22 10:38 4a76f262-4ac21f0a-6bc1-0024e8314929 l--------- 0 root root 1.9k Jan 1 1970 Hypervisor1 - c42ce27f-eb8d7f70-7f70-0e7a85e8edc4 l--------- 0 root root 1.9k Jan 1 1970 Hypervisor2 - bbf1477b-4aec1d8c-caa5-5e8720bebd85 l--------- 0 root root 1.9k Jan 1 1970 Hypervisor3 - efd8efe3-03bc1cbf-15e0-080efd9e7379 drwxr-xr-x 1 root root 8 Jan 1 1970 bbf1477b-4aec1d8c-caa5-5e8720bebd85 drwxr-xr-x 1 root root 8 Jan 1 1970 c42ce27f-eb8d7f70-7f70-0e7a85e8edc4 l--------- 0 root root 1.9k Jan 1 1970 datastore1 - 4a76f260-36b7eb85-c3b3-0024e8314929 l--------- 0 root root 1.9k Jan 1 1970 datastore2 - 4a76f262-4ac21f0a-6bc1-0024e8314929 drwxr-xr-x 1 root root 8 Jan 1 1970 efd8efe3-03bc1cbf-15e0-080efd9e7379 ~ # touch /vmfs/foo.txt ~ # touch /vmfs/volumes/foo.txt touch: /vmfs/volumes/foo.txt: Operation not permitted I've googled and found nothing helpful. Does anyone out there have an idea as to what is going on? Thanks in Advance. Pete.

    Read the article

  • Control copy/paste doesn't work

    - by Guest
    I have a laptop HP PAVILION dv6-3126er with Windows 7 Home Edition installed and neither control copy nor control paste doesn't work (i've tried: ctrl+c, ctrl+v, shift+c, shift+v, ctrl + insert, shift + insert). I've tried to run a system check through cmd with sfc /scannow, it repaired something, i restarted but it didn't solve the problem. I've also tried many key combinations (like alt+ctrl+fn), but nothing works in any program. In Microsoft Word 2003 in the menu i have no key combination for copy/paste near them (in my previous comp they've been there - in brackets). Shift+Delete works by the way. I brought this laptop a few weeks ago, and i discovered this problem in the first days. I have no viruses because i have had no time to even connect him to internet. Anyways, i checked it for viruses - it is clean. I don't want to do system restore, because i see no reason to do it for a pretty clean system. I hope it is not a problem with the laptop itself. Maybe there is another reason? Maybe i need to do some more system checks? Any suggestions? Thanks in advance.

    Read the article

  • How to assign permissions for Copy/Paste on windows

    - by jalchr
    Well, as everyone knows there is no way you can assign permissions for Copy/Paste of files on windows platform. I need to control the copy process from a central file server, in a way that helps me know: which user performed the copy Which files were copied where did he pasted them Total size of data copied Time of copy operation If user exceeds the allowed "Copy-Limit", a dialog box requests him to enter administrative credentials or deny him (as it would be configured) Store all this data in a file for later review or send by email. I need to collect this data by putting a utility program on the server itself, without any other installation on client computers. I know about monitoring the Clipboard, but which clipboard would it be? the user's clipboard or the server's clipboard ? And what about drag-drop operation, which doesn't even pass through the clipboard? Any knowledge of whether SystemFileWatcher is useful in such case ? Any ideas ?

    Read the article

  • OpenERP model tracking external resource, hooking into parent's copy() or copy_data()

    - by CB.
    I have added a new model (call it crm_lead_external) that is linked via a new one2many on crm_lead. Thus, my module has two models defined: an updated crm_lead (with _name=crm_lead) and a new crm_lead_external. This external model tracks a file and as such has a 'filename' field. I also created a unique SQL index on this filename field. This is part of my module: def copy(self, cr, uid, id, default=None, context=None): if not default: default = {} default.update({ 'state': 'new', 'filename': '', }) ret = super(crm_lead_external, self).copy(cr, uid, id, default, context=context) #do file copy return ret The intent here is to allow an external entity to be duplicated, but to retarget the file path. Now, if I click duplicate on the Lead, I get an IntegrityError on my unique constraint. Is there a particular reason why copy() isn't being called? Should I add this logic to copy_data()? Myst I really override copy() for the lead? Thanks in advance.

    Read the article

  • How to copy text from Console2?

    - by GJ
    I just started using Console2 as an alternative to cmd.exe I can't figure out how to copy text from the console to the clipboard -- dragging over it with the mouse won't mark anything, and there is no option in the right-click menu to "mark" as in cmd.exe It must be terribly obvious but I guess I'm overlooking it... :(

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >