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
1
vote
1 answer

Reading Line by Line Using PHP Via JSON String

I am trying to create a PHP function which will allow me to read selected lines from a text file using a JSON string. The JSON string consists of two numbers separated by a comma. The first number is the line I want to seek, and the second is the…
Wammy
  • 39
  • 11
1
vote
3 answers

How to read a text file by line in python

I want to randomly retrieve and print a whole line from a text file. The text file is basically a list and so each item on that list needs to be searched. import random a= random.random prefix = ["CYBER-", "up-", "down-", "joy-"] suprafix =…
1
vote
2 answers

Line by line textfile reading in android

The problem may be familiar and may even be tagged as a duplicate. I have tried reading other problems similar to mine and tried to do it, might as say copied it (xD), but to no avail though. I am new to Android Programming and I am trying to read a…
LadyWinter
  • 307
  • 6
  • 13
1
vote
1 answer

gdb: debug line by line with pipe

If I want to debug my program I call it like this: gdb ./myprog $ run < input.txt But now I want to execute it line by line, but how can I do this? I know the step command but I can only call it, if the run command was called before. Do I have to…
NaN
  • 3,501
  • 8
  • 44
  • 77
1
vote
1 answer

How to run Octave from a Notepad++ file line by line or by sections?

I am looking for a way to have my Notepad++ window open for editing my code and run it line by line or by sections (more than 1 line) while I am editing. It would be like having a real IDE; the output could be shown in the same window (Notepad++) or…
JaimeBee
  • 41
  • 4
1
vote
2 answers

In C#, How can I copy a file with arbitrary encoding, reading line by line, without adding or deleting a newline

I need to be able to take a text file with unknown encoding (e.g., UTF-8, UTF-16, ...) and copy it line by line, making specific changes as I go. In this example, I am changing the encoding, however there are other uses for this kind of processing.…
David Rogers
  • 4,010
  • 3
  • 29
  • 28
1
vote
1 answer

Executing grep via Perl

I am new to Perl. I am trying to execute grep command with perl. I have to read input from a file and based on the input, the grep has to be executed. My code is as follows: #!/usr/bin/perl use warnings; use strict; #Reading input files line by…
Dinesh
  • 16,014
  • 23
  • 80
  • 122
1
vote
1 answer

Vim Substitution Line by Line

I would like to run a command such as :s/write/run/ on a line by line basis. We can specify a range of lines such as :31,44s/write/run/. We can also search :/write/ and press n to move to the next occurrence. Is it possible to substitute in the…
Bryan
  • 17,201
  • 24
  • 97
  • 123
0
votes
4 answers

How to read a huge text file through javascript or jquery?

How can I read a huge text file line by line through javascript or jquery? I cant read all and split to an array because it will require lots of memmory. I just want to stream it... EDIT As a note I am working on a google chrome extension so that…
user1141820
  • 99
  • 3
  • 9
0
votes
3 answers

C# Line by Line check of a file

I am reading from a file line by line and i want to edit some of the lines i read.. The lines i want to edit must have some other specific lines above or below them, but i dont know how to express that in C#. For…
tequilaras
  • 277
  • 3
  • 7
  • 15
0
votes
0 answers

How to calculate each line of datas from different tables on Power BI?

I am struggling with a calculation on Power BI. Let's say you have two tables: 'Budget 2021' and 'Budget 2022', with the following data: "Budget 2021" table: Month Budget 1 January 150 February 200 March 350 "Budget 2022" table: Month Budget…
Niina
  • 1
  • 2
0
votes
1 answer

Not able write list of values line by line in a csv file

Here i am reading a csv file line by line(to update and append some values) and convert into a list. While again trying to write a csv file from the list,I'm unable to write it line by line. Actual Format: 1 abc 76-8 3 sht 09-9 5 bry 77-0 Expected…
shreyas
  • 69
  • 6
0
votes
0 answers

Show last row in dataframe if error is insert command in db table

I have a script that inserts data from a DataFrame into a Teradata DB table example list: 0 1 2 3 \ 0 2022-09-28 13:52:31.000192 U 1643652 2270.0 1 2022-09-28 13:52:31.000192 U 1643653 2272.0 I'm looking for a…
Serg
  • 93
  • 1
  • 10
0
votes
3 answers

how to print divisibles of a number in separate lines?

In Java, I have been trying to print the divisibles of the number 5. I got them to print out, but I would like to print four numbers in each line. I am using the following to print out the numbers divided by 5. System.out.println("\nDivided by 5:…
0
votes
1 answer

cleaning textfile each line by line ignoring few rows through python without using pandas

I want to use this text file in python, Read line by line, and want output as a list of lists with 9 columns (Team, Date, Rnd, A, W, D, L, Venue,Date)like: Arsenal 2021 Rnd A W D L Venue Date R1 Tottenham 1 0 0 Emirates March R2 Man utd 0 1 0 Old…