copy-paste

Cross-browser method to prevent all methods of text copying from a textarea?

…衆ロ難τιáo~ 提交于 2019-12-01 17:37:22
I am working on an online typing software. In the typing software, all is going well but I have the problem of dishonest users who might possibly type the text into the textarea, copy it, then reload the page (therefore resetting the timer) and pasting it in straightaway. So I was thinking along the lines of using something like evt.preventDefault(); when javascript detects the pressing of the ctrl / cmd button along with the C key. But then I realized that the user could always go up to the menu bar to press Edit -> Copy . So I was wondering, is there a cross-browser method to disable both

Cross-browser method to prevent all methods of text copying from a textarea?

牧云@^-^@ 提交于 2019-12-01 17:36:21
问题 I am working on an online typing software. In the typing software, all is going well but I have the problem of dishonest users who might possibly type the text into the textarea, copy it, then reload the page (therefore resetting the timer) and pasting it in straightaway. So I was thinking along the lines of using something like evt.preventDefault(); when javascript detects the pressing of the ctrl / cmd button along with the C key. But then I realized that the user could always go up to the

CopyPicture method of range class failed - sometimes

强颜欢笑 提交于 2019-12-01 15:29:51
问题 I have a VBA code which I am using to copy ranges as a picture and paste them into a chart. It does this so I can save it into a picture. This code has like a 70% success rate, and when it doesn't work, it gives out the error "CopyPicture method of range class failed". I don't understand why it can sometimes work and sometimes doesn't given that it is taking the same inputs. Can anyone help? Public Sub ExportRange(workbookPath As String, sheetName As String, rangeString As String, savepath As

Excel VBA - loop over files in folder, copy range, paste in this workbook

烈酒焚心 提交于 2019-12-01 14:08:38
I have 500 excel files with data. I would merge all this data into one file. Task list to achieve this: I want to loop over all the files in a folder open the file, copy this range "B3:I102" paste it into the 1st sheet of the active workbook repeat but paste new data underneath I've done task 1-4 but i need help with task 5, last bit - pasting the data under the existing data and making it dynamic. I've highlighted this bit with '#### in my code. Here is my code which I've put together from other people's question :) Any suggestions on how to do this? Sub LoopThroughFiles() Dim MyObj As Object

What exactly is the effect of Ctrl-C on C++ Win32 console applications?

旧街凉风 提交于 2019-12-01 13:55:42
问题 Is it possible to handle this event in some way? What happens in terms of stack unwinding and deallocation of static/global objects? 回答1: EDIT: SIGINT, not SIGTERM. And Assaf reports that no objects are destroyed (at least on Windows) for unhanded SIGINT. The system sends a SIGINT. This concept applies (with some variance) for all C implementations. To handle it, you call signal, specifying a signal handler. See the documentation on the signal function at Open Group and MSDN. The second

How to Display ObservableCollection<string> in a UserControl

与世无争的帅哥 提交于 2019-12-01 13:29:34
I'm new to WPF and I've found some similar questions but can't quite figure out the last part. I have a ViewModel with an ObservableCollection that contains error messages. I want to display these on the form AND allow the user to select and copy all or part of the messages. (In the past in WinForm apps I used a RichTextBox for this, but I can't figure out how to bind to one to the collection in WPF.) I got the look I was after with the following xaml, but there is no built-in way to select and copy like I could with a RichTextBox. Does anyone know which control I should use or if there is way

C1RichTextBox with custom copy/paste behavior

自闭症网瘾萝莉.ら 提交于 2019-12-01 10:31:57
When using C1RichTextBox in Silverlight 5 with IE 10, I am facing two major issues: During a clipboard paste operation, how can I detect if the content was copied from another C1RichTextBox in my Silverlight application or from an external application? From external applications, only text should be pasted without formatting. Copy/Pasting large inline images from one C1RichTextBox to another does not work. The <img> elements have the image content stored in their data URL. If the image becomes too large (approx 1MB), the src attribute is dropped when copied to the clipboard. The solution

Transpose column on one sheet to row on another, with linking

帅比萌擦擦* 提交于 2019-12-01 09:08:46
I have a column of data in say A1:A10 in worksheet A. In worksheet B I have a range for data from A1:J1. I need the data from the column in worksheet A to be transposed into the data range in worksheet B. I can Paste Special and paste in the values but I need the information in worksheet A to update automatically that in worksheet B. Any help or advice is appreciated. Please select A1:J1 in worksheet B and enter: =TRANSPOSE('worksheet A'!A1:A10) with Ctrl + Shift + Enter . Copy this: =INDEX(A!$A$1:$A$10, COLUMN()) into your cells A1 through J1 in worksheet B (so that all cells contain the

Formatted cliboard Java

余生长醉 提交于 2019-12-01 08:52:01
I am having an issue trying to figure out how to retain formatting of text in a Java program when saving to the system clipboard. It does not work with things such as Microsoft's Wordpad or Lotus Symphony. On the contrary, if I create a formatted string in Word and copy it, then it works properly with all the trial cases I try to paste it into. I do not want to use any external sources such as org.eclipse.*. Here are some links that I have compiled that might help me get pointed in the proper direction. I feel as if I am not using the proper Data Flavor? http://docs.oracle.com/javase/1.5.0

C1RichTextBox with custom copy/paste behavior

我们两清 提交于 2019-12-01 08:42:06
问题 When using C1RichTextBox in Silverlight 5 with IE 10, I am facing two major issues: During a clipboard paste operation, how can I detect if the content was copied from another C1RichTextBox in my Silverlight application or from an external application? From external applications, only text should be pasted without formatting. Copy/Pasting large inline images from one C1RichTextBox to another does not work. The <img> elements have the image content stored in their data URL. If the image