copy-paste

Vim copy-paste to system buffer not behaving as expected

I'm having a headache trying to figure out why vim isn't copying to a system buffer. Here's my workflow: vim asd y1y :q vim qwe p On computerA and computerB, this works as I want it to: the line yanked from the file asd is put into the file qwe. On computerC, this doesn't work. All systems are running Ubuntu 8.04. computerA has th...

Terminal Services on Windows Mobile - "Paste" doesn't preserve punctuation?

I have here a Windows Mobile-based PDA (Mobile Compia M3 Sky) equipped with a barcode scanner. This barcode scanner works by reading the data from the scanner into the Clipboard and then simulating a Paste on whatever application is currently running. The problem is, when you're using Terminal Services from the device and you scan a bar...

Intercept Copy and Paste with AppleScript

Is it possible to intercept global copy and paste in OS X with an AppleScript? Or would I have to have some intermediary step that would trigger the AppleScript to read the clipboard? ...

How can I copy and paste a range of tables in Word?

EDIT: If you have an example in VBA, I'll take it. I'm just trying to understand how to use the Range object with the Tables collection to copy and paste multiple tables without looping. Put another way, how can I specify a range of 1..lastTable using the Tables collection? If I can see a working VBA example of this, I'll work on the VBA...

Run arbitrary subprocesses on Windows and still terminate cleanly?

I have an application A that I would like to be able to invoke arbitrary other processes as specified by a user in a configuration file. Batch script B is one such process a user would like to be invoked by A. B sets up some environment variables, shows some messages and invokes a compiler C to do some work. Does Windows provide a stan...

How can I find copy/paste (duplicate, clone) code in Perl?

I've searched the Internet for a while now and I have not been able to find any free (or cheap) tools/utilities/modules that can analyze a set of Perl files (modules or scripts) and flag duplicate or cloned or copy/pasted code. I'm better now, but I used to copy and paste sections of code all over the place. I'd like to clean it up and...

SharePoint list event receivers not firing when copying and pasting using explorer view

Here's the deal, I have various event receivers registered to a document library: ItemAdded ItemAdding ItemFileMoved ItemUpdating These event receivers work as expected in all cases, APART FROM copying and pasting into explorer view. It's worth noting that the event receivers do fire off when MOVING from explorer view into explorer v...

Paste multi-line string into GVIM at cursor position

When I copy a two-line text from (e.g.) a PDF opened in Acrobat Reader into gvim using CTRL-V, the text is inserted above the line in gvim where I was positioned, instead of at the position where my cursor is. (scenario: I want to copy a document title that is spread over two lines and paste it in between a html tag in gvim). If I do th...

Accessing system clipboard in J2ME (Sony Ericsson)

Recent mobile phones have a clipboard where text can be copied from one application to another (E.g. from address book to file manager). Is there an API for placing things on this clipboard? I am targeting Sony Ericsson phones (including G705), so a Sony specific API would be acceptable if no portable API exists. ...

Pasting bitmaps into as3 app

Hi, Is it possible to paste (as in copy/paste from the clipboard) a bitmap into a flash application? I'm thinking about a level editor that lets you edit the tile images but wanted to allow copying or some quick way of syncing from an external file without them having to upload it etc etc. Cheers, Chris ...

Interview questions to detect copy-and-paste coders

What questions can I ask an interview candidate that would allow me to know whether he's a "copy-and-paste coder"? We're finding that even when candidates answer coding questions well in an interview, once on the job they'll still tend toward copying rather than refactoring. Anyone else have similar experiences? ...

Tips to show similarities in files

In a project, I found some css files that "smell" like there are copy-pasted rules in them. I wonder what are your strategies for detecting copy-paste stuff in files. Just of curiosity i'd like to hear your tips and tricks for showing file similarities! ...

Copy text to the client's clipboard using jQuery

The workflow is simple: You click inside a textarea. The text is copied to the client's clipboard. Display notice to the user. How do you do it? ...

C# - Overwrite Ctrl+C control

Im thinking to create a simple app to store what I have copied using Ctrl+C. Now I have Googled some interesting code: (I will rather post link to it as its huge) http://www.prilepi.com/221 (by http://www.liensberger.it/web/blog/?p=207) http://www.prilepi.com/222 Now the thing works fine, the only problem is that it totally overwrites...

How Should an OS X Drawing Programs Store Custom Data in its PDF PasteBoard Flavor?

A little history. In the days when the pre-eminent Mac vectored clipboard flavor was PICT, a program could insert its own data into the PICT. The PICT could be pasted into another application. At some later date, the same drawing could be selected and put on the clipboard, and pasted back into the originating program. The originating pro...

VBA Copy and paste a range of numbers

Hi There I'm trying to copy and paste a range, to create a 28 by 28 grid of numbers "rotating" the values so that each time the range is pasted into the next column, the range is moves down by one row and the last value "overflows" back to the top of the next row, I've got this far but am stumped on the overflow part (i' relative newbie...

JavaScript to Manipulate Copied Text

I copied come text from a The Huffington Post article and found that the web site had somehow snuck a citation onto my clipboard: The text I had selected. Blah. Blah. Blah. Read more at: http://www.huffingtonpost.com/... How did they do that? ...

Page element that accepts dragged item from favourites bar

What characteristics must a page element have for it to be able to accept an item that has been dragged from the favourites bar? ...

MFC problem to copy binary file.

I want to copy a binary master file in a new binary file. This file contain nothing but have a predefined size (20000 lines). Here what i'm doing: FILE *A_Lire; FILE *A_Creer; A_Lire = fopen(MASTERPath,"rb"); A_Creer = fopen(PARTPRGPath, "wb"); fseek(A_Lire,0,SEEK_END); int end = ftell(A_Lire); char* buf = (char*)malloc(en...

How to copy styled text in JTextPane

I'm trying to create a WYSIWYG editor using JTextPane. I'm using DefaultEditorKit.CopyAction to copy text in the editor. But this method does not preserve the style of the text. Can someone tell me how to copy the text in JTextPane and preserve the style, please ? ...