copy

Using std::copy - error C2679: can't find correct binary '=' operator

[亡魂溺海] 提交于 2020-01-15 10:42:58
问题 I am trying to use a solution from this question: How do I iterate over cin line by line in C++? The error message c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(2144): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'const Line' (or there is no acceptable conversion) (and a bunch of template trace data after this) I am using Visual C++ 2010 Express. The code #include<string> #include<iostream> #include<fstream> #include<vector>

Using std::copy - error C2679: can't find correct binary '=' operator

寵の児 提交于 2020-01-15 10:42:11
问题 I am trying to use a solution from this question: How do I iterate over cin line by line in C++? The error message c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(2144): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'const Line' (or there is no acceptable conversion) (and a bunch of template trace data after this) I am using Visual C++ 2010 Express. The code #include<string> #include<iostream> #include<fstream> #include<vector>

How can i copy tmux output to system clipboard? [closed]

点点圈 提交于 2020-01-15 05:55:09
问题 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 6 years ago . I want to copy a large section to the file in tmux. Then I enter the tmux vi mode, and copy the selected strings. However, the system clipboard is empty. How can I copy the selected strings to system clipboard? Thanks. 回答1: Assuming this is a local instance of tmux, you could add a binding like this: bind C-c

How do you get the selected text of a WPF FlowDocument?

霸气de小男生 提交于 2020-01-14 18:50:33
问题 I'm using .NET 3.5 I have a FlowDocument inside a FlowDocumentScrollViewer. I am not using RichTextBox. The FlowDocument comes with a number of "freebies", including text selection and a context menu for copy/paste. How can I find out what text is currently selected in the FlowDocument? I imagine that I could use ApplicationCommands.Copy to get the text into the clipboard and then read it from there, but I don't want to change the contents of the clipboard if I don't have to. There must be

How do you get the selected text of a WPF FlowDocument?

时光总嘲笑我的痴心妄想 提交于 2020-01-14 18:49:05
问题 I'm using .NET 3.5 I have a FlowDocument inside a FlowDocumentScrollViewer. I am not using RichTextBox. The FlowDocument comes with a number of "freebies", including text selection and a context menu for copy/paste. How can I find out what text is currently selected in the FlowDocument? I imagine that I could use ApplicationCommands.Copy to get the text into the clipboard and then read it from there, but I don't want to change the contents of the clipboard if I don't have to. There must be

Cloning/Copying get accessor body to new type

十年热恋 提交于 2020-01-14 14:13:29
问题 I'm creating new type in dynamic assembly from existing type, but with only selected properties to include: public class EmitTest { public Type Create(Type prototype, Type dynamicBaseType, List<string> includedPropertyList) { AssemblyName aName = new AssemblyName("DynamicAssembly"); AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly( aName, AssemblyBuilderAccess.RunAndSave); ModuleBuilder modulBuilder = assemblyBuilder.DefineDynamicModule(aName.Name, aName.Name +

How to copy a array of unmanaged memory into the same unmanaged memory

耗尽温柔 提交于 2020-01-14 13:47:06
问题 I reserved memory 10 items of 128 bytes IntPtr dst = Marshal.AllocHGlobal (10 * 128); IntPtr src1 = Marshal.AllocHGlobal (128); // .... init scr1 from DLL IntPtr src2 = Marshal.AllocHGlobal (128); // .... init scr2 from DLL I need to copy the 128 bytes elements of src1 and src2 to dst at the specified offset. Marshal.Copy not suitable for such purposes. Since the src and dst in unmanaged memory area. 回答1: The Window's API function memcopy should do the trick. [DllImport("msvcrt.dll",

File.lastModified() painfully slow!

烈酒焚心 提交于 2020-01-14 10:22:49
问题 I'm doing a recursive copy of files and like xcopy /D I only want to copy newer files destination files (I cannot use xcopy directly since I need to alter some files in the copy process). In java I use lastModified() to check if the destination file is older than the source file and it's very slow. Can I speed up the process (maybe using JNI??)? Are there any other copy scripts that can do the job better (copy new files + regexp change some text files)? Copying files anyways is not an option

File.lastModified() painfully slow!

我们两清 提交于 2020-01-14 10:21:12
问题 I'm doing a recursive copy of files and like xcopy /D I only want to copy newer files destination files (I cannot use xcopy directly since I need to alter some files in the copy process). In java I use lastModified() to check if the destination file is older than the source file and it's very slow. Can I speed up the process (maybe using JNI??)? Are there any other copy scripts that can do the job better (copy new files + regexp change some text files)? Copying files anyways is not an option

Subprocess cp returns error - bufsize must be integer [duplicate]

删除回忆录丶 提交于 2020-01-14 07:35:07
问题 This question already has an answer here : bufsize must be an integer error while grepping a message (1 answer) Closed 4 years ago . I'm trying to copy from one directory to another, and rename them at the same time by calling 'cp' like so: directories = ['/Users/Me/Folder1/File1.txt', '/Users/Me/Folder/File2.txt'] output = ['/Users/Me/Folder2/Hello.txt', 'Users/Me/Folder2/World.txt'] for in, out, in zip(directories, output): subprocess.call('cp', in, out) But it returns: File "./test.py",