Questions tagged [readfile]

ReadFile() is a Windows API function to read data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.

2383 questions
0
votes
0 answers

Quickest Way to Import Matrix

Currently, I am reading a 10,000 x 10,000 txt matrix (seperated by spaces) into a python program using the sys.argv method. It seems to take too long. What is the most efficient way to read the matrix into the program?
reddy
  • 1
  • 3
0
votes
3 answers

Read from file give me extra new line character c++

I try to read char by char from a file, however, it always give me one or even more new line character("\n") in the end. The follow is my code: ifstream file; file.open(inputfile, ios::binary); char c; if(file.is_open()){ while (!file.eof()) { …
Huaxin Zhang
  • 53
  • 1
  • 8
0
votes
1 answer

Read a csv two-columned file and store it in 2D array JavaScript

I would know how to read a two columned .csv file (it is in .txt format) without header like this: 52,10 53,23 66,45 ..,.. 34,67 and store the first and the second value of each line respectively into an 2D array var coords =…
user9322960
  • 135
  • 8
0
votes
1 answer

ReadFile function lpbuffer and bytes to read clarifcation

I'm pretty new to this so any clarification would be appreciated. When using the function ReadFile, how does the type of the lpBuffer interact with the parameter of "number of bytes to read"? For instance what if you had an unsigned short MyShort[5]…
TMa
  • 61
  • 5
0
votes
1 answer

Python read file by line separate by tab then insert into tkinter treeview

I am attempting to create a treeview in tkinter that is populated with data from a txt file. This file has a few lines and on each line there is an article title, a single tab, and then an article number matching the title. I am attempting to read…
0
votes
2 answers

Java-Reading and Writing to Files-File not Found

So I am working on this game where I have a high score stored in a text file. I am following the newboston's tutorial on how to read and write to file. Right now I am testing whether the read class works and it is not working. It says cannot find…
Bob G.
  • 143
  • 3
  • 14
0
votes
0 answers

Nodejs reading file does not work

So I have following code: console.log('beforereadfile'); fs.readFile(path.join(__static, '/client_secret.json'), 'utf8', function (err, data) { if (err) { console.log('Error loading client secret file: ' + err); …
Tomek
  • 386
  • 1
  • 4
  • 11
0
votes
0 answers

How to refer to a file for fs.readfile

I have a node.js application that uses a static csv file that i build some values from. My project structure is as follows: /-- /-- -- sampledata.csv /-- -- /-- -- -- server.js the way i refer to this file through server.js…
Strahinja Ajvaz
  • 2,521
  • 5
  • 23
  • 38
0
votes
1 answer

pascal file read loop always read extra line in the end

I'm learning about using pascal to read integers from text file. The program should read and print 10 integers, but the it actually printed 11 values which it printed extra 0 in the end. I used to meet the same problem when I writing c++ program,…
wwwwpkpkpk
  • 43
  • 2
0
votes
3 answers

Python reading file without file format software

I've written a code in python that opens and reads a file that is saved as an .hdf5 format. If I don't have an hdf viewer installed on my computer can this code still run? I'm not using it to open the file so I can look at it, I'm trying read the…
Claire H
  • 3
  • 2
0
votes
0 answers

how to check where exist the requested word in txt file using PHP

i have a php code that read text files and allow the user to make a search then it display the result in an html table that contains filename and line number each file can handle multiple lines. all txt files composed of 10 categories where each…
Ghgh Lhlh
  • 155
  • 1
  • 3
  • 14
0
votes
0 answers

how to read multiples MS publisher files

i have a PHP code that read multiple TXT files and allow the user to make a search wher he enter a string and the system read all files and display the result in a table where it contains the filename and line number. screenshot: what i need…
Ghgh Lhlh
  • 155
  • 1
  • 3
  • 14
0
votes
0 answers

ReadFile Overlapped access - Error 170 (resource is in use)

my goal: I`m writing an application which writes a file to the serial port 128 bytes at a time (137 total, with ModBUS header and CRC) and waits for the reply. The writing I have managed to implement successfully. After sending a 137 byte packet I…
0
votes
0 answers

read a file with two separator in r

I have a problem in reading a file that has this kind of format: 1::122::5::838985046 1::185::5::838983525 1::231::5::838983392 1::292::5::838983421 1::316::5::838983392 but I cant set two separator and separate columns of data can anyone halp me…
0
votes
2 answers

using php how to read multiple TEXT files and display the file name?

I have a PHP code that read text file and allow the user to make a search on a word and its work perfectly. the files content is in arabic Where the user make a search and the system will display the requested string with the line number where it…
Rany Fahed
  • 39
  • 3
  • 11