Questions tagged [txt]

txt is the conventional filename extension of text files.

1467 questions
-1
votes
2 answers

c++ std::fstream. How do I read a number at the start of the line (a float or an int), and then skip to the next? Using named variables so no loop

I have a text file in the following format: 100 #gravity 5000 #power 30 #fulcrum I want to assign these values to named variables, like so: void Game::reloadAttributes() { float test1, test2, test3; string line; std::fstream file; …
-1
votes
1 answer

Creating a new txt file in a PowerShell script and writing to it

I am fairly new to scripting so this may be a little vague or poorly worded. I also cut some stuff out, it is irrelevant, just names, but this is for someone else so in case they don't want it out there better safe than sorry. ANYWAY I have a script…
grayb3
  • 1
  • 1
-1
votes
2 answers

C++ getline function missing the first line of txt file

I have written a function to read from .txt file and build a linked list, but the function missed the first line of the file. Anyone have any idea why that happens? output: //empty line gmail San Francisco 123456 .txt file person1 gmail San…
Nigel
  • 161
  • 12
-1
votes
2 answers

Creating a a new .txt with lines from another .txt

I have a document with this structure (it's large, more than 20000 lines) @A00627:308:H227VDSX3:1:1201:30734:26349…
Sebastian
  • 55
  • 4
-1
votes
1 answer

Loop on .txt files to create and fill .html files

So my problem is that I have a .txt file which contains names, and data that I retrieve from another .txt file which is called "name.txt". Then I loop on every file name, and for every file I create a .html file which combine a html skeleton and the…
-1
votes
1 answer

How to read a .txt file each multiple (various) lines in python?

I have a .txt file, with the following formatted content: ------------------------ Fruit 1: Name: apple Color: green Taste: sour Property 4: yes ------------------------ Fruit 2: Name: strawberry …
Melina
  • 293
  • 3
  • 11
-1
votes
1 answer

How to verify domain ownership via text record check? (like flippa, godaddy, etc)

I'm looking to start a domain name marketplace for niche domains and need to verify domain ownership when people submit their domains for sale on the site. Similar to the process like Flippa or Godaddy domain auctions, where they give user a domain…
max
  • 83
  • 1
  • 11
-1
votes
1 answer

2 same Strings , when compared in a Junit test it tells me they are not equal

I try to compare this .txt USER bonb Bird USER colc Colin Cook EVENT alea Class ULE 11/11/2011 9:00 11/11/2011 13:00 EVENT alea Meeting MIC 11/11/2011 13:00 11/11/2011 14:00 EVENT alea Lunch Cafeteria 11/11/2011 14:00 11/11/2011 15:00 EVENT bonb…
DxDouglax
  • 1
  • 1
-1
votes
1 answer

How to write header to a text file?

I write output of my code into a .txt file. I need to put a header in the .txt file. Something like this: id, width, height, weight 1 252 455 555 2 544 525 475 3 4752 2445 58.5 4 452.3 125.2 1422.36 I…
Happypumpkin pm
  • 83
  • 1
  • 10
-1
votes
2 answers

AWK script with multiple statements not working on txt file

I have a large file called an.txt: head -n 6 an.txt Type Details Particulars Code Reference Amount Date ForeignCurrencyAmount ConversionCharge Bank Fee Monthly A/C Fee -8.50 31/03/2021 Eft-Pos Rutherford & Bond…
Christian Hick
  • 401
  • 3
  • 10
-1
votes
1 answer

Python replace 0d in txt

Have source file txt (download from accounting program) with 0a in line, when it's not needed (it makes line break). And have 0d and 0a in the place when it's needed. I need to open it in Excel ( I have another opportunity to download it in…
Elina
  • 23
  • 6
-1
votes
1 answer

C++ data not adding to text file

here is the full code #include #include #include using namespace std; struct Employee { int UniqueID; string FirstName,LastName, EmailAddress; Employee* next; Employee* previous; }; struct Company { …
Ali Haydar
  • 13
  • 3
-1
votes
2 answers

Adding to an integer stored in a text file in python?

I want to apologize for sucking at coding before I begin. So I store ONLY integers in the first line of a text file in python. And I want a function to add +1 to the integer in the text file. def addone(): with open("data/"+str(messager)+".txt",…
-1
votes
3 answers

Elaborate and structure a csv file from a plain text file

I wonder if there is a way to convert a plain file as shown below target: locus9_window12 length: 120 miRNA : hsa-miR-4458 length: 19 mfe: -23.7 kcal/mol p-value: 0.033901 target: locus104_window172 length: 120 miRNA : hsa-let-7b-5p length: 22 mfe:…
-1
votes
1 answer

Duplicate each line in a text file

I would like to dupliacte lines in a folder with multiples txt files, including the blank lines. A batch command would be ideal or python drag&drop script. Here is an example. (x being blank line) Alfred x Britney And I need it like…
foubou
  • 1
  • 1