Questions tagged [file-read]

This tag can be used on questions about reading files.

To work with stored data, file handling belongs to the core knowledge of every programmer. One of the core file handling methods is reading a file.

Resources:

577 questions
-2
votes
4 answers

How can I write float data from a .txt file to a 2-dimensional array w/ VS2017?

How can I read float data from a .txt file: 8.9 789.3 845.6 2.45 2.25 2.05 . . .and write each float into an array element. I've looked online and I can't find a clear answer or tutorial on how to do this. I'm using VS2017 Enterprise, and I already…
-2
votes
1 answer

How to filter out letters from text file (start of string and end) , then print them out

The function needs to skip the lines in text file (after reading it) with contains symbol or numbers in FIRST && LAST string position. For example string($password column) 121dafasd should be skipped AND not printed out, because it starts with…
-2
votes
1 answer

Acessing folders outside the workspace

I've been searching for an answer to that for a while but without any success. I am trying to load csv files into my program to work with them later on and I have the following issue. When I try to access them directly from the place they are stored…
-2
votes
1 answer

file not found exception when reading file from Linux EXTREME VPS

i am storing images on Linux EXTREME VPS using java when i store it on server path i'm getting is /var/sentora/hostdata/campusguru/public_html/resources/images/bharath.png reading the path using following code if(imagePath != null &&…
bharath
  • 317
  • 1
  • 6
  • 24
-2
votes
2 answers

how to find and replace in csv using python

I have csv file with 900 rows and 11 columns. It contains approximately 4000 links which I want to replace with 4000 links (I have another csv file which contains both links in column 1 and 2). I am trying to automate it (find and replace) using…
user6948460
  • 47
  • 1
  • 6
-2
votes
3 answers

R Convert a String to List

I am importing a column from a file. The column is formed using a collect_list function. So every entry looks like follows: [1,5,10] [27,30,1,33,40] [1,2,8,20,30,50,...] I am trying to read this column into R and convert every row into a list. When…
Arpit Goel
  • 153
  • 1
  • 13
-2
votes
1 answer

reading and processing lots of files with multithreading

I need to read and process nearly 200 files every two hour. File sizes changes between 500KB - 10 MB. What should be the best way of implementing that? Reading all that file is a I/O job. On the other hand i have to serialize the json in that file…
Kemal Can Kara
  • 406
  • 2
  • 14
-2
votes
2 answers

How to read .xls file with multiple header in R / Python for data processing?

I have this file which is specified below, As you can see it consists of many header layers, how can i read this file in R / Python so that i could get it in proper format for processing it?
Nitz
  • 71
  • 4
-2
votes
1 answer

Reading local file using JavaScript

So i have a file locally called "index.html" which i access using the "file://" protocol. (So not the "http://" protocol). I need to access a file "data.txt" in the same directory which is continuously changed by a seperate program, but since i'm…
Resantic
  • 57
  • 7
-2
votes
1 answer

Read outside .Java file and extract the method details into Java code

I need to read a java project files from outside of that project. So Java Reflection cannot be used. Is there any mechanism or specific API to read a .java files of a project and extract the method signature details into a java code. Maybe a text…
-2
votes
2 answers

read .doc file using scala

I want to read .doc file in scala. I tried using apache.poi library for this but the method HWPFDocument(java.io.InputStream istream) accepts java io stream. If anyone can shed some light on this, that would great!
Priyanka
  • 72
  • 6
-2
votes
1 answer

Last file line reading gives different results

I am trying to read strings from a file with contents like: r FFFF r FF r FFFF Here is my code: int main () { int a; ifstream ifile; ifile.open("hi.txt"); while (!ifile.eof()) { ifile.getline(data, 100); // read a line from…
-2
votes
1 answer

file returning null on reading

I have the following code: FileReader fileReader = new FileReader(textfilename); BufferedReader bufferedReader = new BufferedReader(fileReader); System.out.println(bufferedReader.readLine()); To read the text file, I pass the path of the text file…
Vidya
  • 213
  • 3
  • 10
-2
votes
4 answers

Unable to read simple text file Java

Hi I've been asked to write code that will read a text file in the same directory as my .class file. I've written a simple program that reads "input.text" and saves it to a string. /** Import util for console input **/ import java.util.*; import…
Ed Byrne
  • 29
  • 6
-2
votes
1 answer

C Language - how do I fix my Binary Search Function in my code?

This is what I have #include #include void print(int a[], int size); void sort (int a[], int size); void swap (int* a, int *b); int search(int searchValue, int a[], int size); int main() { …