Search Results

Search found 4783 results on 192 pages for 'a txt'.

Page 16/192 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Why is the meaning of “ours” and “theirs” reversed with git-svn

    - by Marc Liyanage
    I use git-svn and I noticed that when I have to fix a merge conflict after performing a git svn rebase, the meaning of the --ours and --theirs options to e.g. git checkout is reversed. That is, if there's a conflict and I want to keep the version that came from the SVN server and throw away the changes I made locally, I have to use ours, when I would expect it to be theirs. Why is that? Example: mkdir test cd test svnadmin create svnrepo svn co file://$PWD/svnrepo svnwc cd svnwc echo foo > test.txt svn add test.txt svn ci -m 'svn commit 1' cd .. git svn clone file://$PWD/svnrepo gitwc cd svnwc echo bar > test.txt svn ci -m 'svn commit 2' cd .. cd gitwc echo baz > test.txt git commit -a -m 'git commit 1' git svn rebase git checkout --ours test.txt cat test.txt # shows "bar" but I expect "baz" git checkout --theirs test.txt cat test.txt # shows "baz" but I expect "bar"

    Read the article

  • svn cat after svn del

    - by René Nyffenegger
    I have inadvertently svn-deleted a file with svn del --targets del.txt. Now, I'd like to recover that file with svn cat myPreciousFile.txt@4130 > myPreciousFile.txt, but svn gives me a warning that myPreciousFile.txt is not under version control. A svn cat -r 4130 myPreciousFile.txt > myPreciousFile.txt didn't work, either. Can someone please tell me how I'd go about recovering this file again?

    Read the article

  • How to truly sync files on Windows 7 so Dropbox notices the changes

    - by Edward Tanguay
    I want a file on my hard drive in Windows 7 to sync to my public dropbox folder. I can do this with: mklink /H "c:\dropbox\Public\test.txt" "c:\data\test.txt" And the first time after I do this, the file c:\dropbox\Public\test.txt is indeed created, and is available online via http://dl.dropbox.com/u/.../test.txt. And when I update the file c:\data\test.txt then indeed the file c:\dropbox\Public\test.txt reflects the changes, however: http://dl.dropbox.com/u/.../test.txt does not reflect the changes since DropBox somehow doesn't get the information that that file was changed. What is a workaround or another solution to this so that any changes in the original file is also reflected in the dropbox URL link?

    Read the article

  • Passing a file with multiple patterns to grep

    - by Michael Goldshteyn
    Let's say we have two files. match.txt: A file containing patterns to match: fed ghi tsr qpo data.txt: A file containing lines of text: abc fed ghi jkl mno pqr stu vwx zyx wvu tsr qpo Now, I want to issue a grep command that should return the first and third line from data.txt: abc fed ghi jkl zyx wvu tsr qpo ... because each of these two lines match one of the patterns in match.txt. I have tried: grep -F -f match.txt data.txt but that returns no results. grep info: GNU grep 2.6.3 (cygwin) OS info: Windows 2008 R2 Update: It seems, that grep is confused by the space in the search pattern lines, but with the -F flag, it should be treating each line in match.txt as an individual match pattern.

    Read the article

  • How can I concatenate corresponding lines in two files in Perl?

    - by Nano HE
    file1.txt hello tom well file2.txt world jerry done How to merge file1.txt with file2.txt; then create a new file - file3.txt hello world tom jerry well done thank you for reading and reply. Attached the completed code. #!/usr/bin/perl use strict; use warnings; open(F1,"<","1.txt") or die "Cannot open file1:$!\n"; open(F2,"<","2.txt") or die "Cannot open file2:$!\n"; open (MYFILE, '>>3.txt'); while(<F1>){ chomp; chomp(my $f2=<F2>); print MYFILE $_ . $f2 ."\n"; }

    Read the article

  • Lines Concatenation between two files.

    - by Nano HE
    file1.txt hello tom well file2.txt world jerry done How to merge file1.txt with file2.txt; then create a new file - file3.txt hello world tom jerry well done thank you for reading and reply. Attached the completed code. #!/usr/bin/perl use strict; use warnings; open(F1,"<","1.txt") or die "Cannot open file1:$!\n"; open(F2,"<","2.txt") or die "Cannot open file2:$!\n"; open (MYFILE, '>>3.txt'); while(<F1>){ chomp; chomp(my $f2=<F2>); print MYFILE $_ . $f2 ."\n"; }

    Read the article

  • Cannot work for 2nd iteration because of writing delay.

    - by karikari
    My code's IF-THEN does not work for 2nd iteration. This is due to, the jar processing take some time to write it result inside the output.txt. Since the writing is a bit late, my code's 2nd iteration will always read the previous written value inside the output.txt in order to pass it to the IF-THEN. For example, in 1st iteration: output.txt -- 0.9888 twrite.txt -- msg: ok 2nd iteration: output.txt -- 0.5555 twrite.txt -- msg: ok //the IF-THEN still gives this result which is based on previous iteration. it should be msg: not ok . since it is < 0.7 I need help, how to solve this 'delay' problem? HRESULT CButtonDemoBHO::onDocumentComplete(IDispatch *pDisp, VARIANT *vUrl){ ATLTRACE("CButtonDemoBHO::onDocumentComplete %S\n", vUrl->bstrVal); WinHttpClient client(vUrl->bstrVal); client.SendHttpRequest(); wstring httpResponseHeader = client.GetHttpResponseHeader(); wstring httpResponse = client.GetHttpResponse(); writeToLog(httpResponse.c_str()); if (isMainFrame(pDisp)){ m_normalPageLoad=false; FILE *child = _popen("javaw -jar c:\\simmetrics.jar c:\\chtml.txt c:\\thtml.txt > c:\\output.txt", "r"); fclose(child); char readnumber[10]; float f = 0; FILE *file11 = fopen("c:\\output.txt","r"); char* p = fgets(readnumber,10,file11); std::istringstream iss(p); iss >> f; if (f > 0.7) { wfstream file12 ("c:\\twrite.txt", ios_base::out); file12 << "Msg: ok"; file12.close(); } else { wfstream file12 ("c:\\twrite.txt", ios_base::out); file12 << "Msg: not ok"; file12.close(); } iss.clear(); fclose(file11); return S_OK; } return S_OK; }

    Read the article

  • Disable comments in stdout (DOS)

    - by Shadi
    If I use Dos command "copy" to concatenate two files: copy a1.txt + a2.txt a.txt I will have something like the following in stdout: C:\a1.txt C:\a2.txt 1 file(s) copied. I do not want to have anything written in stdout, I mean, I just want to have 'a.txt' without those 3 lines written in stdout. Is there any way to do so? the reason is, I need speed and I know that any IO takes time. Thanks, Shadi.

    Read the article

  • Explained shell statement

    - by Mats Stijlaart
    The following statement will remove line numbers in a txt file: cat withLineNumbers.txt | sed 's/^.......//' >> withoutLineNumbers.txt The input file is created with the following statement (this one i understand): nl -ba input.txt >> withLineNumbers.txt I know the functionality of cat and i know the output is written to the 'withoutLineNumbers.txt' file. But the part of '| sed 's/^.......//'' is not really clear to me. Thanks for your time.

    Read the article

  • i see the file but when i open it nothing is in it in c++ i/o stream and dont know why

    - by user320950
    #include<iostream> #include<fstream> #include<cstdlib> #include<iomanip> using namespace std; int main() { ifstream in_stream; // reads ITEMSLIST.txt ofstream out_stream1; // writes in listWititems.txt ifstream in_stream2; // reads PRICELIST.txt ofstream out_stream3;// writes in listWitprices.txt ifstream in_stream4;// read display.txt ofstream out_stream5;// write showitems.txt double p1=0.0,p2=0.0; int wrong=0; int count =0; char next; in_stream.open("ITEMLIST.txt", ios::in); // list of avaliable items /*if( in_stream.fail() )// check to see if itemlist.txt is open { wrong++; // counts number of errors cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ out_stream1.open("listWititems.txt", ios::out); // list of avaliable items /* if( out_stream1.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ in_stream2.open("PRICELIST.txt", ios::in); /*if( in_stream2.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ out_stream3.open("listWitdollars.txt", ios::out); /*if( out_stream3.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ in_stream4.open("display.txt", ios::in); /*if( in_stream4.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; } */ out_stream5.open("showitems.txt", ios::out); /*if( out_stream5.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; }*/ in_stream.setf(ios::fixed); while(!in_stream.eof()) // reads to end of file and gets p1 which is itemnum, clears and gets next character { in_stream >> p1; cin.clear(); cin >> next; } out_stream1.setf(ios::fixed); while (!out_stream1.eof()) { out_stream1 << p1; cin.clear(); cin >> next; } in_stream2.setf(ios::fixed); in_stream2.setf(ios::showpoint); in_stream2.precision(2); while(!in_stream2.eof()) // reads file to end of file { in_stream2 >> p1 >> p2 >> count; // gets p1,p2, and count which is current total in_stream2 >> p2; p1 += p2; p2++; cin.clear(); // allows more reading cin >> next; return p1, p2; } out_stream3.setf(ios::fixed); out_stream3.setf(ios::showpoint); out_stream3.precision(2); while(!out_stream3.eof()) // reads file to end of file { out_stream3 << p1 << p2 << count; out_stream3 << p2; p1 += p2; p2++; cin.clear(); // allows more reading cin >> next; return p1, p2; } in_stream4.setf(ios::fixed); in_stream4.setf(ios::showpoint); in_stream4.precision(2); while (!in_stream4.eof()) { in_stream4 >> p1 >> p2 >> count; cin.clear(); cin >> next; } out_stream5.setf(ios::fixed); out_stream5.setf(ios::showpoint); out_stream5.precision(2); out_stream5 <<setw(5)<< " itemnum " <<setw(5)<<" price "<<setw(5)<<" curr_total " <<endl; // sends items and prices to receipt.txt out_stream5 << setw(5) << p1 << setw(5) <<p2 << setw(5)<< count; // sends items and prices to receipt.txt out_stream5 << " You have a total of " << wrong++ << " errors " << endl; in_stream.close(); // closing files. out_stream1.close(); in_stream2.close(); out_stream3.close(); in_stream4.close(); out_stream5.close(); system("pause"); }

    Read the article

  • C# Combining lines

    - by Mike
    Hey everybody, this is what I have going on. I have two text files. Umm lets call one A.txt and B.txt. A.txt is a config file that contains a bunch of folder names, only 1 listing per folder. B.txt is a directory listing that contains folders names and sizes. But B contains a bunch of listing not just 1 entry. What I need is if B, contains A. Take all lines in B that contain A and write it out as A|B|B|B ect.... So example: A.txt: Apple Orange Pear XBSj HEROE B.txt: Apple|3123123 Apple|3434 Orange|99999999 Orange|1234544 Pear|11 Pear|12 XBSJ|43949 XBSJ|43933 Result.txt: Apple|3123123|3434 Orange|99999999|1234544 Pear|11|12 XBSJ|43949|43933 This is what I had but it's not really doing what I needed. string[] combineconfig = File.ReadAllLines(@"C:\a.txt"); foreach (string ccline in combineconfig) { string[] readlines = File.ReadAllLines(@"C:\b.txt"); if (readlines.Contains(ccline)) { foreach (string rdlines in readlines) { string[] pslines = rdlines.Split('|'); File.AppendAllText(@"C:\result.txt", ccline + '|' + pslines[0]); } } I know realize it's not going to find the first "if" because it reads the entire line and cant find it. But i still believe my output file will not contain what I need.

    Read the article

  • Python: how to run several scripts (or functions) at the same time under windows 7 multicore processor 64bit

    - by Gianni
    sorry for this question because there are several examples in Stackoverflow. I am writing in order to clarify some of my doubts because I am quite new in Python language. i wrote a function: def clipmyfile(inFile,poly,outFile): ... # doing something with inFile and poly and return outFile Normally I do this: clipmyfile(inFile="File1.txt",poly="poly1.shp",outFile="res1.txt") clipmyfile(inFile="File2.txt",poly="poly2.shp",outFile="res2.txt") clipmyfile(inFile="File3.txt",poly="poly3.shp",outFile="res3.txt") ...... clipmyfile(inFile="File21.txt",poly="poly21.shp",outFile="res21.txt") I had read in this example Run several python programs at the same time and i can use (but probably i wrong) from multiprocessing import Pool p = Pool(21) # like in your example, running 21 separate processes to run the function in the same time and speed my analysis I am really honest to say that I didn't understand the next step. Thanks in advance for help and suggestion Gianni

    Read the article

  • Where Not In OR Except simulation of SQL in LINQ to Object(C#)

    - by Thinking
    Suppose I have two lists that holds the list of source file names and destination file names respectively. The Sourcefilenamelist has files as 1.txt, 2.txt,3.txt, 4.txt while the Destinaitonlist has 1.txt,2.txt. I ned to write a linq query to find out which files are in SourceList that are absent in DestinationFile list. e.g. here the out put will be 3.txt and 4.txt. I have done this by a foreach statement.. but now I want to do the same by using LINQ(C#). Help needed. Thanks

    Read the article

  • not able to show the file from the array...

    - by sjl
    Hi, i'm trying to do an image gallery. i was not able to display the thumbnails stored in the array. instead it keep showing the same thumbnails. anyone can help? very much appreciated.. // Arrays that store the filenames of the text, images and thumbnails var thumbnails:Array = [ "images/image1_thumb.jpg", "images/image2_thumb.jpg", "images/image3_thumb.jpg", "images/image4_thumb.jpg", "images/image5_thumb.jpg", "images/image6_thumb.jpg", "images/image7_thumb.jpg" ]; var images:Array = [ "images/image1.jpg", "images/image2.jpg", "images/image3.jpg", "images/image4.jpg", "images/image5.jpg", "images/image6.jpg", "images/image7.jpg" ]; var textFiles:Array = [ "text/picture1.txt", "text/picture2.txt", "text/picture3.txt", "text/picture4.txt", "text/picture5.txt", "text/picture6.txt", "text/picture7.txt" ]; // NOTE: thumbnail images are 60 x 43 pixels in size // loop through the array and create the thumbnails and position them vertically for (var i:int = 0; i <7; i++) { // create an instance of MyUIThumbnail var thumbs:MyUIThumbnail = new MyUIThumbnail(); // position the thumbnails on the left vertically thumbs.y = 43 * i;/*** FILL IN THE BLANK HERE ***/ // store the corresponding full size image name in the thumbnail // use the "images" array thumbs.image = "images/image1.jpg"; thumbs.image = "images/image2.jpg"; thumbs.image = "images/image3.jpg"; thumbs.image = "images/image4.jpg"; thumbs.image = "images/image5.jpg"; thumbs.image = "images/image6.jpg"; thumbs.image = "images/image7.jpg"; // store the corresponding text file name in the thumbnail // use the "textFiles" array thumbs.textFile = "text/picture1.txt"; thumbs.textFile = "text/picture2.txt"; thumbs.textFile = "text/picture3.txt"; thumbs.textFile = "text/picture4.txt"; thumbs.textFile = "text/picture5.txt"; thumbs.textFile = "text/picture6.txt"; thumbs.textFile = "text/picture7.txt"; thumbs.imageFullSize = full_image_mc ; // store the reference to the textfield in the thumbnail thumbs.infoText = info; // load and display the thumbnails // use the "thumbnails" array thumbs.loadThumbnail("images/image1_thumb.jpg"); thumbs.loadThumbnail("images/image2_thumb.jpg"); thumbs.loadThumbnail("images/image3_thumb.jpg"); thumbs.loadThumbnail("images/image4_thumb.jpg"); thumbs.loadThumbnail("images/image5_thumb.jpg"); thumbs.loadThumbnail("images/image6_thumb.jpg"); thumbs.loadThumbnail("images/image7_thumb.jpg"); addChild(thumbs); } below is my thumbanail. as package{ import fl.containers.; import flash.events.; import flash.text.; import flash.net.; import flash.display.*; public class MyUIThumbnail extends MovieClip { public var image:String = ""; public var textFile:String = ""; var loader:UILoader = new UILoader(); public var imageFullSize:MyFullSizeImage; // reference to loader to show the full size image public var infoText:TextField; // reference to textfield that displays image infoText var txtLoader:URLLoader = new URLLoader(); // loader to load the text file public function MyUIThumbnail() { buttonMode = true; addChild(loader); this.addEventListener(MouseEvent.CLICK, myClick); txtLoader.addEventListener(Event.COMPLETE, displayText); loader.addEventListener(Event.COMPLETE, thumbnailLoaded); } public function loadThumbnail(filename:String):void { loader.source = filename; preloader.trackLoading(loader); } function myClick(e:MouseEvent):void { // load and display the full size image imageFullSize.loadImage("my_full_mc"); // load and display the text textLoad("info"); } function textLoad(file:String) { // load the text description from the text file loader.load(new URLRequest(textFile)); } function displayText(e:Event) { //display the text when loading is completed addChild(infoText); } function thumbnailLoaded(e:Event) { loader.width = 60; loader.height = 43; } } }

    Read the article

  • Ubuntu Bash Script changing file names chronologicaly

    - by Manifold
    I have this bash script where I am trying to change all *.txt files in a directory to their date of last modification. This is the script: #!/bin/bash # Renames the .txt files to the date modified # FROM: foo.txt Created on: 2012-04-18 18:51:44 # TO: 20120418_185144.txt for i in *.txt do mod_date=$(stat --format %y "$i"|awk '{print $1"_"$2}'|cut -f1 -d'.'|sed 's/[: -]//g') mv "$i" "$mod_date".txt done The error I am getting is: renamer.sh: 6: renamer.sh: Syntax error: word unexpected (expecting "do") Any help would be greatly appreciated. Thank you for your time.

    Read the article

  • how to use a batch file to delete a line of text in a bunch of text files? [on hold]

    - by wbt
    I have a bunch of txt files in my D drive which are placed randomly in different locations.Some files also contain symbols.I want a batch file so that i can delete their specific lines completely at the same time without doing it one by one for each file and please refer to a code which does not create a new text file at some other location with the changes being incorporated i.e I do not want the input.txt and output.txt thing.I just need the original files to be replaced with the changes as soon as i click the batch file. e.g D:\abc\1.txt D:\xyz\2.txt etc I want both of their 3rd lines erased completely with a single click and the new file must be saved with the same name in the same location i.e the new changed text files must replace the old text files with their respective lines removed.Maybe some sort of *.txt thing i.e i should be able to change all the files with the .txt extensions in a drive via a single batch file perhaps in another drive,not placing my batch file into each and every folder separately and then running them.Alternatively a vbs file is also welcomed. SORRY FOR THE LONG AND THOROUGH MESSAGE BUT I'M WONDERING ALL OVER THE INTERNET FOR THE LAST TWO DAYS JUST FOR THIS ONE BATCH FILE.ALL THE INFORMATION I GET IS A SORT OF JARGON FOR ME AS I AM NOT A GEEK WITH THE SCRIPTING.PLEASE DESCRIBE THE CODE TOO.YOUR HELP IS MUCH APPRECIATED

    Read the article

  • How can I load txt file from internet into my jsf app?

    - by Elena
    Hi all! It's me again) I have another problem. I want to load file (for example - txt) from web. I tried to use the next code in my managed bean: public void run() { try { URL url = new URL(this.filename); URLConnection connection = url.openConnection(); bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream())); if (bufferedReader == null) { return; } System.out.println("wwwwwwwwwwwwwwwwwwwww"); String str = bufferedReader.readLine(); System.out.println("qqqqqqqqqqqqqqqqqqqqqqq = " + str); while (bufferedReader.readLine() != null) { System.out.println("---- " + bufferedReader.readLine()); } } catch(MalformedURLException mue) { System.out.println("MalformedURLException in run() method"); mue.printStackTrace(); } catch(IOException ioe) { System.out.println("IOException in run() method"); ioe.printStackTrace(); } finally { try { bufferedReader.close(); } catch(IOException ioe) { System.out.println("UOException wile closing BufferedReader"); ioe.printStackTrace(); } } } public String doFileUpdate() { String str = FacesContext.getCurrentInstance().getExternalContext().getRequestServletPath(); System.out.println("111111111111111111111 str = " + str); str = "http://narod.ru/disk/20957166000/test.txt.html";//"http://localhost:8080/sfront/files/test.html"; System.out.println("222222222222222222222 str = " + str); FileUpdater fileUpdater = new FileUpdater(str); fileUpdater.run(); return null; } But the BufferedReader returns the html code of the current page, where i am trying to call managed bean's method. It's very strange thing - I have googled and none have had this problem. Maybe I do something wrong, maybe there us a simplest way to load file into web (jsf) app not using net API. Any ideas? Thanks very much for help! With best wishes)

    Read the article

  • Android - How can I upload a txt file to a website?

    - by Donal Rafferty
    I want to upload a txt file to a website, I'll admit I haven't looked into it in any great detail but I have looked at a few examples and would like more experienced opinions on whether I'm going in the right direction. Here is what I have so far: DefaultHttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); private String ret; HttpResponse response = null; HttpPost httpPost = null; public String postPage(String url, String data, boolean returnAddr) { ret = null; httpClient.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.RFC_2109); httpPost = new HttpPost(url); response = null; StringEntity tmp = null; try { tmp = new StringEntity(data,"UTF-8"); } catch (UnsupportedEncodingException e) { System.out.println("HTTPHelp : UnsupportedEncodingException : "+e); } httpPost.setEntity(tmp); try { response = httpClient.execute(httpPost,localContext); } catch (ClientProtocolException e) { System.out.println("HTTPHelp : ClientProtocolException : "+e); } catch (IOException e) { System.out.println("HTTPHelp : IOException : "+e); } ret = response.getStatusLine().toString(); return ret; } And I call it as follows: postPage("http://www.testwebsite.com", "data/data/com.testxmlpost.xml/files/logging.txt", true)); I want to be able to upload a file from the device to a website. But when trying this way I get the following response back. HTTP/1.1 405 Method Not Allowed Am I trying the correct way or should I be doing it another way?

    Read the article

  • Which web crawler to use to save news articles from a website into .txt files?

    - by brokencoding
    Hi, i am currently in dire need of news articles to test a LSI implementation (it's in a foreign language, so there isnt the usual packs of files ready to use). So i need a crawler that given a starting url, let's say http://news.bbc.co.uk/ follows all the contained links and saves their content into .txt files, if we could specify the format to be UTF8 i would be in heaven. I have 0 expertise in this area, so i beg you for some sugestions in which crawler to use for this task.

    Read the article

  • find window text and save txt to file named that wont work.

    - by blood
    hi, my code wont work and idk why. the point of my code is to find the top window and save a text file with the name the same as the text on the top menu bar (task bar i think?). then save some data to that text file. but everytime i try to use it the write fails if i set the name of the text file before hand so it wont change it will write the data to the file. but if i don't set it before hand it will make the text doc but not write anything to it. or sometimes it will just write numbers for the name (i think it's the handle number) then it will write the data. :\ it's odd can anyone help? #include <iostream> #include <windows.h> #include <fstream> #include <string> #include <sstream> #include <time.h> using namespace std; string header_str = ("NULL"); #define DTTMFMT "%Y-%m-%d %H:%M:%S " #define DTTMSZ 21 char buff[DTTMSZ]; fstream filestr; string ff = ("C:\\System logs\\txst.txt"); TCHAR buf[255]; int main() { GetWindowText(GetForegroundWindow(), buf, 255); stringstream header(stringstream::in | stringstream::out); header.flush(); header << ("C:\\System logs\\"); header << buf; header << (".txt"); header_str = header.str(); ff = header_str; cout << header_str << "\n"; filestr.open (ff.c_str(), fstream::in | fstream::out | fstream::app | ios_base::binary | ios_base::out); filestr << "dfg"; filestr.close(); Sleep(10000); return 0; }

    Read the article

  • how to print the linenumber of incorrectwords located in a txt file ?

    - by jad
    i have this piece of code which only prints the line number of the incorrect words. i want it to print the linenumbers of the incorrect words from the txt file. Am i able to modify this code to do that? # text1 is my incorrect words # words is my text file where my incorrect word are in from collections import defaultdict d = defaultdict(list) for lineno, word in enumerate(text1): d[word].append(lineno) print(d)

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >