Questions tagged [file-processing]

333 questions
-1
votes
5 answers

Read a txt file line by line without using fopen()

I need to read a text file line by line. The problem is that in my code I cannot use fopen() and then fgets() to read the content of each line, because fopen() fails when I use a lot of threads (it seems that it gets overload because it is being…
bardulia
  • 145
  • 11
-2
votes
1 answer

How do loop through and open *.frm files in VB6?

In VB6, how can I loop through all the .frm files in a folder and do something to each of them?
CJ7
  • 22,579
  • 65
  • 193
  • 321
-2
votes
1 answer

pattern match processing of multiple .frm files

I have multiple VB6 .frm files. See example below. I want to strip away the functions and subs from the code and leave only the form design. What I need to do is find the last line starting with "Attribute" because after this line everything…
CJ7
  • 22,579
  • 65
  • 193
  • 321
-2
votes
2 answers

File reading in C++

I am working on the image processing through c++, I has to read the header of jpeg image in char format, I has to check the camera/system/device information of image, how can i do it.
Sahi
  • 17
  • 2
  • 5
-2
votes
1 answer

I am getting a " conversion from ‘std::string (*)[50]’ to non-scalar type ‘std::string’ requested" error and cant seem to fix it

Here is the beginning of a program I am writing. As you can see it is incomplete, but I was checking my program for bugs and I got this error. I looked it up and found solutions such as "do not include brackets while calling a multidim array" I…
hammonak
  • 1
  • 5
-2
votes
1 answer

Find missing values between text files using VBScript

EDIT 2 Just to make it clear - this question is not asking for "DA CODEZ", just an idea as to possible approaches in VBScript. It's not my weapon of choice, and if I needed to do this on a un*x box then I wouldn't be bothering anyone with…
Dycey
  • 4,767
  • 5
  • 47
  • 86
-2
votes
1 answer

Python Multithreading: Ping Domain names

I have a file with around 50,000 domain names with a domain name in each line. I want to read the file and find which domains are alive and write them to a different file. I am using ping to find the live domains. But it takes a lot of time to…
Ubi
  • 104
  • 10
-2
votes
1 answer

Hello I am working through Building with Java Programs 3rd edition, excercise 6.2 evenNumbers

//This is my code so far. If anyone guide me through that will be great. Write a method named evenNumbers that accepts a Scanner as a parameter reading input from a file containing a series of integers, and report various statistics about the…
JDev
  • 9
  • 2
-2
votes
1 answer

reading numerical bytes from a text file

I have an input file that has 16 bit int addresses. For each entry in the list, I need to read in 8 bits for a "page number", and 8 bits for an "offset". Any idea how I could do this? I don't find any support for doing bitwise operations in c.
-2
votes
1 answer

read and write file processing c++ which contains multiple column

Lets say i want to write and read this value Suppose i want to write SEAT: NAME: CLASS: DEPR. TIME: ARRV. TIME: FROM: TO: ======================Thus, this is what will be looked like in file.doc========= SEAT NAME CLASS DEPARTURE…
-2
votes
3 answers

Is it possible to reverse the order of items in a list without using the built-in .reverse() function?

I have to write a program that will reverse the letters of the words in a file. For example, if the file contains the words: snow tree star wreath It would change them into: wons eert rats htaerw Once that is done, I have to write a new file…
RivaEre
  • 11
  • 2
-2
votes
1 answer

which is faster java or batch scripting

I want to traverse few folders (which have subfolders and files in that) to search some word in the file and want to get line number, last modified date as result. Which is the better and efficient way to do it using java or batch/shell scripting? I…
user1653773
  • 373
  • 1
  • 5
  • 18
-2
votes
2 answers

Python Detect Missing Line in a Txt File

Let us say a txt file consists of these lines: A 1 2 3 B 1 2 3 C 1 3 Clearly, 2 is missing from C in the txt file. What is the idea to detect the missing 2 and output it? I need to read the txt file line by line. Thank you !
-3
votes
2 answers

writing information on the end of each line of a file in c++

i want to write a program that reads post-fix expressions from a file , each post-fix expression is on a line , the program then evaluates the post-fix expression then writes the result next to each line . it goes something like this : file…
T.Matar
  • 1
  • 3
-4
votes
2 answers

Turn every line of txt into list with strings

how to turn each line of txt file into list of strings example sentences board games for kids house with view on the sea I need output like this in python sentences = ["board games for kids ","house with view on the sea"]
1 2 3
22
23