copy-paste

Why is writing to the clipboard in JS considered a security hole?

不想你离开。 提交于 2019-12-18 14:56:20
问题 It seems there is currently no pure JavaScript method for accessing the system clipboard using most modern browsers, Internet Explorer being an exception. On numerous other Stack Overflow questions (e.g., Clipboard access using Javascript - sans Flash?) it's explained that this limitation is a deliberate security measure to protect against web sites reading passwords or other sensitive data from the clipboard. While it seems obvious that reading from the clipboard would be a huge security

How can you get the clipboard contents with a Windows command?

别来无恙 提交于 2019-12-18 11:07:44
问题 For example, I can copy a file to the clipboard like this: clip < file.txt (Now the contents of file.txt is in the clipboard.) How can I do the opposite: ???? > file.txt So that the contents of the clipboard will be in file.txt ? 回答1: You can use the paste.exe software in order to paste text just like you are describing. http://www.c3scripts.com/tutorials/msdos/paste.html With it you can do: paste | command to paste the contents of the windows clipboard into the input of the specified command

How can you get the clipboard contents with a Windows command?

三世轮回 提交于 2019-12-18 11:07:01
问题 For example, I can copy a file to the clipboard like this: clip < file.txt (Now the contents of file.txt is in the clipboard.) How can I do the opposite: ???? > file.txt So that the contents of the clipboard will be in file.txt ? 回答1: You can use the paste.exe software in order to paste text just like you are describing. http://www.c3scripts.com/tutorials/msdos/paste.html With it you can do: paste | command to paste the contents of the windows clipboard into the input of the specified command

VBA - Copy and Paste Table Row to Another Table

╄→尐↘猪︶ㄣ 提交于 2019-12-18 08:57:22
问题 I am very new to VBA and I am trying to solve what I think should be a very simple problem (I have a Java/J2EE background)... I am looping through a table and want to copy rows to a table on another worksheet based on some conditional statements. See code below. Sub closeActionItems() Dim i, iLastRow As Integer Dim date1 As Date Dim oLastRow As ListRow date1 = Date iLastRow = ActiveSheet.ListObjects("Open_Items").ListRows.Count For i = 6 To iLastRow If Cells(i, 7).Value <= date1 And Cells(i,

disable the intent filter from android manifest programatically

徘徊边缘 提交于 2019-12-18 04:55:08
问题 In my activity i have a web view and in manifest.xml i have declared intent filter like this <activity android:name=".ui.socialNetwork.MySocialNetworkActivity" android:configChanges="orientation|screenSize" android:process=":fb" android:screenOrientation="portrait" > </activity> <activity-alias android:targetActivity=".ui.socialNetwork.MySocialNetworkActivity" android:name=".AliasMySocialNetworkActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent

Copying list of files from one folder to other in R

大兔子大兔子 提交于 2019-12-18 04:35:08
问题 I am trying to bulk move files of different kinds in R. origindir <- c("c:/origindir") targetdir <- c("c/targetdir") filestocopy <- c("myfile.doc", "myfile.rda", "myfile.xls", "myfile.txt", "myfile.pdf", "myfile.R") I tried the following, but do not know how to do for all files: file.copy(paste (origindir, "myfile.doc", sep = "/"), paste (targetdir, "myfile.doc", sep = "/"), overwrite = recursive, recursive = FALSE, copy.mode = TRUE) I do not know how to do this. 回答1: As Joran and Chase have

How can I fix “Cannot open clipboard: Access Denied” errors?

最后都变了- 提交于 2019-12-17 23:25:56
问题 I am using the following code to copy text to the clipboard: Clipboard.Open; try Clipboard.AsText := GenerateClipboardText; finally Clipboard.Close; end; Seemingly at random I get "Cannot open clipboard: Access Denied" errors. I'm guessing that these errors are caused by other application locking the clipboard, but I never seem to be doing anything with other applications that should cause the locks. Strangely my users seem to be reporting more of the errors with Vista and Windows 7 than with

Copy syntax-coloured code block as rtf in intelliji IDEA?

徘徊边缘 提交于 2019-12-17 22:45:48
问题 Is there a simple way to copy syntax-coloured code block as rtf in intellij IDEA? 回答1: UPDATE : there is now a new plug-in for this: 'Copy' on steroids that is maintained by JetBrains. There is no way to copy colored code block from IDEA directly. A workaround is to use File | Export to HTML , then open HTML in a browser, then copy from the browser window and paste into Wordpad or MS Word. Another and more faster way is to install the Copy as HTML plug-in in Settings | Plugins : Copies a

New Line Issue when copying data from SQL Server 2012 to Excel

大城市里の小女人 提交于 2019-12-17 21:49:19
问题 I recently upgraded to SQL2012 and am using Management Studio. One of my columns in the database has a CHAR(13) + CHAR(10) stored in it. When I was using SQL Server 2008, this would copy and paste completely fine into Excel. Now, however, copying and pasting the same data creates a new line/ carriage return in the data I have in Excel. Is there a setting I missed in SQL2012 that will resolve this issue? I don't want to simply REPLACE(CHAR(13) + CHAR(10)) on every single database selection, as

Android: How to TOTALLY disable copy and paste function in Edittext

非 Y 不嫁゛ 提交于 2019-12-17 20:49:46
问题 I am quite new to Android developing area and recently I hv encountered a tough problem. I was trying to make a Edittext which should NOT ALLOW user to copy content from or paste content to it. I hv googled a lot and find there seems to be 2 popular ways of doing so: 1st way, to set it in the layout file: android:longClickable="false" 2nd way, to programmatically set it: myEdittext.setCustomSelectionActionModeCallback(new ActionMode.Callback() { public boolean onPrepareActionMode(ActionMode