Category "io"

What is the benefit of calling ioread functions when using memory mapped IO

To use memory mapped I/O, we need to first call request_mem_region. struct resource *request_mem_region( unsigned long start, u

Write a function to take a text file and print the number of lines, words, and characters in the file

I am currently struggling with a question related to Python File I/O. The question I that I fail to be able to complete is this: Write a function stats() that

Can we use two buffered writers to write on the same file with java, in the same class?

I have been wondering if I cam use two bufferedWriters to write an external file with java. This is what I did: But there is only written X in my created file

How do you pass a generated PDF to an API as an IO stream without writing it to disk?

I am using PyPDF2 to generate a PDF, and I would like to upload this PDF to Cloudinary, which accepts images as IO objects. The example from their docs: cloudin

How to write the contents of a Scala stream to a file?

I have a Scala stream of bytes that I'd like to write to a file. The stream has too much data to buffer all of it memory. As a first attempt, I created an Inp

How do I remove EOF in cin buffer?

I'm using an example to show what I mean: On my Mac, to leave the first "while loop", the user has to type "CTRL+D". From what I understand, that is achieved by

Protecting a file by a password [closed]

I have a C# application in which i'd like to create a file : string fileName = "test.txt"; // a sample file name // Delete the fi

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.mat') and it gives me the following error raise NotIm

PostgreSQL Exception: "An I/O error occured while sending to the backend"

I am testing some code which processes registration to a website. The java code is as follows (excerpt): if (request.getParameter("method").equals("checkEmail"

Print 'std err' value from statsmodels OLS results

(Sorry to ask but http://statsmodels.sourceforge.net/ is currently down and I can't access the docs) I'm doing a linear regression using statsmodels, basically

Duplicate IO with file descriptors

I would like to route a file descriptor to multiple places at the same time. For instance I would like every command in my script to print stdout to /dev/ps/9

Problem with EOF when determining stream end

When I try to determine end of file with function feof(FILE *), I find it does not work as I expected: an extra read is required even if the stream does end. E.

Is there any method to abort cin or scanf

I have a multithreaded program in which on thread waits for input through a terminal and the other will get data from the socket. Is there any way to abort firs

How to queue a completion port action (I/O bound function) to CLR ThreadPool

I have an external library that does long running I/O. I wish to create a multithreaded application that will use ThreadPool to limit simultaneous number of thr

What to import to use IOUtils.toString()?

I am trying to use IOUtils.toString() to read from a file. However, I am getting an error saying "IOUtils cannot be resolved." What am I supposed to be importi