Search Results

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

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

  • How to copy a DVD [closed]

    - by ring0
    I was offered a couple of DVDs from abroad that cannot be played on my player due to region filtering. So I tried k9copy to copy the DVD (it removes the region automatically). But for some reasons the copy does not work well (followed the instructions from here but the generated ISO file does not work / not even in media player - additionally there are many bugs in k9copy 2.3.5 (latest from Ubuntu) showing that it is not a reliable software, at least not on Gnome...). My question is simple: how to copy a DVD on Ubuntu, the copy/ISO being as close to the original, but without the region code.

    Read the article

  • How to safely copy an object?

    - by Prog
    This question is going to be a little long. Please bear with me. Something that happened in a project of mine made me think about how to safely copy objects. I'll present the situation I had and then ask a question. There was a class SomeClass: class SomeClass{ Thing[] things; public SomeClass(Thing[] things){ this.things = things; } // irrelevant stuff omitted public SomeClass copy(){ return new SomeClass(things); } } There was another class Processor that takes SomeClass objects, copies them (via someClassInstance.copy()), manipulates the copy's state, and returns the copy. Here it is: class Processor{ public SomeClass processObject(SomeClass object){ SomeClass copy = object.copy(); manipulateTheCopy(copy); return copy; } // irrelevant stuff omitted } I ran this, and it had bugs. I looked into these bugs, and it turned out that the manipulations Processor does on copy actually affect not only the copy, but also the original SomeClass object that was passed into processObject. I found out that it was because the original and the copy shared state - because the original passed it's field things into the copy when creating it. This made me realize that copying objects is harder than simply instantiating them with the same fields as the original. For the two objects to be completely disconnected, without any shared state, each of the fields passed to the copy also has to be copied. And if that object contains other objects - they have to be copied too. And so on. So basically, in order to be able to actually copy an object, each class in the system must have a copy() method, that also invokes copy() on all of it's fields, and so on. So for example, for copy() in SomeClass to work, it needs to look like this: public SomeClass copy(){ Thing[] copyThings = new Thing[things.length]; for(int i=0; i<things.length; i++) copyThings[i] = things[i].copy(); return new SomeClass(copyThings); } And if Thing has object fields of it's own, than it's own copy() method must be appropriate: class Thing{ Apple apple; Pencil pencil; int number; public Thing(Apple apple, Pencil pencil, int number){ this.apple = apple; this.pencil = pencil; this.number = number; } public Thing copy(){ // 'number' is a primitve. return new Thing(apple.getCopy(), pencil.getCopy(), number); } } And so on. Of course, instead of all classes having a copy() method, the copying mechanism can happen in all of the getters and the constructors of classes (unless places where it isn't suitable, for example when the field points to an external object, not to an object that 'is part' of this object). Still, that means that in order to be able to safely copy an object - most classes would have to have copying mechanisms in their getters. My question is divided into two parts: How frequently do you need to get a copy of an object? Is this a regular issue? Is the technique described common and/or reasonable? Or is there a better way to make safe copies of objects? Or is there an easier way to safely copy objects, without them sharing any state?

    Read the article

  • Windows 8.1 Insufficient storage available to create shadow copy

    - by Bob.at.SBS
    [Note: After I entered the problem statement, I found this question, which is apparently the same problem. Maybe one of us will get a good answer...] I have used the "Windows 7 File Recovery" tool under Windows 8 to create system image backups to an external USB hard drive. I built a new Windows 8.1 machine, and I want to create my first system image backup of that machine to the same USB hard drive. The "Windows 7 File Recovery" tool is gone in Windows 8.1, but wbAdmin is alive and well: wbAdmin start backup -backupTarget:\\?\Volume{2a2b...994f} -allCritical -quiet fails with this text displayed: wbadmin 1.0 - Backup command-line tool (C) Copyright 2013 Microsoft Corporation. All rights reserved. Retrieving volume information... This will back up (EFI System Partition),(C:),Recovery (300.00 MB) to \?\Volume {2a2b1255-3a86-11e3-be86-b8ca3a83994f}. The backup operation to F: is starting. Creating a shadow copy of the volumes specified for backup... Summary of the backup operation: The backup operation stopped before completing. The backup operation stopped before completing. Detailed error: ERROR - A Volume Shadow Copy Service operation error has occurred: (0x8004231f) Insufficient storage available to create either the shadow copy storage file or other shadow copy data. The EFI System Partition is 100 MB The Recovery Partition is 300 MB The C partition is 1.72 TB, NTFS, 218 GB used, 1.51 TB free The destination drive is 1.81 TB, NTFS, 678 GB used, 1.15 TB free I've fiddled with vssadmin resize shadowstorage, with no change in the error. vssadmin list shadowstorage displays: Shadow Copy Storage association For volume: (C:)\?\Volume{37a0...263}\ Shadow Copy Storage volume: (C:)\?\Volume{37a0...263}\ Used Shadow Copy Storage space: 2.39 GB (0%) Allocated Shadow Copy Storage space: 2.81 GB (0%) Maximum Shadow Copy Storage space: 531 GB (30%) Shadow Copy Storage association For volume: (F:)\?\Volume{2a2...94f}\ Shadow Copy Storage volume: (F:)\?\Volume{2a2...94f}\ Used Shadow Copy Storage space: 334 GB (17%) Allocated Shadow Copy Storage space: 337 GB (18%) Maximum Shadow Copy Storage space: UNBOUNDED (922154758%) (Yeah, the "percent calculation" for UNBOUNDED is seriously bogus.) I've run SFC /verifyonly and it seems happy. I've verified that the new `Volume Shadow Copy" service starts when I start the backup operation. Any suggestions?

    Read the article

  • Copy constructor, objects, pointers

    - by Pauff
    Let's say I have this: SolutionSet(const SolutionSet &solutionSet) { this->capacity_ = solutionSet.capacity_; this->solutionsList_ = solutionSet.solutionsList_; // <-- } And solutionsList_ is a vector<SomeType*> vect*. What is the correct way to copy that vector (I suppose that way I'm not doing it right..)?

    Read the article

  • Add entries to Nautilus' right-click menu (copy, move to arbitrary directories)

    - by qbi
    Assume I want to copy a file from /home/foo/bar/baz to /opt/quuz/dir1/option3. When I try it with Nautilus, first I have to open the correct directory, copy the file, go to the other directory and paste it there. I was thinking of a better way and old KDE3 versions of Konqueror came to mind. It was possible to right-click on a file. The context menu had an option for copying, moving the file to some default directories. Furthermore you could select any directory under /. So for the above action one would right click on a file, select /opt first, a list of subdirectories will open, select /opt/quuz and so on. Using GNOME there are only two possible values (home and desktop). Is there any way to insert more directories to this context menu in GNOME? Can I copy somehow the behaviour of Konqueror?

    Read the article

  • Bit copy of encrypted home and other partitions

    - by Mka
    My laptop is overheating so I need to save all my files before I format the hard drive. I learned how to copy dev/sdX using dd command. However, I am not sure what to copy. Picture from GParted here: http://is.muni.cz/www/256590/fig.png should I copy sda5 and sda6 only? Or sda2 and sda1? I do not need to use these data on another disk, I just want to be able to access them - therefore I want to put them on external hard drive. And last question - how I will then mount my encrypted home? Will it work? Thanks a lot!

    Read the article

  • system() copy fails, while cmd copy works

    - by Mike
    In cmd.exe, I can execute the command "copy c:\hello.txt c:\hello2.txt" and it worked fine. But in my C program, I ran this piece of code and got the following error: #include <iostream> using namespace std; int main() { system("copy c:\hello.txt c:\hello2.txt"); system("pause"); return 0; } Output: The system cannot find the file specified. Anybody know what is going on here?

    Read the article

  • Copy from a password field in form

    - by Ali
    I was designing a form which asks the user to type in a password and then to verify again in the next field. I noticed however, that if I copy and paste from the first password field to the other, the values are not same. It seems my Firefox running on Mac OS X, copies the asterisk graphic instead, which has the value '\x95' Is it possible to copy the underlying text from the password field? Thanks

    Read the article

  • Copy website content from WebsiteA.com/file.html to WebsiteB/file.com every time interval

    - by Jimbo Mombasa
    I want to copy a website from http://stats.pingdom.com/file... to http://mywebsite.com/file every 10 min. Then with purple-include I want to do a transclusion and display it on http://mywebsite.com/page.html So the task is download http://stats.pingdom.com/file to http://mywebsite.com/file I figured out the transclusion part but I do not know how to copy a wabpage from A to B. Are there any script for this or how can I do this?

    Read the article

  • The indicator icon of Copy.com disappeared or the menu is unreadable

    - by January
    Copy.com is a commercial service offering free space (much like Dropbox and, once, UbuntuOne). Starting with version 13.10 and continuing with 14.04, two bugs plague the Copy.com application on Ubuntu (see this thread): sometimes, the application indicator is not at all visible even if it is visible, the menu is not readable (no menu entries except for one or two), like this: How can I get rid of these two bugs?

    Read the article

  • Visibility of reintroduced constructor

    - by avenmore
    I have reintroduced the form constructor in a base form, but if I override the original constructor in a descendant form, the reintroduced constructor is no longer visible. type TfrmA = class(TForm) private FWndParent: HWnd; public constructor Create(AOwner: TComponent; const AWndParent: Hwnd); reintroduce; overload; virtual; end; constructor TfrmA.Create(AOwner: TComponent; const AWndParent: Hwnd); begin FWndParent := AWndParent; inherited Create(AOwner); end; type TfrmB = class(TfrmA) private public end; type TfrmC = class(TfrmB) private public constructor Create(AOwner: TComponent); override; end; constructor TfrmC.Create(AOwner: TComponent); begin inherited Create(AOwner); end; When creating: frmA := TfrmA.Create(nil, 0); frmB := TfrmB.Create(nil, 0); frmC := TfrmC.Create(nil, 0); // Compiler error My work-around is to override the reintroduced constructor or to declare the original constructor overloaded, but I'd like to understand the reason for this behavior. type TfrmA = class(TForm) private FWndParent: HWnd; public constructor Create(AOwner: TComponent); overload; override; constructor Create(AOwner: TComponent; const AWndParent: Hwnd); reintroduce; overload; virtual; end; type TfrmC = class(TfrmB) private public constructor Create(AOwner: TComponent; const AWndParent: Hwnd); override; end;

    Read the article

  • Error installing Copy.com client

    - by jimirings
    I'm trying to install copy.com's client on Ubuntu 13.10 but when I do, I get the following error message: Gtk-Message: Failed to load module "canberra-gtk-module" (CopyAgent:4430): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion 'GTK_IS_MENU_SHELL(menu)' failed From there, it initially appears that the Copy client installs correctly. I am prompted to login and their icon shows up in the task bar. However, sync does not work properly. Items placed in my Copy folder on other devices (or through the web interface) sometimes download to this machine, and sometimes don't. I have investigated the first error message and found this solution, that I should insall the libcanberra-gtk-module. But when trying to install it, it is already installed. Just to be sure, I reinstalled it but it seems to have had no effect. I attempted to investigate the second error message and found that lots of different programs give similar error messages, but all of the solutions I could find seemed to be specific to the program that was under discussion on that particular thread. Any thoughts on how I could solve this? Or at least what I can try next?

    Read the article

  • Shallow Copy in Java

    - by Vilius
    Hello there! I already know, what a shallow copy is, but I'm not able to impliment it. Here's a short example. public class Shallow { String name; int number; public Shallow (String name, int number) { this.name = name; this.number = number; } } Test the implementation ... public class ShallowTest { public static void main (String[] args) { Shallow shallow = new Shallow("Shallow", 123); Shallow shallowClone = new Shallow(shallow); shallowClone.name = 'Peter'; shallowClone.number = 321; System.out.println(shallow.name + " - " + shallow.number); } } As I purpose, just the reference of the non primitive datatype String would be copied, so that by calling "shallowClone.name = 'Peter';" I would also change the name of "shallow". Am I right? But somehow, it just does not want to work ....

    Read the article

  • 12.04 run from cd, cannot copy files from mounted disk

    - by user75122
    I am running 12.04 live from cd and trying to copy some important files from a mounted hard disk to an external disk. (My previous installation of 10.04 crashed and I want to install 12.04, and back up some data before that). When I try to copy files from the mounted disk to the external one, I get the following error: There was an error copying the file into /media/New Volume/L300_Bkp_2012_06_04/pics Error opening file: Permission denied Is this related to the source(mounted hard disk) or the target (external disk)? How do I get around this?

    Read the article

  • how to copy sql server database on same server

    - by Sam
    I've got a SQL Server 2008 and want to make a copy of a database so I've got a 2nd Version of the database for testing on the same server. The database copy wizard is not able to copy the database, it always sends funny error Messages about missing objects (using SMO copy). When I try to make a backup and restore it under a different database name it still keeps the file names of the original database and overrides this (crashing the original database). So how do I copy a SQL database? Shutdown SQL Server, copy the physical files and attach them? Maybe a command line tool for database copy? Shouldn't there be an easy way to make a copy?

    Read the article

  • Fmylife javascript copy-paste into link

    - by davezor
    Fmylife.com has a nifty feature that when you copy the text from a post, it actually copies a LINK (html) so that when you paste it into your email/facebook/instant messenger/twitter/whatever it automatically will link to the post, giving them more traffic and more page views and more ad revenue, etc. I looked into their javascript files but can't seem to find how they do it. How would one go about copying this behavior?

    Read the article

  • Copy paste buffer configuration best practices

    - by gasan
    Hi, there are 2 copy paste buffers in ubuntu: 1) ctrl+c, ctrl+v (alt+ins, shifg+ins); 2)mouse select and click on selected text. That buffers often appears to mix up, and second buffer doesn't work in some applications and circumstances. I'm pretty new to ubuntu. So what is the best practices for configuration these buffers? Also if you tell me, how exactly that configuration can be made, I'll be very happy.

    Read the article

  • file copy error from system to cifs mount

    - by dwpriest
    When coping a file greater than 64kB from an Ubuntu server to a CIFS mounted windows share, most of the data is copied, but it seems the last chunk doesn't get copied. The size doesn't match, and the md5 check sums don't match. I have plenty of file space, but then I use cp, I get the following... cp: closing `cloudBackup/asdf.txt': No space left on device Using rsync, I get the following... rsync: close failed on "/home/fluffy/cloudBackup/.asdf.txt.qrBWe6": No space left on device (28) rsync error: error in file IO (code 11) at receiver.c(752) [receiver=3.0.8] rsync: connection unexpectedly closed (29 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.8] I have full read/write permissions on the mounted share. I can copy locally and between the mount and system via SSH just fine. Any ideas? Thank you

    Read the article

  • Powershell Copy-Item fails silently

    - by R W
    I have a powershell 2.0 script running on Windows Server 2008 R2 64bit that copies some Hyper-V .vhd files to another server as a 'backup solution'. The script gets a list of the .vhd's to copy then iterates over that list to copy them using Copy-Item. It also writes some logging info to a file as well. The files are copied to another server (Windows Server 2003 Sp2) into a directory compressed with NTFS compression. One of the files isn't copied. It's relatively big ~ 68Gb. The others are 20Gb or less. The wierd thing is that during the copy process the file appears on the destination server and the log file generated seems to indicate the file is copied due to the difference in the times of the log file entries. I see no error messages on the log file and nothing in the event log of either machine. Here's the code that does the copy. Get-ChildItem $VMSource *.vhd -Recurse | foreach-object { $time = Get-Date -format HH.mm.ss Add-Content $logFileName "$time : File Copy ($_) started" $fullname = $_.FullName Add-Content $logFileName "$time : Copying $fullname to $VMDestination" Copy-Item $fullname $VMDestination -Force -ErrorAction SilentlyContinue -ErrorVariable errors foreach($error in $errors) { if ($error.Exception -ne $null) { Add-Content $logFileName "'tERROR COPYING FILE : $($error.Exception)" } } $time = Get-Date -format HH.mm.ss Add-Content $logFileName "$time : File Copy ($_) finished" } I can only think there's some problem with copying a file that big to a compressed directory maybe? Any ideas?

    Read the article

  • Copy files in Linux, avoid the copy if files do exist in destination

    - by user10826
    Hi, I need to copy a /home/user folder from one hardisk to another one. It has 100000 files and around 10G size. I use cp -r /origin /destination sometines I get some errors due to broken links, permissions and so on. So I fix the error, and need to start again the copy. I wonder how could I tell the command "cp", once it tries to copy again, not to copy files again if they exist in the destination folder. Thanks

    Read the article

  • Case class copy() method abstraction.

    - by Joa Ebert
    I would like to know if it is possible to abstract the copy method of case classes. Basically I have something like sealed trait Op and then something like case class Push(value: Int) extends Op and case class Pop() extends Op. The first problem: A case class without arguments/members does not define a copy method. You can try this in the REPL. scala> case class Foo() defined class Foo scala> Foo().copy() <console>:8: error: value copy is not a member of Foo Foo().copy() ^ scala> case class Foo(x: Int) defined class Foo scala> Foo(0).copy() res1: Foo = Foo(0) Is there a reason why the compiler makes this exception? I think it is rather unituitive and I would expect every case class to define a copy method. The second problem: I have a method def ops: List[Op] and I would like to copy all ops like ops map { _.copy() }. How would I define the copy method in the Op trait? I get a "too many arguments" error if I say def copy(): this.type. However, since all copy() methods have only optional arguments: why is this incorrect? And, how do I do that correct? By making another method named def clone(): this.type and write everywhere def clone() = copy() for all the case classes? I hope not.

    Read the article

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