move

Powershell Move-Item Rename If File Exists

余生颓废 提交于 2019-11-27 22:47:35
问题 I have a powershell script that takes all of the files in one directory, renames the first one and moves it, and then goes to the next file. Sometimes there will be multiple files that get renamed to the same name (because of the system that it's going to, not ideal and will have to change) and was overwriting files that shouldn't have been getting overwritten with -force. I need all of the files to move but also have unique names so we have them available in the destination location. Is

Moving files lose history in TFS 2013

 ̄綄美尐妖づ 提交于 2019-11-27 22:14:51
I'm using VS2013 Update 4 with TFS 2013 Update 4. In Source Control Explorer, whenever I move a file from one folder to another I can see that the file's history is preserved in the new location. However, that history is gone when I check-in the pending changes. The same thing happens when I try to run "tf move" command. So, how can you move a file in TFS and still keep the file's history? When a file is renamed correctly, the History is not "Gone", it's associated to the "old name" instead. A rename that is done the right way (tracked as a rename and not as an delete+add) has a drilldown

Why does destructor disable generation of implicit move methods?

不打扰是莪最后的温柔 提交于 2019-11-27 20:39:26
I was trying to understand what the rule of zero says by reading this blog . IMO, it says if you declare your own destructor then don't forget to make the move constructor and move assignment as default. Example : class Widget { public: ~Widget(); // temporary destructor ... // no copy or move functions }; "The addition of the destructor has the side effect of disabling generation of the move functions, but because Widget is copyable, all the code that used to generate moves will now generate copies. In other words, adding a destructor to the class has caused presumably-efficient moves to be

DragMove() and Maximize

…衆ロ難τιáo~ 提交于 2019-11-27 17:53:45
问题 I have a problem with my custom window (AllowTransparency, WindowStyle=None) in WPF. DragMove() method works good, but when I maximize window, or it maximizing automatically by Windows 7 Aero Snap, this method does not work at all. So I can't unsnap window with mouse drag and return it state to WindowState.Normal. Left and Right Aero Snap works good, I can snap and unsnap window without a problem. But when it maximized, nothing works except Win+Down combination. Maybe somebody knows how to

Am I guaranteed that pointers to std::vector elements are valid after the vector is moved?

旧街凉风 提交于 2019-11-27 17:18:12
问题 Considering this example: std::vector<int> v1 = { 1, 2, 3 }; const int* i = &v1[1]; std::vector<int> v2(std::move(v1)); std::cout << *i << std::endl; Even though in many STL implementations this will probably work, am I guaranteed by the standard that no reallocations are performed when a std::vector is moved, and the internal buffer backing v2 is the same that used to be the one of v1 ? I wasn't able to find this information neither on the Internet, nor on the standard itself. 回答1: This is

Programmatically click and move mouse with VB.NET

混江龙づ霸主 提交于 2019-11-27 16:48:10
问题 I want to build a program in VB .net that will allow me to control my pc with my laptop. The only question I really have is, how can I programmatically click without using some kind of click event, say if I want to click the start orb and my mouse is at that exact location, I'd like a sub or something that will click on it. Right now I only know how to click within the form. Thanks 回答1: You can set the Cursor position with the property Cursor.Position . You will need to P/Invoke mouse_event

Does it make sense to use move semantics for operator+ and/or operator+=?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 13:20:05
问题 I was wondering in what kind of cases it makes sense to use move semantics when overloading operator+ and/or operator+=. Even though it is explained in this question how one could do this, I can't wrap my head around as to why I'd do it. Let's consider operator+=. If I just pass right hand side by reference and make the appropriate changes on the left hand side object, there are no unnecessary copies anyway. So we come back to the same point: Would move semantics be beneficial in such a case?

How to move a marker in Google Maps API

99封情书 提交于 2019-11-27 11:29:49
问题 I'm using the Google Maps API V3 and I'm trying to make a marker move across the screen. Here's what I have: <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"> </script> <script type="text/javascript"> function initialize() {

Should I return an rvalue reference parameter by rvalue reference?

二次信任 提交于 2019-11-27 10:21:27
问题 I have a function which modifies std::string& lvalue references in-place, returning a reference to the input parameter: std::string& transform(std::string& input) { // transform the input string ... return input; } I have a helper function which allows the same inline transformations to be performed on rvalue references: std::string&& transform(std::string&& input) { return std::move(transform(input)); // calls the lvalue reference version } Notice that it returns an rvalue reference . I have

How to move files using FTP commands

走远了吗. 提交于 2019-11-27 06:39:54
Path of source file is : /public_html/upload/64/SomeMusic.mp3 And I want to move it to this path : /public_html/archive/2011/05/64/SomeMusic.mp3 How can i do this using FTP commands? In FTP client: rename /public_html/upload/64/SomeMusic.mp3 /public_html/archive/2011/05/64/SomeMusic.mp3 With FTP commands: RNFR /public_html/upload/64/SomeMusic.mp3 RNTO /public_html/archive/2011/05/64/SomeMusic.mp3 source: http://www.nsftools.com/tips/RawFTP.htm Just in case someone else will search for a solution to move files by ftp and will not find a solution: As I encountered the same problem and even the