Search Results

Search found 15087 results on 604 pages for 'copy constructor'.

Page 4/604 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Windows 7-File Copy Issue

    - by Manoj M
    I am using Windows 7 and my application server is Windows Xp. When I copy files from my local to server,it takes long time. Is there any solution for solving this ? When I copy files from Xp to Xp, it is fast. I found a soln in .net http://www.windowsreference.com/windows-7/slow-network-file-copy-issues-in-windows-7-caused-by-remote-differential-compression/ I tried it ,but no change

    Read the article

  • Copy files between two windows machines on seperate domains

    - by Simon
    I need to copy several database backups between two computers. The source computer initiates the copy and is a Windows 2000 pc and is a member of domain1. The destination machine is running Windows Server 2000 and is a member of domain2. The machines are on separate networks physically connected via a firewall. The files are currently copied via ssh with http://sshwindows.sourceforge.net/ installed on the destination machine. There is no need to encrypt the contents during the copy, however the passwords should not be sent in the clear. I am looking for a way to copy the files without having to install a server on the destination. I specifically need help with how to set up the permissions and what ports would need to be opened on the firewall.

    Read the article

  • Volume Shadow Copy Remotely?

    - by Wringley
    I'm currently running a Microsoft Server 2008 R2 box and want to utilize Volume Shadow Copy but my development machine doesn't have enough hard drive space for 30 days worth of copies, which is what I am aiming for and currently only have 5 days of backups. I have another Windows XP box and I was wondering if it was possible to remotely store the shadow copy images in my remote XP box. If it isn't possible with the built in Volume Shadow Copy, is there an open source alternative that I can utilize that has the same or similar functionality?

    Read the article

  • How to copy web page text and images to MS Word

    - by Les
    From time to time I want to copy and paste a portion of a web document (viewed in both IE Explorer 7 and 8) into MS Word 2007. The selected text copies and pastes fine, but I am left with only place holders for the images (png). Right clicking the image and clicking copy, then pasting into MS Word doesn't work either. If I paste the image into MS Paint and copy it from there, I can paste it into the Word document. What gives?

    Read the article

  • Copy open files over network

    - by redknight
    Copy open files over network- I have a situation where I ahve to copy the entire contents of a user's hard disk over the remotely over the local network and silently. I am concerned about open files the user might have. Is there a free software or method that I can use to be able to copy the hard disk of the user?

    Read the article

  • C++ copy constructor and shallow copy

    - by bartek
    Hi, suppose I have a class with many explicit (statically allocated) members and few pointers that are allocated dynamically. When I declare a copy constructor in witch I make a deep copy of manually allocated members, I wouldn't like to copy each statically allocated member explicite. How can I use implicit (default) copy constructor functionality in explicit copy constructor?

    Read the article

  • C++ Array Initialization in Function Call or Constructor Call

    - by david
    This question is related to the post here. Is it possible to initialize an array in a function call or constructor call? For example, class foo's constructor wants an array of size 3, so I want to call foo( { 0, 0, 0 } ). I've tried this, and it does not work. I'd like to be able to initialize objects of type foo in other objects' constructor initialization lists, or initialize foo's without first creating a separate array. Is this possible?

    Read the article

  • Accessing constructor from abstract base class with reflection

    - by craesh
    Hi! I'm playing around with Java's Reflection. I have an abstract class Base with a constructor. abstract class Base { public Base( String foo ) { // do some magic } } I have some further classes extending Base. They don't contain much logic. I want to instantiate them with Base's constructor, without having to write some proxy contructors in those derived classes. And of course, I want to instantiate those derived classes with Reflection. Say: Class cls = SomeDerivedClass.class; Constructor constr; constr = cls.getConstructor( new Class[] { String.class } ); // will return null Class clsBase = Base.class; constr = clsBase.getConstructor( new Class[] { String.class } ); // ok Base obj = (Base) constr.newInstance( new Object[] { "foo" } ); // will throw InstantiationException because it belongs to an abstract class Any ideas, how I can instantiate a derived class with Base's constructor? Or must I declare those dumb proxy constructors?

    Read the article

  • Java constructor with large arguments or Java bean getter/setter approach

    - by deelo55
    Hi, I can't decide which approach is better for creating objects with a large number of fields (10+) (all mandatory) the constructor approach of the getter/setter. Constructor at least you enforce that all the fields are set. Java Beans easier to see which variables are being set instead of a huge list. The builder pattern DOES NOT seem suitable here as all the fields are mandatory and the builder requires you put all mandatory parameters in the builder constructor. Thanks, D

    Read the article

  • Can a single argument constructor with a default value be subject to implicit type conversion

    - by Richard
    I understand the use of the explicit keyword to avoid the implicit type conversions that can occur with a single argument constructor, or with a constructor that has multiple arguments of which only the first does not have a default value. However, I was wondering, does a single argument constructor with a default value behave the same as one without a default value when it comes to implicit conversions?

    Read the article

  • Good style for handling constructor failure of critical object

    - by mtlphil
    I'm trying to decide between two ways of instantiating an object & handling any constructor exceptions for an object that is critical to my program, i.e. if construction fails the program can't continue. I have a class SimpleMIDIOut that wraps basic Win32 MIDI functions. It will open a MIDI device in the constructor and close it in the destructor. It will throw an exception inherited from std::exception in the constructor if the MIDI device cannot be opened. Which of the following ways of catching constructor exceptions for this object would be more in line with C++ best practices Method 1 - Stack allocated object, only in scope inside try block #include <iostream> #include "simplemidiout.h" int main() { try { SimpleMIDIOut myOut; //constructor will throw if MIDI device cannot be opened myOut.PlayNote(60,100); //..... //myOut goes out of scope outside this block //so basically the whole program has to be inside //this block. //On the plus side, it's on the stack so //destructor that handles object cleanup //is called automatically, more inline with RAII idiom? } catch(const std::exception& e) { std::cout << e.what() << std::endl; std::cin.ignore(); return 1; } std::cin.ignore(); return 0; } Method 2 - Pointer to object, heap allocated, nicer structured code? #include <iostream> #include "simplemidiout.h" int main() { SimpleMIDIOut *myOut; try { myOut = new SimpleMIDIOut(); } catch(const std::exception& e) { std::cout << e.what() << std::endl; delete myOut; return 1; } myOut->PlayNote(60,100); std::cin.ignore(); delete myOut; return 0; } I like the look of the code in Method 2 better, don't have to jam my whole program into a try block, but Method 1 creates the object on the stack so C++ manages the object's life time, which is more in tune with RAII philosophy isn't it? I'm still a novice at this so any feedback on the above is much appreciated. If there's an even better way to check for/handle constructor failure in a siatuation like this please let me know.

    Read the article

  • Getting the instance when Constructor#newInstance throws?

    - by Shtééf
    I'm working on a simple plugin system, where third party plugins implement a Plugin interface. A directory of JARs is scanned, and the implementing classes are instantiated with Constructor#newInstance. The thing is, these plugins call back into register* methods of the plugin host. These registrations use the Plugin instance as a handle. My problem is how to clean up these registrations if the constructor decides to fail and throw halfway through. InvocationTargetException doesn't seem to have anything on it to get the instance. Is there a way to get at the instance of an exception throwing constructor? P.S.: It's typically strongly advised to users that the constructor not do anything, but in practice people are doing it any ways.

    Read the article

  • Issue calling superclass method in subclass constructor

    - by stormin986
    I get a NullPointerException calling a Superclass Method in Subclass Inner Class Constructor... What's the Deal? In my application's main class (subclass of Application), I have a public inner class that simply contains 3 public string objects. In the parent class I declare an object of that inner class. public class MainApplication extends Application { public class Data { public String x; public String y; public String z; } private Data data; MainApplication() { data = new Data() data.x = SuperClassMethod(); } } After I instantiate the object in the constructor, I get a runtime error when I try to assign a value in the inner class with a superclass method. Any idea what's up here?? Can you not call superclass methods in the subclass constructor? ** Edit ** Original question was about inner class member assignment in outer class constructor. Turned out the issue was with calling a superclass method in the class's constructor. It was giving me a null pointer exception. Thus, the question has changed.

    Read the article

  • C++ superclass constructor calling rules

    - by levik
    What are the C++ rules for calling the superclass constructor from a subclass one?? For example I know in Java, you must do it as the first line of the subclass constructor (and if you don't an implicit call to a no-arg super constructor is assumed - giving you a compile error if that's missing).

    Read the article

  • In Java, is it possible for a super constructor invocation actually invoke a constructor in the calling class?

    - by John Assymptoth
    Super constructor invocation definition: [Primary.] [NonWildTypeArguments] super ( ArgumentListopt ) ; A super constructor call can be prefixed by an Primary expression. Example (taken from JLS): class Outer { class Inner{ } } class ChildOfInner extends Outer.Inner { ChildOfInner() { (new Outer()).super(); // (new Outer()) is the Primary } } Does a Primary expression exist that makes the call to super() the invocation of a constructor of the calling class? Or Java prevents that?

    Read the article

  • Copy method optimization in compilers

    - by Dženan
    Hi All! I have the following code: void Stack::operator =(Stack &rhs) { //do the actual copying } Stack::Stack(Stack &rhs) //copy-constructor { top=NULL; //initialize this as an empty stack (which it is) *this=rhs; //invoke assignment operator } Stack& Stack::CopyStack() { return *this; //this statement will invoke copy contructor } It is being used like this: unsigned Stack::count() { unsigned c=0; Stack copy=CopyStack(); while (!copy.empty()) { copy.pop(); c++; } return c; } Removing reference symbol from declaration of CopyStack (returning a copy instead of reference) makes no difference in visual studio 2008 (with respect to number of times copying is invoked). I guess it gets optimized away - normally it should first make a copy for the return value, then call assignment operator once more to assign it to variable sc. What is your experience with this sort of optimization in different compilers? Regards, Dženan

    Read the article

  • Why Is Volume Shadow Copy Services stopping?

    - by David Mackintosh
    I am running Windows 7 Professional, 64-bit. I am running a backup-over-the-internet software client which depends on the Volume Shadow Copy Services running. Since I installed Service Pack 1 (or rather, didn't object when Windows Update forced Service Pack 1 on me) the backup service is failing to back everything up because VSC isn't running. Most of the time it fails to back up such noise as the Security Essentials database or the Messenger Live contact list -- stuff I really don't care about -- but I don't want to fall into the trap of accepting an Error-state backup as "normal". At the recommendation of the backup software, I have set the VSC service startup mode to be Automatic. When I look in the Event Log, System channel I can see at boot time: The Volume Shadow Copy service entered the running state. ...and then two or three minutes later: The Volume Shadow Copy service entered the stopped state. How do I figure out why VSC is stopping? At the suggestion of the backup vendor, I have already followed the suggestions from http://support.microsoft.com/default.aspx/kb/940184 net stop SENS net stop EventSystem net start EventSystem net start SENS net stop COMSysApp net stop SwPrv net stop VSS cd /d C:\Windows\system32 regsvr32 ole32.dll /s regsvr32 oleaut32.dll /s regsvr32 vss_ps.dll /s vssvc /register /s regsvr32 /i swprv.dll /s regsvr32 /i eventcls.dll /s regsvr32 es.dll /s regsvr32 stdprov.dll /s regsvr32 vssui.dll /s regsvr32 msxml.dll /s regsvr32 msxml3.dll /s regsvr32 msxml4.dll /s net start SwPrv net start VSS net start ProtectedStorage ...and per http://support.microsoft.com/kb/940184 I have deleted the key tree HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EventSystem\{26c409cc-ae86-11d1-b616-00805fc79216}\Subscriptions I have also run chkdsk /F and chkdsk /R on both permanent hard disks. (I had a similar problem with another computer (same OS, same failure, same start point after SP1 install) but the problem went away when I forced Volume Shadow Copy Services to Automatic startup rather than Manual. I did not have to resort to following the Microsoft KB instructions.)

    Read the article

  • How can I copy this quote from PDF?

    - by isme
    I'm reading a PDF copy of Jerome H. Friedman's paper "Data Mining and Statistics: What's the Connection?" using Google Chrome and the Adobe Reader plugin. It contains an amusing quote that I want to copy and paste to my blog. I used the mouse to select the text of the quote and pressed CTRL + C to copy the text. The document looks like this: When I paste the text into Notepad, Stack Overflow, or anywhere else, the product is Wingdings-like gibberish: ????????????????????????|?????????|????? ?????|??????????????????????????????????????????????????|?????????????? ??????????????P????? ?????????????????????P?|?????????|?????????????????????????????????????????????????????? ????????????Þ?????????????????????????????????|???|??????????????????????????? The text should instead look like this: A difference between statisticians and computer scientists in this field seems to be that when a statistician has an idea he or she writes a paper; a computer scientist starts a company. I had to type that text out manually. This is feasible for such a small quote, but how do I actually copy what I see? Is it something unusual about the PDF, the browser, the plugin, or some combiniation of the three?

    Read the article

  • Copy UNC network path (not drive letter) for paths on mapped drives from Windows Explorer

    - by Ernest Mueller
    I frequently want to share network paths to files with other folks on my team via email or chat. We have a lot of mapped drives here, both ones we set up ourselves and ones set up by our IT overlords. What I'd like to be able to do is to copy the full real path (not the drive letter) from Windows Explorer to send to folks. Example: I have a file in my "Q:" drive, \cartman\users\emueller, I want to send a link to file foo.doc to everyone. When I copy the file path (shift+right click, "copy as path") it gets the file name "Q:\foo.doc". This is unhelpful to others, who would like to see \cartman\users\emueller\foo.doc, obviously. In Explorer it clearly knows it - in the address bar I see "Computer - emueller (\cartman\users) (Q:) -". Is there a way to say "hey man copy that path as text with the \cartman\users\emueller not the Q: in it?" I know I could just set up mapped network locations instead of the mapped drives for the ones that I set up personally and avoid this problem, but most of the mapped drives like the "users" share come from our IT policy. I could just make a separate network location and then ignore my Q: drive but that's inconvenient (and they do it so they can move accounts across servers). Sure my emailed path might eventually break because I'm losing the drive letter indirection but that's OK with me.

    Read the article

  • Copy UNC network path (not drive letter) for paths on mapped drives from Windows Explorer

    - by Ernest Mueller
    I frequently want to share network paths to files with other folks on my team via email or chat. We have a lot of mapped drives here, both ones we set up ourselves and ones set up by our IT overlords. What I'd like to be able to do is to copy the full real path (not the drive letter) from Windows Explorer to send to folks. Example: I have a file in my "Q:" drive, \\cartman\users\emueller, and I want to send a link to the file foo.doc therein to coworkers. When I copy the file path (shift+right click, "copy as path") it gets the file name "Q:\foo.doc". This is unhelpful to others, who would need to see \\cartman\users\emueller\foo.doc to be able to consume the link. In Explorer it clearly knows it - in the address bar I see "Computer - emueller (\\cartman\users) (Q:) -". Is there a way to say "hey man copy that path as text with the \\cartman\users\emueller not the Q: in it?" I know I could just set up mapped network locations instead of the mapped drives for the ones that I set up personally and avoid this problem, but most of the mapped drives like the "users" share come from our IT policy. I could just make a separate network location and then ignore my Q: drive but that's inconvenient (and they do it so they can move accounts across servers). Sure my emailed path might eventually break because I'm losing the drive letter indirection but that's OK with me.

    Read the article

  • Ways of file copy

    - by Tim
    I sometimes found that when using simple right-click and copy-and-paste, some files/directories are not copied completely or not at all, because of various reasons, such as some saved webpage files/directories have some strange characters in their names or their names are too long. For example, in Windows 7, I save this webpage http://www.howtogeek.com/howto/windows-vista/working-around-windows-vistas-shrink-volume-inadequacy-problems/ completely in a very deep directories whose parent directories may have long names, I cannot copy its top ancestry directory, as Windows complains the filename for the saved webpage directory is too long. In Ubuntu, sometimes I can save a file with some special character such as newline under some directory. But when I copy that directory, it will say the file name has some special character and I will have to manually remove the character. Such cases are complained in both Windows and Ubuntu. I was wondering what some better ways to accomplish the copy job in both Windows and Ubuntu. For example, will archiving all to be copied into a single archive help? If yes how to do that? Thanks and regards!

    Read the article

  • why Cannot invoke super constructor from enum constructor ?

    - by hilal
    public enum A { A(1); private A(int i){ } private A(){ super(); // compile - error // Cannot invoke super constructor from enum constructor A() } } and here is the hierarchy of enum A extends from abstract java.lang.Enum extends java.lang.Object Class c = Class.forName("/*path*/.A"); System.out.println(c.getSuperclass().getName()); System.out.println(Modifier.toString(c.getSuperclass().getModifiers()).contains("abstract")); System.out.println(c.getSuperclass().getSuperclass().getName());

    Read the article

  • Best copy and paste software for windows?

    - by jasondavis
    Sorry if this question exist already, I did some searches but could not find one myself. I am looking for the best programs to copy and paste stuff in windows more easily. So let's say instead of the default copy/paste one item at a time, I could have 5 different paragraphs that could all be pasted somewhere seperately. Hopefully this is not to confusing. Instead of bveing able to paste 1 item I would like to have a list of items that can be pasted or some similar functionality under windows. Please help make me more productive, I frequently need to copy and paste different sets of data. Here is a good exampl, let's say I need to be able to past my email somewhere but on another program or webpage I need to paste my home address.

    Read the article

  • Copy-paste stops working on Windows 7

    - by earlyadopter
    Copy-paste functionality stops working after about an hour after each reboot on a Windows 7 64-bit system. Running Google Chrome (with gmail and few other tabs open like Calendar, Reader), MS Outlook (which I don't think has anything to do with the problem — I saw it when outlook was off as well), iTunes (9.1.1.12 if it matters). Would appreciate hints where and what for to look in a registry, and ideas for possible fix. That is not an Internet Explorer problem (I don't even run it) — it happens in all applications. Neither Ctrl-C/Ctrl-V nor context menu right-click Copy-Paste (actually, nothing happens on Copy, so there is nothing in a clipboard to Paste) are working. Drag-and-Drop (where supported) continues working though.

    Read the article

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