Top "Io" questions

In computing, input/output, or I/O, refers to the communication between an information processing system (such as a computer), and the outside world, possibly a human, or another information processing system.

Fast textfile reading in c++

I am currently writing a program in c++ which includes reading lots of large text files. Each has ~400.000 lines with …

c++ performance io ifstream
Why can't I call read() twice on an open file?

For an exercise I'm doing, I'm trying to read the contents of a given file twice using the read() method. …

python io
In Clojure 1.3, How to read and write a file

I'd like to know the "recommended" way of reading and writing a file in clojure 1.3 . How to read the whole …

file clojure io
Python multiprocessing safely writing to a file

I am trying to solve a big numerical problem which involves lots of subproblems, and I'm using Python's multiprocessing module (…

python io multiprocessing mutex
Difference between `open` and `io.BytesIO` in binary streams

I'm learning about working with streams in Python and I noticed that the IO docs say the following: The easiest …

python io stream
reading v 7.3 mat file in python

I am trying to read a matlab file with the following code import scipy.io mat = scipy.io.loadmat('test.…

python matlab io mat-file
How to output a character as an integer through cout?

#include <iostream> using namespace std; int main() { char c1 = 0xab; signed char c2 = 0xcd; unsigned char c3 = 0xef; …

c++ io type-conversion iostream outputstream
Read binary file into a struct

I'm trying to read binary data using C#. I have all the information about the layout of the data in …

c# struct io binaryfiles
Guava equivalent for IOUtils.toString(InputStream)

Apache Commons IO has a nice convenience method IOUtils.toString() to read an InputStream to a String. Since I am …

java io inputstream guava
When should I ever use file.read() or file.readlines()?

I noticed that if I iterate over a file that I opened, it is much faster to iterate over it …

python io timeit