Questions tagged [move]

Usually refers to move semantics; consider using that tag instead. Move semantics is a programming language feature that allows a copy operation to be replaced by a more efficient "move" when the source object is a temporary or an otherwise expiring object.

Usually refers to ; consider using that tag instead.

Move semantics is a programming language feature that allows a copy operation to be replaced by a more efficient "move" when the source object is a temporary or an otherwise expiring object.

For more information on move semantics in C++, see Rvalue references and move constructors.

Related tags are , , and .

3461 questions
258
votes
14 answers

How to move/rename a file using an Ansible task on a remote system

How is it possible to move/rename a file/directory using an Ansible module on a remote system? I don't want to use the command/shell tasks and I don't want to copy the file from the local system to the remote system.
Christian Berendt
  • 3,416
  • 2
  • 13
  • 22
224
votes
10 answers

PHP - Move a file into a different folder on the server

I need to allow users on my website to delete their images off the server after they have uploaded them if they no longer want them. I was previously using the unlink function in PHP but have since been told that this can be quite risky and a…
odd_duck
  • 3,941
  • 7
  • 43
  • 85
220
votes
4 answers

c++11 Return value optimization or move?

I don't understand when I should use std::move and when I should let the compiler optimize... for example: using SerialBuffer = vector< unsigned char >; // let compiler optimize it SerialBuffer read( size_t size ) const { SerialBuffer buffer(…
Elvis Dukaj
  • 7,142
  • 12
  • 43
  • 85
172
votes
13 answers

Move column by name to front of table in pandas

Here is my df: Net Upper Lower Mid Zsore Answer option More than once a day 0% 0.22% -0.12% 2 65 Once a day 0% 0.32% -0.19% …
Boosted_d16
  • 13,340
  • 35
  • 98
  • 158
158
votes
7 answers

How do I move a single folder from one Subversion repository to another repository?

I have a "docs" folder in a Subversion repository named "project". I've come to the conclusion that it should really be kept under a separate Subversion repository named "project_docs". I'd like to move the "docs" folder (and all of its revisions)…
leftend
  • 1,934
  • 2
  • 16
  • 18
130
votes
11 answers

How do I move a file from one location to another in Java?

How do you move a file from one location to another? When I run my program any file created in that location automatically moves to the specified location. How do I know which file is moved?
pmad
  • 1,537
  • 3
  • 17
  • 20
105
votes
16 answers

How to programmatically move, copy and delete files and directories on SD?

I want to programmatically move, copy and delete files and directories on SD card. I've done a Google search but couldn't find anything useful.
Tony
  • 1,603
  • 3
  • 21
  • 40
100
votes
3 answers

Usage of std::forward vs std::move

I always read that std::forward is only for use with template parameters. However, I was asking myself why. See the following example: void ImageView::setImage(const Image& image){ _image = image; } void ImageView::setImage(Image&& image){ …
bweber
  • 3,772
  • 3
  • 32
  • 57
91
votes
7 answers

Python - Move and overwrite files and folders

I have a directory, 'Dst Directory', which has files and folders in it and I have 'src Directory' which also has files and folders in it. What I want to do is move the contents of 'src Directory' to 'Dst Directory' and overwrite anyfiles that exist…
Artharos
  • 1,047
  • 1
  • 8
  • 9
77
votes
5 answers

How to delete or change directory of a cloned git repository on a local computer

Used git clone [url] to clone an open source project but it cloned to the C:\Documents and Setings\$USER\project What I wanted to do is clone the project to C:\project. I don't want to have duplicate project clones on my local machine. How do I go…
GitNewb
  • 771
  • 1
  • 5
  • 3
77
votes
12 answers

Moving all files from one directory to another using Python

I want to move all text files from one folder to another folder using Python. I found this code: import os, shutil, glob dst = '/path/to/dir/Caches/com.apple.Safari/WebKitCache/Version\ 4/Blobs ' try: os.makedirs(/path/to/dir/Tumblr/Uploads) #…
malina
  • 831
  • 1
  • 7
  • 13
71
votes
7 answers

Move / Copy File Operations in Java

Is there a standard Java library that handles common file operations such as moving/copying files/folders?
MSumulong
  • 1,061
  • 2
  • 12
  • 22
68
votes
3 answers

How to move files using FTP commands

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?
Kermia
  • 4,171
  • 13
  • 64
  • 105
68
votes
9 answers

Detect touch press vs long press vs movement?

I'm currently fiddling around with Android programming, but I have a small problem detecting different touch events, namely a normal touch press (press on the screen and release right away), a long press (touch the screen and hold the finger on it)…
user504451
65
votes
9 answers

Moveable/draggable

This is my updated and modified script, it works completely, except I would like to universalize it... observe the **** how can I make it so that I don't have to do function(e){BOX.Draggable.elemen = e.target || e.srcElement; elementDraggable(e);…
person0
  • 1,278
  • 2
  • 15
  • 20
1
2 3
99 100