Search Results

Search found 10324 results on 413 pages for 'move'.

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

  • stealing inside the move constructor

    - by FredOverflow
    During the implementation of the move constructor of a toy class, I noticed a pattern: array2D(array2D&& that) { data_ = that.data_; that.data_ = 0; height_ = that.height_; that.height_ = 0; width_ = that.width_; that.width_ = 0; size_ = that.size_; that.size_ = 0; } The pattern obviously being: member = that.member; that.member = 0; So I wrote a preprocessor macro to make stealing less verbose and error-prone: #define STEAL(member) member = that.member; that.member = 0; Now the implementation looks as following: array2D(array2D&& that) { STEAL(data_); STEAL(height_); STEAL(width_); STEAL(size_); } Are there any downsides to this? Is there a cleaner solution that does not require the preprocessor?

    Read the article

  • Move constructor and assignment operator: why no default for derived classes?

    - by doublep
    Why there is default move constructor or assignment operator not created for derived classes? To demonstrate what I mean; having this setup code: #include <utility> struct A { A () { } A (A&&) { throw 0; } A& operator= (A&&) { throw 0; } }; struct B : A { }; either of the following lines throws: A x (std::move (A ()); A x; x = A (); but neither of the following does: B x (std::move (B ()); B x; x = B (); In case it matters, I tested with GCC 4.4.

    Read the article

  • Rename/Move file only if destination does not exist

    - by mikeY
    I would like to know if there is any way a file can be moved only if the destination does not exist - in other words, move only if it does not lead to overwriting. mv --update seemed first to be the solution, however, if the timestamp of the source path is newer than the destination, move will overwrite it and all attempts to circumvent this by modifying the timestamp before the move will fail. I need this behaviour to implement a simple file based lock where existence of a 'lock' file indicates that the lock is acquired.

    Read the article

  • How to move selection in Excel?

    - by John van der Laan
    I know how to create or extend selections, i.e., via F8 or Shift F8. When I have created the desired selection, I would like to move that particular selection a few cells to the right and/or down. I now need to select the similar form selection on another place in the worksheet. Does anyone know how I can do this? Example: Selection made on A1..B3, C3 and D5 and, for instance, made it Yellow. I now want to move this complete selection four places to the right, to E1..F3, H3 and I5 (to be able to make it another color). It has nothing to do with the cut and paste to move cells.

    Read the article

  • Can I move the Flash temp folder/buffer (Win64)

    - by xciter
    I need to move the folder in which the Flash plugin saves its temporary files (so NOT the browser cache folder). Normally, the plugin saves its buffered content in the default temporary folder of the operating system. However, I do not want to move that folder. In other words, I only need to change the folder which flash uses. My operating system is Windows 7 64-bit. I am using the latest version of the flash plugin.

    Read the article

  • cannot move to a subdirectory of itself

    - by fire
    I have 2 folders: /home/sphinx/articlesdb/ and: /home/sphinx/tmp/articlesdb/ I want to move and overwrite all of the files from tmp into the main folder. I am currently using: mv -f /home/sphinx/tmp/articlesdb/ /home/sphinx/ But I get this error: mv: cannot move `/home/sphinx/tmp/articlesdb/' to a subdirectory of itself, `/home/sphinx/articlesdb' It needs to do this as fast as possible so I don't want to copy. Should I remove /home/sphinx/articlesdb/ completely and then run the mv command or do I just need to tweak the command slightly?

    Read the article

  • Exchange 2010: Find Move Request Log after move request completes

    - by gravyface
    EDIT: significantly changed my question here to streamline it a bit. I've gone ahead and used 100 as my corrupted item count and ran it from the Exchange Shell. So the trail of tears continues with my SBS 2003 to 2011 migration: all the mailboxes have moved mailbox store from OLDSERVER to NEWSERVER, with the Local Move Requests completing successfully, except for one. What I'd like to do now is review the previous move request log files: when they were in progress, I could right-click Properties Log View Log File, but now that they're completed, that's not available. Nor can I use: Get-MoveRequestStatistics <user> -includereport | fl MoveReport ...as the move request has now completed and it errors out with "couldn't find a move request that corresponds...". Basically what I'd like to do is present the list of baditems to the user so that they're aware of what items didn't come across and if anything important was lost, be able to check their current OST, an archive.pst, etc. to recover it if possible. If this all needs to be wrapped up in a batch Exchange power shell command to pipe the output to log files on disk somewhere, I'm all ears, and would appreciate it for the next migration we do.

    Read the article

  • Move icons around freely in Windows 7

    - by Eikern
    I just installed a pre-RTM build of Windows 7 that I downloaded from Microsoft, so this may have changed in the RTM version, but I do not think so. (EDIT: Same thing in the released version.) In Windows Vista, XP and older you could move icons around freely within a folder, rearranging them like I wanted them -- even though it was automatically ordering the position of them. So I could move a file starting with 'B' down below 'M'. I know this is kind of 'wrong', but is this possible? Thanks.

    Read the article

  • Recursive move utility on Unix?

    - by Thomas Vander Stichele
    Sometimes I have two trees that used to have the same content, but have grown out of sync (because I moved disks around or whatever). A good example is a tree where I mirror upstream packages from Fedora. I want to merge those two trees again by moving all of the files from tree1 into tree2. Usually I do this with: rsync -arv tree1/* tree2 Then delete tree1. However, this takes an awful lot of time and disk space, and it would be much easier to be able to do: mv -r tree1/* tree2 In other words, a recursive move. It would be faster because first of all it would not even copy, just move the inodes, and second I wouldn't need a delete at the end. Does this exist ? As a test case, consider the following sequence of commands: $ mkdir -p a/b $ touch a/b/c1 $ rsync -arv a/ a2 sending incremental file list created directory ./ b/ b/c1 b/c2 sent 173 bytes received 57 bytes 460.00 bytes/sec total size is 0 speedup is 0.00 $ touch a/b/c2 What command would now have the effect of moving a/b/c2 to a2/b/c2 and then deleting the a subtree (since everything in it is already in the destination tree) ?

    Read the article

  • Move SQL-Server Database with zero downtime

    - by Uwe
    Hello, how is it possible to move a sql 2005 db to a different sql 2008(!) server without any downtime? The system is 24/7 and has to be moved to a differen server with a different storage. We tried copy database, but that does not keep the whole db synchronus at the end of the process but only tablewise.

    Read the article

  • Why do not C++11's move constructor/assignment operator act as expected

    - by xmllmx
    #include <iostream> using namespace std; struct A { A() { cout << "A()" << endl; } ~A() { cout << "~A()" << endl; } A(A&&) { cout << "A(A&&)" << endl; } A& operator =(A&&) { cout << "A& operator =(A&&)" << endl; return *this; } }; struct B { // According to the C++11, the move ctor/assignment operator // should be implicitly declared and defined. The move ctor // /assignment operator should implicitly call class A's move // ctor/assignment operator to move member a. A a; }; B f() { B b; // The compiler knows b is a temporary object, so implicitly // defined move ctor/assignment operator of class B should be // called here. Which will cause A's move ctor is called. return b; } int main() { f(); return 0; } My expected output should be: A() A(A&&) ~A() ~A() However, the actual output is: (The C++ compiler is: Visual Studio 2012) A() ~A() ~A() Is this a bug of VC++? or just my misunderstanding?

    Read the article

  • Win 7 move ssd from SATA 1 to SATA 0, drive letter from G: to C:

    - by GaryH
    I got a new SSD, plugged it in on my notebook to the available SATA 1 connector and installed Win7 (Ultimate) on it as drive G:. It is working great. Now I would like to move the SSD to the SATA 0 connector and change the drive letter to C:. The existing 500gb HD that has another copy of Win7 (home) on it I will format and connect to the SATA 1 connector as the G: or some other letter drive. Is this possible? Is there software that will go through the registry and "correct" all of the entries for "G:" for everything installed and fix it all up? Or am I better off biting the bullet and setting the hardware where I want it and doing a fresh install of everything? Thanx, G

    Read the article

  • Serverlocation move and how can I Move the files

    - by Bernhard
    Hello together, I´ve a big problem. I have to move data from an old Webspace which is only accessibla by ftp. No we have a new root server which is accessible by ssh of course :-) No i Need to move all data from the old space but there is a lot of Gb of files. Is there a way to fetch all files directly from the old ftp to the storage and not over a third station (my local machine)? I´ve tried it with ftp but without success. I think I´ve used the wrong commands. Is there a way to etablish something like this including all files and directorys? Thank you in advance Bernhard

    Read the article

  • Move files from multiple folders all into parent directory with command prompt [win7]

    - by Nick
    I have multiple .rar files in multiple folders like this: C:\Docs\Folder1\rarfile1-1.rar C:\Docs\Folder1\rarfile1-2.rar C:\Docs\Folder1\rarfile1-3.rar C:\Docs\Folder2\rarfile2-1.rar C:\Docs\Folder2\rarfile2-2.rar C:\Docs\Folder2\rarfile2-3.rar C:\Docs\Folder3\rarfile3-1.rar C:\Docs\Folder3\rarfile3-2.rar C:\Docs\Folder3\rarfile3-3.rar I want to move all of the .rar files to the parent directory 'C:\Docs'. I have a lot more than 3 folders, so I was thinking of making a batch file or something. What would be the commands to do this? Thanks

    Read the article

  • C++0x Overload on reference, versus sole pass-by-value + std::move?

    - by dean
    It seems the main advice concerning C++0x's rvalues is to add move constructors and move operators to your classes, until compilers default-implement them. But waiting is a losing strategy if you use VC10, because automatic generation probably won't be here until VC10 SP1, or in worst case, VC11. Likely, the wait for this will be measured in years. Here lies my problem. Writing all this duplicate code is not fun. And it's unpleasant to look at. But this is a burden well received, for those classes deemed slow. Not so for the hundreds, if not thousands, of smaller classes. ::sighs:: C++0x was supposed to let me write less code, not more! And then I had a thought. Shared by many, I would guess. Why not just pass everything by value? Won't std::move + copy elision make this nearly optimal? Example 1 - Typical Pre-0x constructor OurClass::OurClass(const SomeClass& obj) : obj(obj) {} SomeClass o; OurClass(o); // single copy OurClass(std::move(o)); // single copy OurClass(SomeClass()); // single copy Cons: A wasted copy for rvalues. Example 2 - Recommended C++0x? OurClass::OurClass(const SomeClass& obj) : obj(obj) {} OurClass::OurClass(SomeClass&& obj) : obj(std::move(obj)) {} SomeClass o; OurClass(o); // single copy OurClass(std::move(o)); // zero copies, one move OurClass(SomeClass()); // zero copies, one move Pros: Presumably the fastest. Cons: Lots of code! Example 3 - Pass-by-value + std::move OurClass::OurClass(SomeClass obj) : obj(std::move(obj)) {} SomeClass o; OurClass(o); // single copy, one move OurClass(std::move(o)); // zero copies, two moves OurClass(SomeClass()); // zero copies, one move Pros: No additional code. Cons: A wasted move in cases 1 & 2. Performance will suffer greatly if SomeClass has no move constructor. What do you think? Is this correct? Is the incurred move a generally acceptable loss when compared to the benefit of code reduction?

    Read the article

  • Windows Live SkyDrive: How To Move or Copy Files Between Folders

    - by Gopinath
    Microsoft has very simple and easy to use interface to move files between folders in Windows Operating system. But their own cloud storage service,Windows Live SkyDrive, complicated these simple and daily used operations. We need a guide to figure out how to perform basic copy/move operations. Couple of years ago we wrote about moving files between folders in old version of SkyDrive but the guide does not hold good today as SkyDrive has gone through many user interface changes in the recent past. Today one of our readers asked us how to move/copy files in the latest version of SkyDrive and here are the steps to be followed 1. Login to your Windows Live SkyDrive 2. Select the file you want to Move or Copy by clicking on the information icon (see 2 in below image) 3. After selecting the information icon, expand Information section displayed on the right side panel to access Move and Copy options (see 3 in the below image). 4. To move the selected file to another folder, select Move option and Sky Drive will guide you through folder selection user interface for choosing the target folder. 5. Once you navigate to the target folder where you want to move the file click on “Move this file into <<Target Folder>>”. 6. You are done. Dear Microsoft, SkyDrive provides us tonnes of free storage but please make it’s user interface a bit better so that we don’t need to write guides to perform basic operations. Hope you listen to your customers. This article titled,Windows Live SkyDrive: How To Move or Copy Files Between Folders, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • Mac OSX snow leapord move to folder on keystroke

    - by Georges Oates Larsen
    On a weekly basis I have to organize thousands of photos (in groups of up to five thousand) into folders depending upon what they contain (to then narrow them down to the best photos of the same thing). This means I am constantly scanning through photos and organizing them into a folder. THe problem is, the process of stopping my scan, then dragging the photo all the way into a folder myself is bogging me down. Would it be possible to, for instance using something like applescript, or even going so far as using XCode/Cocoa, to create a shortcut that moves whatever I have selected in the finder to a pre-specified folder? Does somethign like this already exist?

    Read the article

  • Memory corruption in System.Move due to changed 8087CW mode (png + stretchblt)

    - by André Mussche
    I have strange a memory corruption problem. After many hours debugging and trying I think I found something. For example: I do a simple string assignment: sTest := 'SET LOCK_TIMEOUT '; However, the result sometimes becomes: sTest = 'SET LOCK'#0'TIMEOUT ' So, the _ gets replaced by an 0 byte. I have seen this happening once (reproducing is tricky, dependent on timing) in the System.Move function, when it uses the FPU stack (fild, fistp) for fast memory copy (in case of 9 till 32 bytes to move): ... @@SmallMove: {9..32 Byte Move} fild qword ptr [eax+ecx] {Load Last 8} fild qword ptr [eax] {Load First 8} cmp ecx, 8 jle @@Small16 fild qword ptr [eax+8] {Load Second 8} cmp ecx, 16 jle @@Small24 fild qword ptr [eax+16] {Load Third 8} fistp qword ptr [edx+16] {Save Third 8} ... Using the FPU view and 2 memory debug views (Delphi - View - Debug - CPU - Memory) I saw it going wrong... once... could not reproduce however... This morning I read something about the 8087CW mode, and yes, if this is changed into $27F I get memory corruption! Normally it is $133F: The difference between $133F and $027F is that $027F sets up the FPU for doing less precise calculations (limiting to Double in stead of Extended) and different infiniti handling (which was used for older FPU’s, but is not used any more). Okay, now I found why but not when! I changed the working of my AsmProfiler with a simple check (so all functions are checked at enter and leave): if Get8087CW = $27F then //normally $1372? if MainThreadID = GetCurrentThreadId then //only check mainthread DebugBreak; I "profiled" some units and dll's and bingo (see stack): Windows.StretchBlt(3372289943,0,0,514,345,4211154027,0,0,514,345,13369376) pngimage.TPNGObject.DrawPartialTrans(4211154027,(0, 0, 514, 345, (0, 0), (514, 345))) pngimage.TPNGObject.Draw($7FF62450,(0, 0, 514, 345, (0, 0), (514, 345))) Graphics.TCanvas.StretchDraw((0, 0, 514, 345, (0, 0), (514, 345)),$7FECF3D0) ExtCtrls.TImage.Paint Controls.TGraphicControl.WMPaint((15, 4211154027, 0, 0)) So it is happening in StretchBlt... What to do now? Is it a fault of Windows, or a bug in PNG (included in D2007)? Or is the System.Move function not failsafe?

    Read the article

  • iPad: Move UIView with animation, then move it back

    - by Joel
    I have the following code in a UIView subclass that will move it off the screen with an animation: float currentX = xposition; //variables that store where the UIView is located float currentY = yposition; float targetX = -5.0f - self.width; float targetY = -5.0f - self.height; moveX = targetX - currentX; //stored as an instance variable so I can hang on to it and move it back moveY = targetY - currentY; [UIView beginAnimations:@"UIBase Hide" context:nil]; [UIView setAnimationDuration:duration]; self.transform = CGAffineTransformMakeTranslation(moveX,moveY); [UIView commitAnimations]; It works just great. I've changed targetX/Y to 0 to see if it does indeed move to the specified point, and it does. The problem is when I try and move the view back to where it was originally: moveX = -moveX; moveY = -moveY; [UIView beginAnimations:@"UIBase Show" context:nil]; [UIView setAnimationDuration:duration]; self.transform = CGAffineTransformMakeTranslation(moveX,moveY); [UIView commitAnimations]; This puts the UIView about 3x as far as it should. So the view usually gets put off the right side of the screen (depending on where it is). Is there something with the CGAffineTransforMakeTranslation function that I should know? I read the documentation, and from what I can tell, it should be doing what I'm expecting it to do. Anyone have a suggestion of how to fix this? Thanks.

    Read the article

  • Can we move shape (Diamond) in C#

    - by Ani
    I want to move a Diamond Shape in the form(for example 2 pixels every 200ms) horizantally. I used the following code in From_Paint Event. private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Point p1 = new Point(5,0); Point p2 = new Point(10, 5); Point p3 = new Point(5, 10); Point p4 = new Point(0, 5); Point[] ps = { p1, p2, p3, p4, p1 }; g.DrawLines(Pens.Black, ps);} I know how to move a picturebox but how to do with shape. Thanks, Ani

    Read the article

  • initializer_list and move semantics

    - by FredOverflow
    Am I allowed to move elements out of a std::initializer_list<T>? #include <initializer_list> #include <utility> template<typename T> void foo(std::initializer_list<T> list) { for (auto it = list.begin(); it != list.end(); ++it) { bar(std::move(*it)); // kosher? } } Since std::intializer_list<T> requires special compiler attention and does not have value semantics like normal containers of the C++ standard library, I'd rather be safe than sorry and ask.

    Read the article

  • Sony ouvre le PlayStation Move aux développeurs universitaires et amateurs en sortant Move.Me : suffisant pour contrer Kinect ?

    Sony ouvre son PlayStation Move aux développeurs Universitaires et amateurs en sortant Move.Me : suffisant pour contrer le Kinect de Microsoft ? Il y a un an de cela lors de l'événement annuel Game Developers Conference 2010, Sony avait dévoilé officiellement son contrôleur à détection de mouvements pour sa console de Jeux la PlayStation 3, le PlayStation Move. Un an après, à l'occasion du même événement qui se déroule actuellement à San Francisco , Sony a annoncé Move.Me, un SDK que les étudiants, les chercheurs et les amateurs peuvent utiliser pour créer de nouvelles applications en utilisant le PlayStation Move.

    Read the article

  • ActionScript Move MovieClip Effects

    - by Ozzy
    Hi all. I have a movieclip. Its current y is 0, and i want to move it to y 100 How im currently doing it is onenterframe { Y += 2 } how would i do it that it starts off slow and ends slow but speeds up in the middle?

    Read the article

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