Questions tagged [line-by-line]

Line By Line is a NodeJS module that helps you reading large text files, line by line, without buffering the files into memory.

114 questions
0
votes
0 answers

Contradictory behaviour while applying RegEx.exec() while reading a file line-by-line

i am trying to do this: render(argv,function() { var fileHandle = argv.output + '/docu.html'; var regex_ca_id = new RegExp('[A-Za-z1-9]{16}#[A-Za-z1-9]{5}',"g"); var rd = readline.createInterface({ input:…
0
votes
1 answer

How to read in a text file (line-by-line) and use the output as nameS to create .pdf Files in java?

I'm writing a program that would allow me to create several PDF Files with a set of given names (from a text file, each name represented by a line in the file). These PDF Files will have a watermark on each page. Here's the code I'm using: …
Zestos
  • 15
  • 1
  • 7
0
votes
3 answers

Ruby script to read file line by line and do if statments with puts?

I am trying to write a script that will fill out a mapping of equipment by using if statments on a text file. Here is the code I have tried: input.txt: SWITCH ROUTER FIREWALL ROUTER ROUTER FIREWALL SWITCH SWITCH Ruby code: IO.foreach("input.txt")…
emvee
  • 304
  • 4
  • 17
0
votes
2 answers

Index elements of large CSV file when reading line by line

I'm reading a large CSV file (>15 GB) line by line in R. I'm using con <- file("datafile.csv", open = "r") while (length(oneLine <- readLines(con, n = 1, warn = FALSE)) > 0) { # code to be written } In the "code to be written" section, I need…
0
votes
1 answer

Python extracting one and two word sentence from a csv line by line and writing it to other

Hi I have a csv with sentences in quotes, I want to leave out any sentence which has no more than three words and copy it to the other csv line by line. All help highly appreciated. Thanks Input csv: "9795e7dc9a5b032bdb39ace56c08b0e1","Top …
yadavabhishek
  • 17
  • 1
  • 4
0
votes
1 answer

Reading text files with strtol in C line by line

OK so I've got this function which finds the average of all numbers in a file: float averageOfNumbers(FILE *fp_in) { int n=0,S=0; char red[1024];char *ptr; int p_a_h; float sr; while(!feof(fp_in)){ …
glavata
  • 45
  • 4
0
votes
4 answers

C# Reading line by line from file to listbox

I have a problem with reading text from file line by line. System.IO.StreamReader file = new System.IO.StreamReader("ais.txt"); while ((line = file.ReadLine()) != null) { listBox1.Items.Add(line); } This code only read last line from file and…
0
votes
1 answer

LIne-by-line file-io not working as expected in Windows

I'm using Perl 5.16.1 from Strawberry in a Windows environment. I have a Perl script reading very large text files. The smallest text file is 30M. When reading files that do not have a line feed at the end of the very last line I get very peculiar…
-1
votes
1 answer

Whey does splitting a line of code into (that does many things) into many smaller lines run *so* much slower

This is all in python 3. I have a line of code that essentially does this: somefloat += someDict(someList(someIndex1)))(someIndex2) In essence what I have is a list of dictionaries, each dictionary containing multiple entries that point to a list…
user6916458
  • 400
  • 2
  • 7
  • 19
-1
votes
1 answer

How to read integers line by line from a text file in c++?

So I have a problem about a graph and I have to read from an input file multiple cases and check a propriety. Each case has on the first line n, the number of nodes it has, and on the second line a sequence of integers x y, where (x, y) is an edge.…
-1
votes
1 answer

How to split input text file that has string and doubles?

I am to read from an .txt input and sort into array by line (read: first name, last name, grade1, grade 2, grade3) but I am having issues. I am assuming that I would have to create arrays for each person, but I cannot get past sorting each line…
-1
votes
1 answer

Prinft line by line of file single thread C

I'm very stuck with one single problem, I need prinft file's line one by one in order with one thread. This is the code: #include #include #include #include /* Prototypes */ …
StAx
  • 272
  • 1
  • 3
  • 16
-1
votes
1 answer

Visual c++ how to read from rich text box

I am trying to read from a rich text box line by line in Visual c++ but don't know how to do it. Can anyone provide a small example of how it works? I am really new to visual studio and Visual C++. What I would like to do,is to store each line from…
Cata
  • 101
  • 1
  • 12
-1
votes
4 answers

For each line in file execute command synchronously and save to newline of another file

I have a wget script named Chktitle.sh -- this script takes a command like below $ Chktitle.sh "my url" I then have a file name url.txt with over 100 lines with urls and ips to check for web-page titles. Then i have results.txt as a blank file. Is…
-1
votes
1 answer

PHP Performing action on a variable line by line

I have a variable containing an html code and I want to perform an action of every line of the code:
downrep_nation
  • 432
  • 1
  • 7
  • 16