Search Results

Search found 2397 results on 96 pages for 'copying'.

Page 13/96 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • gvim: Easy copying into system clipboard

    - by Georg Jaehnig
    I am using gVim on Ubuntu 10.10. I want to copy (yank) text to the system clipboard, so that the copied text is available in other applications. This works with "+y. But I want to have it working with y. I have tried to map y to "+y but then yy doesn't work anymore (since it produces "+y"+y). I have also tried :set clipboard=unnamed but this works only the other direction: Text in the system clipboard I can paste with p.

    Read the article

  • deep or shallow copying?

    - by Dervin Thunk
    Dear all. I was wondering if there are examples of situations where you would purposefully pass an argument by value (deep copy) in C. For instance, passing a char to a function is usually cheaper in space than passing a char* (if there's no need to share the value), since char is 1 byte and pointers are, well, whatever they are in the architecture (4 in my 32 bit machine). ?(When) do you want to pass (big) deep copies to functions? if so, why?

    Read the article

  • Copying Android source code directory from one computer to an other one

    - by Walidix
    I have downloaded the Android source code on my computer using the repo sync command. Since I have no experience with git and repo , I would like to know if it is possible to copy the mydroid directory (which contains Android source code) to an other computer by just burning it on a DVD and then processing the build without problems. Thanks in advance and sorry if my question is stupid

    Read the article

  • Java: Copying an exe-file and launching afterwards fails

    - by Philip
    Hi, I want to copy an existing .exe-file from one directory to another and launch it afterwards with Java. Like this: FileIO.copy( new File( sourceFile ), new File( targetFile ) ); System.out.println( "Existing: " + new File( targetFile ).exists() ); System.out.println( "Launching " + targetFile ); String cmd[] = { targetFile }; Process p = Runtime.getRuntime().exec( cmd ); p.waitFor(); System.out.println( "Result: " + p.exitValue() ); The output is like this: Existing: true Launching C:\test\Launcher.new.exe Result: 2 So Java says that the file is valid and existing, but Windows just can't launch the process because it thinks the file is not there. The pathes are absolute and with backslashes. I also have all permissions on the files so I'm allowed to execute them. The Launcher.new.exe is generated by Launch4j, so it's more or less standalone. At least it doesn't depend on DLLs in the same folder. But strange: It works when I copy and launch the notepad.exe. One more strange thing: If I don't copy the file by Java but by hand, the launching also fails with the same error. OS is Vista with SP1. Any clue?

    Read the article

  • Trouble Copying custom class initialization

    - by Parad0x13
    I have a custom class of type NSObject that contains a single NSMutableArray. This class is called Mutable2DArray and is designed to emulate a 2 dimensional array of type NSMutableArray. There is a custom init method - (id)initWithX:(int)x Y:(int)y that asks for the dimensions for the array and allocates the required arrays within the only array the class owns. My issue is when I try to copy an instance of Mutable2DArray I get an error saying the copyWithZone is an unrecognized selector. I thought copy was a base method of NSObject so I'm confused why I cant create a copy of the instance like this: Mutable2DArray *Array1 = [[Mutable2DArray alloc] initWithX:10 Y:10]; Mutable2DArray *Array2 = [Array1 copy]; Am I missing something so obvious here?

    Read the article

  • MySQL Query For Copying Contents Into Another Field, Same Row

    - by Rob Adler
    Is there a single query (subqueries in it are allowed) where I can copy the content of one field into another field, per row. Example: price, and priceBackup Records: 45.55 47.77 45.55 copies into priceBackup for that specific row, 47.77 copies into priceBackup for that specific row. I do have a primary key, auto increment on it under 'id'. Thanks guys!

    Read the article

  • Deep copying of tree view nodes.

    - by Kanags.Net
    I'm trying to copy a treeview nodes to treenodecollection for some other processing. When i execute the treeview.nodes.clear() in the next line, my treenodecollection is becoming null. Can you please tell me how to copy the treeview nodes to treenodecollection and keep the copies of the nodes even after calling Clear method of actual tree view nodes? TreeNodeCollection tnc = null; private TypeIn() { tnc = treeView1.Nodes; treeView1.Nodes.Clear(); //Now my tnc becomes null, but I want the tnc for future use. }

    Read the article

  • Copying a IO stream results in corruption.

    - by StackedCrooked
    I have a small Mongrel webserver that sends the stdout of a process to a http response: response.start(200) do |head,out| head["Content-Type"] = "text/html" status = POpen4::popen4(command) do |stdout, stderr, stdin, pid| stdin.close() FileUtils.copy_stream(stdout, out) FileUtils.copy_stream(stderr, out) puts "Sent response." end end This works well most of the time, but sometimes characters get duplicated. For example this is what I get from the "man ls" command: LS(1) User Commands LS(1) NNAAMMEE ls - list directory contents SSYYNNOOPPSSIISS llss [_O_P_T_I_O_N]... [_F_I_L_E]... DDEESSCCRRIIPPTTIIOONN List information about the FILEs (the current directory by default). Sort entries alphabetically if none of --ccffttuuvvSSUUXX nor ----ssoorrtt. Mandatory arguments to long options are mandatory for short options For some mysterious reason capital letters get duplicated. Can anyone explain what's going on?

    Read the article

  • Copying a 2D non-space array to another

    - by Jay
    I'm a total programming newb who started learning java programming this sem at uni. I'm up to a step where i need to copy some elements from one method to another. This program i'm creating is called an L_Game. The question I'm stuck is: the project(Slide other) method should take another slide as a parameter, and copy each non-space cell from this slide into the other slide (i.e. like a projector projecting slides onto a screen. I previously made a constructor with the parameter cells in it and believe i copied it to the project(Slide other) method. But i'm not sure what to do to copy each "non-space cell" With the "for" method or the "if" method? If my question isn't typed correctly or have information missing, please let me know. Any help will be appreciated. (I obviously have no idea with what i'm doing...)

    Read the article

  • copying the contents of an image file

    - by Ganesh
    I am designing an image decoder and as a first step I tried to just copy the using c. i.e open the file, and write its contents to a new file. Below is the code that I used. while((c=getc(fp))!=EOF) fprintf(fp1,"%c",c); where fp is the source file and fp1 is the destination file. The program executes without any error, but the image file(".bmp") is not properly copied. I have observed that the size of the copied file is less and only 20% of the image is visible, all else is black. When I tried with simple text files, the copy was complete. Do you know what the problem is?

    Read the article

  • Copying from istream never stops

    - by the_drow
    This bit of code runs infinitely: copy(istream_iterator<char>(cin), istream_iterator<char>(), back_inserter(buff)); The behavior I was expecting is that it will stop when I press enter. However it doesn't. buff is a vector of chars.

    Read the article

  • .click() callback references local variable from the calling method instead of copying by value

    - by Eric Freese
    The following jQuery Javascript code is included on an otherwise empty page. $(function() { for (var i = 0; i < 10; i++) { element = $('<div>' + i + '</div>'); element.click(function() { alert(i); }); $('body').append(element); } }); The desired behavior is that this code should generate 10 div elements numbered from 0 to 9. When you click on a div element, an alert popup will show the number of the div element you clicked on (i.e. if a user clicks on the div element labeled '4', the alert popup should show the number 4). The alert popup instead shows the number 10 regardless of which div element is clicked on. How can I modify this code to make it behave in the desired way?

    Read the article

  • Copying files from one directory to another in Java

    - by user42155
    Hello, I want to copy files from one directory to another (subdirectory) using Java. I have a directory, dir, with text files. I iterate over the first 20 files in dir, and want to copy them to another directory in the dir directory, which I have created right before the iteration. In the code, I want to copy the review (which represents the ith text file or review) to trainingDir. How can I do this? There seems not to be such a function (or I couldn't find). Thank you. boolean success = false; File[] reviews = dir.listFiles(); String trainingDir = dir.getAbsolutePath() + "/trainingData"; File trDir = new File(trainingDir); success = trDir.mkdir(); for(int i = 1; i <= 20; i++) { File review = reviews[i]; }

    Read the article

  • Browsers (IE and Firefox) freeze when copying large amount of text

    - by Matt
    I have a web application - a Java servlet - that delivers data to users in the form of a text printout in a browser (text marked up with HTML in order to display in the browser as we want it to). The text does display in different colors, though most of it is black. One typical mode of operation is this: 1. User submits a form to request data. 2. Servlet delivers HTML file to browser. 3. User does CTRL+A to select all the text. 4. User does CTRL+C to copy all the text. 5. User goes to a text editor and does CTRL+V to paste the text. In the testing where I'm having this problem, step #2 successfully loads all the data - we wait for that to complete. We can scroll down to the end of what the browser loaded and see the end of the data. However, the browser freezes on step #3 (Firefox) or on step #4 (IE). Because step #2 finishes, I think it is a browser/memory issue, and not an issue with the web application. If I run queries to deliver smaller amounts of data (but after several queries we get the same data we would have above in one query) and copy/paste this text, the file I save it into ends up being about 8 MB. If I save the browser's displayed HTML to a file on my computer via File-Save As from the browser menu, it works fine and the file is about 22 MB. We've tried this on 2 different computers at work (both running Windows XP, with at least 2 GB of RAM and many GB of free disk space), using Firefox and IE. We also tried it on a home computer from a home network outside of work (thinking it might be our IT security software causing the problem), running Windows 7 using IE, and still had the problem. When I've done this, I can see whatever browser I'm using utilizing the CPU at 50%. Firefox's memory usage grows to about 1 GB; IE's stays in the several hundred MBs. We once let this run for half an hour, and it did not complete. I'm most likely going to modify the web app to have an option of delivering a plain text file for download, and I imagine that will get the users what they need. But for the mean time, and because I'm curious - and I don't like my application freezing people's browsers, does anyone have any ideas about the browser freezing? I understand that sometimes you just reach your memory limit, but 22 MB sounds to me like an amount I should be able to copy to the clipboard.

    Read the article

  • C#: Any faster way of copying arrays?

    - by Yang
    I have three arrays that need to be combined in one three-dimension array. The following code shows slow performance in Performance Explorer. Is there a faster solution? for (int i = 0; i < sortedIndex.Length; i++) { if (i < num_in_left) { // add instance to the left child leftnode[i, 0] = sortedIndex[i]; leftnode[i, 1] = sortedInstances[i]; leftnode[i, 2] = sortedLabels[i]; } else { // add instance to the right child rightnode[i-num_in_left, 0] = sortedIndex[i]; rightnode[i-num_in_left, 1] = sortedInstances[i]; rightnode[i-num_in_left, 2] = sortedLabels[i]; } } Update: I'm actually trying to do the following: //given three 1d arrays double[] sortedIndex, sortedInstances, sortedLabels; // copy them over to a 3d array (forget about the rightnode for now) double[] leftnode = new double[sortedIndex.Length, 3]; // some magic happens here so that leftnode = {sortedIndex, sortedInstances, sortedLabels};

    Read the article

  • Copying subversion commit messages

    - by Falcor
    I know this isn't the BEST practice, but every once in a while when I'm merging up a huge batch up changes with the trunk (and I know my branch is current), I will simply delete the contents of the trunk and then copy the contents of my branch up, so that I don't have to deal with resolving conflicts for an hour. The problem is that I seem to lose the entire history of commit messages for each file. My branch still has the correct history of commit messages... how can I merge them up?

    Read the article

  • copying files from one windows server to another

    - by Saju Pillai
    I have to copy a file from a windows 2008 server to one or more windows 2008 servers. I have accounts on the target machines with enough privileges to let me use powershell remoting and use wmi. The remote machines do not run ftp, ssh or similar file transfer mechanisms. I am not allowed to install software or run new services on the target server. I can run services on the source server. The file copy action must be initiated from the source server. i.e. I cannot manually logon to the target machines and initiate the copy - though an automated way to do this is acceptable. Is it possible to use WMI or PowerShell Remoting to push or pull the file from the source to the target ? Is it possible to invoke some sort of built in http client or invoke the BITS service/agent on the remote servers to pull files from the source server ? Other suggestions please.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >