copying

Vim enters into visual mode on selecting text after El Capitan update

谁说胖子不能爱 提交于 2019-12-04 01:50:45
Issue is what the title says. Earlier I used to copy text from text files open in vim simply by selecting text and doing Ctrl + C . But now it puts me into visual mode, thus not allowing to copy the text. Its really annoying. Anybody knows any fix for this. Thanks. Dan Lowe You probably have the mouse mode active. You can turn it off with: :set mouse= And turn it back on with :set mouse=a If you are using iTerm, you can leave mouse mode on all the time if you want, and hold Option when you want to select without using visual mode. I am not aware of a way to do that in OS X Terminal. Update

SQL Server: Copying column within table

淺唱寂寞╮ 提交于 2019-12-03 22:18:55
What is the easiest way to copy the all the values from a column in a table to another column in the same table? With a single statement (if the columns have the same datatype) UPDATE <tablename> SET <destination column name> = <source column name> This script will update ALL values in the field1 with the values from the field2 in the corresponding row UPDATE table SET field1 = field2 来源: https://stackoverflow.com/questions/173717/sql-server-copying-column-within-table

How to Copy from IPython session without terminal prompts

寵の児 提交于 2019-12-03 04:02:23
问题 Frequently, my workflow involves data cleaning/munging in an IPython shell. This has become particularly wonderful since IPython version 5.0 with all the great upgrades to the terminal interface. So, let's say I make an attempt at sprucing up some piece of unstructured data: In [11]: for i, (num, header, txt) in enumerate(data): ...: header = [e.strip() for e in header.strip().split('\n')] ...: header[4] = header[4].strip(',').split(',') ...: data[i] = (num, header, txt) ...: Fantastic, it

Copying files across computers using SSH and MAC OS X Terminal [closed]

瘦欲@ 提交于 2019-12-03 00:01:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm trying to copy my .profile, .rvm and .ssh folders/files to a new computer and I know how to use the cp and ssh commands but I'm not sure how to use them in order to transfer files from one computer to another. Any help would be great, thanks! 回答1: You can do this with the scp command, which uses the ssh

How to Copy from IPython session without terminal prompts

爱⌒轻易说出口 提交于 2019-12-02 17:49:45
Frequently, my workflow involves data cleaning/munging in an IPython shell. This has become particularly wonderful since IPython version 5.0 with all the great upgrades to the terminal interface . So, let's say I make an attempt at sprucing up some piece of unstructured data: In [11]: for i, (num, header, txt) in enumerate(data): ...: header = [e.strip() for e in header.strip().split('\n')] ...: header[4] = header[4].strip(',').split(',') ...: data[i] = (num, header, txt) ...: Fantastic, it works! But now, I would really like to add this to a script in my editor. If I copy and paste from my

Copying files across computers using SSH and MAC OS X Terminal [closed]

大兔子大兔子 提交于 2019-12-02 13:46:41
I'm trying to copy my .profile, .rvm and .ssh folders/files to a new computer and I know how to use the cp and ssh commands but I'm not sure how to use them in order to transfer files from one computer to another. Any help would be great, thanks! Ether You can do this with the scp command, which uses the ssh protocol to copy files across machines. It extends the syntax of cp to allow references to other systems: scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file Copy something from this machine to some other machine: scp /path/to/local/file username@hostname:/path/to

How to clone Image?

我只是一个虾纸丫 提交于 2019-11-30 20:41:20
I have an Image. I need to make a exactly copy of it and save it to BufferedImage, but there is no Image.clone(). The thing should be inside a calculating loop and so it should be really fast, no pixel-by-pixel copying. What's the best in perfomance method to do this? Levster You can draw to a buffered image, so make a blank bufferedImage , create a graphics context from it, and draw your original image to it. BufferedImage copyOfImage = new BufferedImage(widthOfImage, heightOfImage, BufferedImage.TYPE_INT_RGB); Graphics g = copyOfImage.createGraphics(); g.drawImage(originalImage, 0, 0, null);

SFTP bash shell script to copy the file from source to destination

六月ゝ 毕业季﹏ 提交于 2019-11-30 09:08:43
问题 I have created one script to copy the local files to the remote folder, the script is working fine outside of if condition but when I enclosed inside the if condition the put command is not working and logged into the remote server using sftp protocol and when exist it's showing the error: put command not found see what is happening after executing the script Connected to 10.42.255.209. sftp> bye sftp.sh: line 23: put: command not found Please find the below script. echo -e; echo -e "This

How to clone Image?

北慕城南 提交于 2019-11-30 04:30:26
问题 I have an Image. I need to make a exactly copy of it and save it to BufferedImage, but there is no Image.clone(). The thing should be inside a calculating loop and so it should be really fast, no pixel-by-pixel copying. What's the best in perfomance method to do this? 回答1: You can draw to a buffered image, so make a blank bufferedImage , create a graphics context from it, and draw your original image to it. BufferedImage copyOfImage = new BufferedImage(widthOfImage, heightOfImage,

How to copy a file using Paperclip

孤者浪人 提交于 2019-11-29 05:34:32
Does anyone know of a way to copy files with Paperclip using S3 for storage? Before I try to write my own, I just wanted to make sure there wasn't already a way to do this. Thanks After some more messing around with paperclip, I figured it out. It's ridiculously simple to copy files! # Stupid example method that just copies a user's profile pic to another user. def copy_profile_picture(user_1, user_2) user_2.picture = user_1.picture user_2.save # Copied the picture and we're done! end This also works great with amazon s3. Sweet 来源: https://stackoverflow.com/questions/2739839/how-to-copy-a-file