Questions tagged [file-processing]
333 questions
0
votes
1 answer
PHP get the last line of an open file handle with multiple lines
This seems like it should be a simple thing to do but I'm having a bit of trouble with fgetc() when returning the last line of a open file handle. what I'm trying to do is return the last line written to the handle, I have the following which works…

tomo661
- 88
- 4
0
votes
3 answers
Read in data from excel file in C
I need to write a program that can read the relevant information
from a file and output the maintenance needs as shown in the sample
output on the following slides.
I have completed the code to read from the .txt file as seen in this screen…
user4142890
0
votes
0 answers
Why does remove and rename not work in my code
Case 2 is the part that has a problem. At the end of it, it's supposed to delete the file "List.txt" and rename the file "newlist.txt" to "List.txt" but neither of these happen and both functions return -1, so both files remain in the directory…
0
votes
1 answer
Can I convert while(true) loop to EventWaitHandle?
I'm trying to process large amount of text files via Parallel.ForEach adding processed data to BlockingCollection.
The problem is that I want the Task taskWriteMergedFile to consume the collection and write them to result file at least every 800000…

Persk
- 639
- 2
- 6
- 15
0
votes
1 answer
Program trying to read lines that aren't there
I am writing a program for my father so he can better track how much petrol he uses. Basically it grabs a line from a .txt file and splits it into 3 values which are used to perform basic calculations with. The calculations and values are then…

Nick.S
- 37
- 5
0
votes
1 answer
File protocol to get directory listing
I hope you can help me.
I am writing a desktop program that will run in a web browser (in HTML/CSS/javascript in case that wasn't clear). It will be entirely disconnected from the internet and obtain files and data using only FILE protocol. My…

G-Cam
- 261
- 3
- 12
0
votes
1 answer
Shred a file in X fragments with Y parity fragments for redundancy
The theory
says that we can split a file in N fragments and after that, we can recover the file with only P of those fragments. Where P < N.
I'm trying to build something like Symform, just a subset of that actually.
Each block is shred into 64…

Cacho Santa
- 6,846
- 6
- 41
- 73
0
votes
1 answer
how to set path for specific file in php
i have done each and every thing but i cant get into the folder. my file path: C:\xampp\htdocs\Project\p\new project\admin\index.html but failed. i have place the condition in if portion so that if condtion is true, then should open up a file fron…

user3187733
- 7
- 4
0
votes
3 answers
keep tracking of each token
I need to solve the following problem: Write a method named tokenStats that accepts as a parameter a Scanner containing a series of tokens. It should print out the sum of all the tokens that are legal integers, the sum of all the tokens that are…
0
votes
1 answer
My code is not sorting?
I have to create a program that will: open a file that consists of different sets of three numbers, and then output the smallest number for each line. (Note: I have to do it without using the min() function!)
For example if the file…

RivaEre
- 11
- 2
0
votes
3 answers
How to make a program use a file whose name you specify on the command line
How can I get this program to read in the "lab13.txt" in the command line? I've been trying to figure this out for over an hour and nothing seemed to work.
The prompt is "Write a program that determines and displays the number of lines in the file…

user2920249
- 137
- 4
- 13
0
votes
1 answer
Interactive file processing in using PHP, jQuery and Ajax
I'm migrating an old MS-DOS Foxpro program to cakePHP, but in some part of the application process the user will have the possibility to load a text file and process it according to some business logic.
I worked the algorithm, and it's working fine,…

DariusVE
- 132
- 1
- 10
0
votes
0 answers
Text file with different data types into structure arrays
I have to parse a text file with 3 different data types. I want it to be saved in a structure array with three members. My text file look like this:
>A B 45.78965
>A C 35.46731
>B C 46.78695
I have written a code and when I run it at the terminal,…

Aq Toh
- 13
- 2
0
votes
1 answer
Text file with different data types into structure array
I have to parse a text file with 3 different data types. I want it to be saved in a structure array with three members. My text file look like this:
A B 45.78965
A C 35.46731
B C 46.78695
The program that I'm reading it with is the following and it…

Aq Toh
- 13
- 2
0
votes
2 answers
How to delete a specific info based on student id
I'm new to java and I have a problem with deleting specific data based on the student id from user input.
I can only delete the student id but not all the info about that student.
Here is my code:
File inputFile = new File("test.txt");
File tempfile…

JK9
- 370
- 2
- 7
- 26