Search Results

Search found 18379 results on 736 pages for 'output buffering'.

Page 4/736 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Run command with no terminal output

    - by Insomaniacal
    Hello, I've searched around online, but can't find the answer to my question. What I want to do is run a command in pythong, using the subprocess module, and store the output in a variable. However, I do not want the command's output to be printed to the terminal. For this code: def storels(): a = subprocess.Popen("ls",shell=True) storels() I get the directory listing in the terminal, instead of having it stored in a. I've also tried def storels(): subprocess.Popen("ls > tmp",shell=True) a = open("./tmp") [Rest of Code] storels() This also prints the output of ls to my terminal. I've even tried this command with the somewhat dated os.system method, since running "ls tmp" in the terminal doesn't print ls to the terminal at all, but stores it in tmp. However, the same thing happens. I'm using python 2.6. Any suggestions? Thanks in advance!

    Read the article

  • How do I fix a corrupted harddrive after failed upgrade?

    - by Nil
    The problem originated when I was trying to fix this problem. Things went horribly, horribly wrong and I ended up with a new problem altogether. The last thing I did was run sudo apt-get install and that caused my system to freeze. I restarted my computer and it would not boot from the harddrive. I ran a copy of Ubuntu 12.10 from a flashdrive that I had and ran gparted to see if my partitions were all there. It returned this message: Invalid partition table on /dev/sda -- wrong signature 5208. The drive appeared as a 2TiB unallocated drive with an error. The drive had 4 partitions before (plus random unallocated space). There was a fat32 partition, an ext4 partition which contained ubuntu 13.04/13.10 (I don't even know which one at this point), an extended partition which contained a swap partition for my ubuntu partition (I was meaning to move that ubuntu partition into the extended partition, never got around to it), and another partition (I don't remember how I formatted it). I should also mention this is a 1TB harddrive. So in short, I have a corrupted partition table on my primary harddrive from which I boot from, how can I fix this? I tried mounting the drive with sudo mount /dev/sda1 /media/ubuntu then I changed my directory to said folder and tried to list files and this monstrosity happened: $ ls ls: cannot access ??w?j^?.: Input/output error ls: cannot access ??(? ?x?.|: Input/output error ls: cannot access 6W_@?)?._??: Input/output error ls: cannot access HB0v???.A}?: Input/output error ls: cannot access ???.?X: Input/output error ls: cannot access t)?.+?l: Input/output error ls: cannot access ?h@ ?.@ : Input/output error ls: cannot access >? @??.???: Input/output error ls: cannot access m???.??: Input/output error ls: cannot access @ if??a?: Input/output error ls: cannot access ?M!vN$?.??n: Input/output error ls: cannot access ?o? ??.Bm`: Input/output error ls: cannot access ?:I??? M. : Input/output error ls: cannot access W??.??: Input/output error ls: cannot access ?: Input/output error ls: cannot access ?W?s??: Input/output error ls: cannot access ?v?k?.???: Input/output error ls: cannot access 5?$<N??: Input/output error .x????.??i: Input/output error ls: cannot access je????.j?1: Input/output error XjD?.???: Input/output error ls: cannot access W??n???.?: Input/output error ls: cannot access ?^x.$"?: Input/output error ls: cannot access !??*!??j.??: Input/output error ls: cannot access '-??k?^?.???: Input/output error ls: cannot access b?w?w?b.\??: Input/output error ls: cannot access o????"z.??B: Input/output error ls: cannot access ??b?h.?3-: Input/output error ls: cannot access ??.$7: Input/output error ls: cannot access )??K.bk: Input/output error ls: cannot access s??z?.?(?: Input/output error ls: cannot access ?F@?0?.@?: Input/output error .?D: Input/output error .??: Input/output error ls: cannot access?????. @: Input/output error ls: cannot access ?/?? ?.??: No such file or directory ls: cannot access rk?p4q(?.?k: Input/output error This looks promising. This is the output of fdisk -l $ sudo fdisk -l /dev/sda Warning: ignoring extra data in partition table 5 Warning: ignoring extra data in partition table 5 Warning: ignoring extra data in partition table 5 Warning: invalid flag 0x5208 of partition table 5 will be corrected by w(rite) Disk /dev/sda: 2199.0 GB, 2199023132672 bytes 255 heads, 63 sectors/track, 267349 cylinders, total 4294967056 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x44fdfe06 Device Boot Start End Blocks Id System /dev/sda1 113305600 894715903 390705152 c W95 FAT32 (LBA) /dev/sda2 894715904 1489307647 297295872 83 Linux /dev/sda3 1489309694 1497307135 3998721 5 Extended /dev/sda4 1497309184 1953523711 228107264 7 HPFS/NTFS/exFAT /dev/sda5 ? 3013257822 3688738171 337740175 aa Unknown

    Read the article

  • C# Putting the required DLLs somewhere other than the root of the output

    - by aip.cd.aish
    I am using EmguCV for a project and when our program runs it needs some dlls like "cxcore.dll" etc. (or it throws runtime exceptions). At the moment, I put the files in the root of the output folder (selected "Copy Always" in the file's properties in Visual Studio). However it looks a bit messy, to have about 10 different dlls just there. Is there someway where I can move it to a subfolder in the output folder and it'll still find it.

    Read the article

  • Xcode and input/output files

    - by user112232
    I have to put my input files directly in the root directory for xcode to see them, and the output files are always in the same root directly. How can I configure xcode to change the input/output directories ?

    Read the article

  • C++ console output in Netbeans

    - by Spencer
    When I run a C++ program in Netbeans on a Mac that has cout or printf statements the output is displayed in a terminal opened using X11. Is there a console built into Netbeans? If yes, how do I change the output to it? Thanks, Spencer

    Read the article

  • How to call a c++ function using c && redirect application output to textEdit in Qt

    - by Brandon Hilton
    I'm trying to do a couple of things at once. I'm trying to do one major thing: redirect the application output that is displayed in the Qt Creator console to a textEdit that I have on my GUI. However, the class that I need to do this in is written in C and all of its related headers are in C as well. Is there a way that I can redirect the output into the textEdit within the C class?

    Read the article

  • C# Speaker Output Device *Advanced* Settings

    - by Kyle
    Hello all. I have a C# (WPF) application which checks for all output devices (Speakers) and I need to check the Bit Depth and Sample Rate of the output device. Has anyone worked with this or know of a way to do so? I have been searching around, but found nothing similar... Any help is much appreciated. Thanks

    Read the article

  • $RECYCLE.BIN.trashinfo: Input/output error

    - by Parto
    I cannot delete .Trash-503 folder via GUI or terminal, it returns a $RECYCLE.BIN.trashinfo: Input/output error Even sudo rm -r or even an ls works in that directory. Check terminal output below: subroot@subroot:~$ cd /media/xxxxx/ subroot@subroot:/media/xxxxx$ rm .Trash-503/ rm: cannot remove `.Trash-503/': Is a directory subroot@subroot:/media/xxxxx$ rm -r .Trash-503/ rm: cannot remove `.Trash-503/info/$RECYCLE.BIN.trashinfo': Input/output error rm: cannot remove `.Trash-503/info/found.000.trashinfo': Input/output error rm: cannot remove `.Trash-503/info': Directory not empty subroot@subroot:/media/BONJOUR$ sudo rm -r .Trash-503/ [sudo] password for subroot: rm: cannot remove `.Trash-503/info/$RECYCLE.BIN.trashinfo': Input/output error rm: cannot remove `.Trash-503/info/found.000.trashinfo': Input/output error subroot@subroot:/media/xxxxx$ cd .Trash-503/ subroot@subroot:/media/xxxxx/.Trash-503$ ls info subroot@subroot:/media/xxxxx/.Trash-503$ cd info/ subroot@subroot:/media/xxxxx/.Trash-503/info$ ls ls: cannot access $RECYCLE.BIN.trashinfo: Input/output error ls: cannot access found.000.trashinfo: Input/output error found.000.trashinfo $RECYCLE.BIN.trashinfo subroot@subroot:/media/xxxxx/.Trash-503/info$ What's going on here and how can I delete this folder?

    Read the article

  • Unexpected Blank lines in python output

    - by Martlark
    I have a bit of code that runs through a dictionary and outputs the values from it in a CSV format. Strangely I'm getting a couple of blank lines where all the output of all of the dictionary entries is blank. I've read the code and can't understand has anything except lines with commas can be output. The blank line should have values in it, so extra \n is not the cause. Can anyone advise why I'd be getting blank lines? Other times I run the missing line appears. Missing line: 6415, 6469, -4.60, clerical, 2, ,,,joe,030193027org,joelj,030155640dup Using python 2.6.5 Bit of code: tfile = file(path, 'w') tfile.write('Rec_ID_A, Rec_ID_B, Weight, Assigned, Run, By, On, Comment\n') rec_num_a = 0 while (rec_num_a <= max_rec_num_a): try: value = self.dict['DA'+str(rec_num_a)] except: value = [0,0,0,'rejected'] if (value[3]!='rejected'): weightValue = "%0.2f" % value[2] line = value[0][1:] + ', ' + value[1][1:] + ', ' + weightValue \ + ', ' + str(value[3]) + ', ' + str(value[4]) if (len(value)>5): line = line + ', ' + value[5] + ',' + value[6] + ',' + value[7] (a_pkey, b_pkey) = self.derive_pkeys(value) line = line + a_pkey + b_pkey tfile.write( line + '\n') rec_num_a +=1 Sample output 6388, 2187, 76.50, clerical, 1, ,,,cameron,030187639org,cameron,030187639org 6398, 2103, 70.79, clerical, 1, ,,,caleb,030189225org,caldb,030189225dup 6402, 2205, 1.64, clerical, 2, ,,,jenna,030190334org,cameron,020305169dup 6409, 7892, 79.09, clerical, 1, ,,,liam,030191863org,liam,030191863org 6416, 11519, 79.09, clerical, 1, ,,,thomas,030193156org,thomas,030193156org 6417, 8854, 6.10, clerical, 2, ,,,ruby,030193713org,mia,020160397org 6421, 2864, -0.84, clerical, 2, ,,,kristin,030194394org,connou,020023478dup 6423, 413, 75.63, clerical, 1, ,,,adrian,030194795org,adriah,030194795dup

    Read the article

  • Using a handle to collect output from CreateProcess()

    - by Stef
    Hi I am using CreateProcess() to run an external console application in Windows from my GUI application. I would like to somehow gather the output to know whether there were errors. Now I know I have to do something with hStdOutput, but I fail to understand what. I am new to c++ and an inexperienced programmer and I actually don't know what to do with a handle or how to light a pipe. How do I get the output to some kind of variable (or file)? This is what I have a the moment: void email::run(string path,string cmd){ WCHAR * ppath=new(nothrow) WCHAR[path.length()*2]; memset(ppath,' ',path.length()*2); WCHAR * pcmd= new(nothrow) WCHAR[cmd.length()*2]; memset(pcmd,' ',cmd.length()*2); string tempstr; ToWCHAR(path,ppath); //creates WCHAR from my std::string ToWCHAR(cmd,pcmd); STARTUPINFO info={sizeof(info)}; info.dwFlags = STARTF_USESHOWWINDOW; //hide process PROCESS_INFORMATION processInfo; if (CreateProcess(ppath,pcmd, NULL, NULL, FALSE, 0, NULL, NULL, &info, &processInfo)) { ::WaitForSingleObject(processInfo.hProcess, INFINITE); CloseHandle(processInfo.hProcess); CloseHandle(processInfo.hThread); } delete[](ppath); delete[](pcmd); } This code probably makes any decent programmer scream, but (I shouldn't even say it:) It works ;-) The Question: How do I use hStdOutput to read the output to a file (for instance)?

    Read the article

  • Swingworker producing duplicate output/output out of order?

    - by Stefan Kendall
    What is the proper way to guarantee delivery when using a SwingWorker? I'm trying to route data from an InputStream to a JTextArea, and I'm running my SwingWorker with the execute method. I think I'm following the example here, but I'm getting out of order results, duplicates, and general nonsense. Here is my non-working SwingWorker: class InputStreamOutputWorker extends SwingWorker<List<String>,String> { private InputStream is; private JTextArea output; public InputStreamOutputWorker(InputStream is, JTextArea output) { this.is = is; this.output = output; } @Override protected List<String> doInBackground() throws Exception { byte[] data = new byte[4 * 1024]; int len = 0; while ((len = is.read(data)) > 0) { String line = new String(data).trim(); publish(line); } return null; } @Override protected void process( List<String> chunks ) { for( String s : chunks ) { output.append(s + "\n"); } } }

    Read the article

  • Any HTTP proxies with explicit, configurable support for request/response buffering and delayed conn

    - by Carlos Carrasco
    When dealing with mobile clients it is very common to have multisecond delays during the transmission of HTTP requests. If you are serving pages or services out of a prefork Apache the child processes will be tied up for seconds serving a single mobile client, even if your app server logic is done in 5ms. I am looking for a HTTP server, balancer or proxy server that supports the following: A request arrives to the proxy. The proxy starts buffering in RAM or in disk the request, including headers and POST/PUT bodies. The proxy DOES NOT open a connection to the backend server. This is probably the most important part. The proxy server stops buffering the request when: A size limit has been reached (say, 4KB), or The request has been received completely, headers and body Only now, with (part of) the request in memory, a connection is opened to the backend and the request is relayed. The backend sends back the response. Again the proxy server starts buffering it immediately (up to a more generous size, say 64KB.) Since the proxy has a big enough buffer the backend response is stored completely in the proxy server in a matter of miliseconds, and the backend process/thread is free to process more requests. The backend connection is immediately closed. The proxy sends back the response to the mobile client, as fast or as slow as it is capable of, without having a connection to the backend tying up resources. I am fairly sure you can do 4-6 with Squid, and nginx appears to support 1-3 (and looks like fairly unique in this respect). My question is: is there any proxy server that empathizes these buffering and not-opening-connections-until-ready capabilities? Maybe there is just a bit of Apache config-fu that makes this buffering behaviour trivial? Any of them that it is not a dinosaur like Squid and that supports a lean single-process, asynchronous, event-based execution model? (Siderant: I would be using nginx but it doesn't support chunked POST bodies, making it useless for serving stuff to mobile clients. Yes cheap 50$ handsets love chunked POSTs... sigh)

    Read the article

  • ArcObjects: Is buffering a point faster than buffering a line / polyline?

    - by Quigrim
    I can write my code logic to either buffer a polyline or to buffer the to and from point of the polyline. Working with the points will be easier, so it is the preferred way. Logically my reasoning tells me that buffering a point will be faster as it will always be a perfect circle. But will buffering 2 points still be faster than buffering 1 polyline? My gut says yes. Any comments?

    Read the article

  • Output problem in mysql query in MFC program

    - by D.Gaughan
    Im currently working on a small MFC program that outputs data from a mysql database. I can get output when im using an sql statement that does not contain any variable eg. select album from Artists; but when i try to use a variable the program compiles but i get no output eg. mysql_perform_query(conn,select album from Artists where artists = '"+m_search_edit"'") Here is the function for mysql_perform_query: MYSQL_RES* mysql_perform_query(MYSQL *conn, const char* query) { // send the query to the database if (mysql_query(conn, query)) { // printf("MySQL query error : %s\n", mysql_error(conn)); // exit(1); } return mysql_use_result(conn); } And here is the code block for outputting the data: struct connection_details mysqlD; mysqlD.server = "www.freesqldatabase.com"; // where the mysql database is mysqlD.user = "**********"; // the root user of mysql mysqlD.password = "***********"; // the password of the root user in mysql mysqlD.database = "***************"; // the databse to pick // connect to the mysql database conn = mysql_connection_setup(mysqlD); CStringA query; query.Format("select album from Artists where artist = '%s'", CT2CA(m_search_edit)); res = mysql_perform_query(conn, query); //res = mysql_perform_query (conn, "select distinct artist from Artists"); while((row = mysql_fetch_row(res)) != NULL){ CString str; UpdateData(); str = ("%s\n", row[0]); UpdateData(FALSE); m_list_control.AddString(str); } The m_search_edit variable is the variable for an edit box. I am using Visual Studio 2008 with one copy of this program unicode and one nonunicode, I also have a version built with VC++ 6. Any tips on how I can get output from the databse using the m_search_edit variable??

    Read the article

  • What's wrong with output parameters?

    - by Chris McCall
    Both in SQL and C#, I've never really liked output parameters. I never passed parameters ByRef in VB6, either. Something about counting on side effects to get something done just bothers me. I know they're a way around not being able to return multiple results from a function, but a rowset in SQL or a complex datatype in C# and VB work just as well, and seem more self-documenting to me. Is there something wrong with my thinking, or are there resources from authoritative sources that back me up? What's your personal take on this and why? What can I say to colleagues that want to design with output parameters that might convince them to use different structures? EDIT: interesting turn- the output parameter I was asking this question about was used in place of a return value. When the return value is "ERROR", the caller is supposed to handle it as an exception. I was doing that but not pleased with the idea. A coworker wasn't informed of the need to handle this condition and as a result, a great deal of money was lost as the procedure failed silently!

    Read the article

  • how to prevent log output from PostgreSQL stored procedure ?

    - by ssc
    I am running a number of PostgreSQL scripts that used to produce excessive log output. I managed to reduce most of the output to an acceptable amount by passing --quiet as parameter to the psql command line client and adding SET client_min_messages='warning'; to the beginning of my SQL scripts. This works fine for most basic statements like SELECT, INSERT, UPDATE, etc.) However, when I call a stored function in a script using e.g. SELECT my_func(my_args);, there is still log output similar to my_func (omitted a long with many '-' here because SF thinks that's a headline) (1 row) The output is useless; it only makes me having to scroll back up a long way after the script has run and also makes it much harder than necessary to spot any relevant error output. How can I get rid of it ?

    Read the article

  • JAVA BubbleSort Output Plotting

    - by John Smith
    I'm not sure how to plot the output I get with my run time results for BubbleSort. Here's the thing: I've written a working BubbleSort algorithm that does exactly as it should. But I wish to plot the output, to show the following: Best Case, Worst Case, Average Case ... How would I go about plotting it on a graph? Here is the code: public class BubbleSort { static double bestTime = 10000000, worstTime = 0; public static void main(String[] args) { int BubArray[] = new int[]{13981, 6793, 2662, 10986, 733, ... #1000 integers}; System.out.println("Unsorted List Before Bubble Sort"); for(int a = 0; a < BubArray.length; a++){ System.out.print(BubArray[a] + " "); } System.out.println("\n Bubble Sort Execution ..."); for(int i=0; i<10000;i++) { bubbleSortTimeTaken(BubArray, i); } int itrs = bubbleSort(BubArray); System.out.println(""); System.out.println("Array After Bubble Sort"); System.out.println("Moves Taken for Sort : " + itrs + " Moves."); System.out.println("BestTime: " + bestTime + " WorstTime: " + worstTime); System.out.print("Sorted Array: \n"); for(int a = 0; a < BubArray.length; a++){ System.out.print(BubArray[a] + " "); } } private static int bubbleSort(int[] BubArray) { int z = BubArray.length; int temp = 0; int itrs = 0; for(int a = 0; a < z; a++){ for(int x=1; x < (z-a); x++){ if(BubArray[x-1] > BubArray[x]){ temp = BubArray[x-1]; BubArray[x-1] = BubArray[x]; BubArray[x] = temp; } itrs++; } } return itrs; } public static void bubbleSortTimeTaken(int[] BubArray, int n) { long startTime = System.nanoTime(); bubbleSort(BubArray); double timeTaken = (System.nanoTime() - startTime)/1000000d; if (timeTaken > 0) { worstTime = timeTaken; } else if (timeTaken < bestTime) { bestTime = timeTaken; } System.out.println(n + "," + timeTaken); } } The output are as the following ( execution number, time (nano/10^6): Unsorted List Before Bubble Sort 13981 6793 2662 .... #1000 integers Bubble Sort Execution ... 0, 18.319891 1, 4.728978 2, 3.670697 3, 3.648922 4, 4.161576 5, 3.824369 .... 9995, 4.331423 9996, 3.692473 9997, 3.709893 9998, 6.16055 9999, 4.32209 Array After Bubble Sort Moves Taken for Sort : 541320 Moves. BestTime: 1.0E7 WorstTime: 4.32209 Sorted Array: 10 11 17 24 57 60 83 128 141 145 ... #1000 integers I am looking for graphs to represent Average, Best and Worst case based on the output but my current graphs don't look correct. Any help would be appreciated, thanks.

    Read the article

  • C++ - Unwanted characters printed in output file.

    - by Gabe
    This is the last part of the program I am working on. I want to output a tabular list of songs to cout. And then I want to output a specially formatted list of song information into fout (which will be used as an input file later on). Printing to cout works great. The problem is that tons of extra character are added when printing to fout. Any ideas? Here's the code: void Playlist::printFile(ofstream &fout, LinkedList<Playlist> &allPlaylists, LinkedList<Songs*> &library) { fout.open("music.txt"); if(fout.fail()) { cout << "Output file failed. Information was not saved." << endl << endl; } else { if(library.size() > 0) fout << "LIBRARY" << endl; for(int i = 0; i < library.size(); i++) // For Loop - "Incremrenting i"-Loop to go through library and print song information. { fout << library.at(i)->getSongName() << endl; // Prints song name. fout << library.at(i)->getArtistName() << endl; // Prints artist name. fout << library.at(i)->getAlbumName() << endl; // Prints album name. fout << library.at(i)->getPlayTime() << " " << library.at(i)->getYear() << " "; fout << library.at(i)->getStarRating() << " " << library.at(i)->getSongGenre() << endl; } if(allPlaylists.size() <= 0) fout << endl; else if(allPlaylists.size() > 0) { int j; for(j = 0; j < allPlaylists.size(); j++) // Loops through all playlists. { fout << "xxxxx" << endl; fout << allPlaylists.at(j).getPlaylistName() << endl; for(int i = 0; i < allPlaylists.at(j).listSongs.size(); i++) { fout << allPlaylists.at(j).listSongs.at(i)->getSongName(); fout << endl; fout << allPlaylists.at(j).listSongs.at(i)->getArtistName(); fout << endl; } } fout << endl; } } } Here's a sample of the output to music.txt (fout): LIBRARY sadljkhfds dfgkjh dfkgh 3 3333 3 Rap sdlkhs kjshdfkh sdkjfhsdf 3 33333 3 Rap xxxxx PayröÈöè÷÷(÷H÷h÷÷¨÷È÷èøø(øHøhøø¨øÈøèùù(ùHùhùù¨ùÈùèúú(úHúhúú¨úÈúèûû(ûHûhûû¨ûÈûèüü(üHühüü¨üÈüèýý(ýHýhý ! sdkjfhsdf!õüöýÄõ¼5! sadljkhfds!þõÜö|ö\ þx þ  þÈ þð ÿ ÿ@ ÿh ÿ ÿ¸ ÿà 0 X ¨ Ð ø enter code here enter code here

    Read the article

  • XML output from MySQL

    - by NumberFour
    Hi, is there any chance of getting the output from a MySQL query directly to XML? Im referring to something like MSSQL has with SQL-XML plugin, for example: SELECT * FROM table WHERE 1 FOR XML AUTO returns text (or xml data type in MSSQL to be precise) which contains an XML markup structure generated according to the columns in the table. With SQL-XML there is also an option of explicitly defining the output XML structure like this: SELECT 1 AS tag, NULL AS parent, emp_id AS [employee!1!emp_id], cust_id AS [customer!2!cust_id], region AS [customer!2!region] FROM table FOR XML EXPLICIT which generates an XML code as follows: <employee emp_id='129'> <customer cust_id='107' region='Eastern'/> </employee> Do you have any clues how to achieve this in MySQL? Thanks in advance for your answers.

    Read the article

  • Problem with Ruby script output being stored into a file

    - by nickf
    I have a Ruby script that outputs a heap of text. As an example: puts "line 1" puts "line 2" puts "line 3" # etc... (obviously, this isn't how my script works..) There's not a lot of data - perhaps about 8kb of character data in total. When I run the script on the command line, it works as expected: $ ./my-script.rb line 1 line 2 line 3 But, when I push it into a file, the output is truncated at exactly 4096 bytes: $ ./my-script.rb > output.txt What would cause it to stop at 4kb?

    Read the article

  • PowerShell: Read text, regex sort, write output to file and formatting

    - by Bill Hunter
    I am a Powershell novice and have run into a challenge in reading, sorting, and outputting a csv file. The input csv has no headers, the data is as follows: 05/25/2010,18:48:33,Stop,a1usak,10.128.212.212 05/25/2010,18:48:36,Start,q2uhal,10.136.198.231 05/25/2010,18:48:09,Stop,s0upxb,10.136.198.231 I use the following piping construct to read the file, sort and output to a file: (Get-Content d:\vpnData\u62gvpn2.csv) | %{,[regex]::Split($, ",")} | sort @{Expression={$[3]}},@{Expression={$_[1]}} | out-file d:\vpnData\u62gvpn3.csv The new file is written with the following format: 05/25/2010 07:41:57 Stop a0uaar 10.128.196.160 05/25/2010 12:24:24 Start a0uaar 10.136.199.51 05/25/2010 20:00:56 Stop a0uaar 10.136.199.51 What I would like to see in the output file is a similar format to the original input file with comma dilimiters: 05/25/2010,07:41:57,Stop,a0uaar,10.128.196.160 05/25/2010,12:24:24,Start,a0uaar,10.136.199.51 05/25/2010,20:00:56,Stop,a0uaar,10.136.199.51 But I can't quite seem to get there. I'm almost of the mind that I'll have to write another segment to read the newly produced file and reset its contents to the preferred format for further processing. Thoughts?

    Read the article

  • Explanation of output

    - by Anon
    My program class Building { Building() { System.out.print("b "); } Building(String name) { this(); System.out.print("bn " + name); } }; public class House extends Building { House() { System.out.print("h "); // this is line# 1 } House(String name) { this(); // This is line#2 System.out.print("hn " + name); } public static void main(String[] args) { new House("x "); } } We know that compiler will write a call to super() as the first line in the child class's constructor. Therefore should not the output be: b (call from compiler written call to super(), before line#2 b (again from compiler written call to super(),before line#1 ) h hn x But the output is b h hn x Why is that?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >