Category "io"

Can I send/receive Java objects to RabbitMQ using Java built-in IO classes instead of Spring AMQP?

I need to send/receive Java POJOs to/from RabbitMQ. There is a ready solution with Spring AMQP, but I've managed to do it with built-in java.io.* (serialize POJ

problems with """input().split() in loop""" in python

n, m, k, r = tuple([int(i) for i in input().split()]) roads = [] for road in range(m): t = tuple(list(map(int, input().split()))) roads.append(t) pri

IO backend error in the xarray for netcdf file

I am trying to open a .netcdf file using xarray and it is showing this error. I am unable to resolve this error and I have found no such solution to resolve thi

Arduino: getting filenames using SdFat

I have used SdFat before, but it seems to have changed and I can't find documentation that I understand, and fewer examples... I have an Arduino project in whic

Scanner is skipping nextLine() after using next() or nextFoo()?

I am using the Scanner methods nextInt() and nextLine() for reading input. It looks like this: System.out.println("Enter numerical value"); int option; o

CPP program background waiting for jobs

I want to split up the following workflow of a C++ program: Read serialized data (1 sec, which is already very fast for that size) Search data (0.01 ms) Return

How do I make the code which execute the python file (not itself) with input redirection?

I want to make call.py which execute main.py with input redirection of input.txt. In addition to that,I don't want to change the code of main.py. What I want

cats-effect:How to transform Map[x,IO[y]] to IO[Map[x,y]]

I have a map of string to IO like this Map[String, IO[String]], I want to transform it into IO[Map[String, String]]. How to do it?

Download a captcha image without an extension

How I can download this captcha image with PIL or another image manipulation library, I tried several ways but I can't download the image. from PIL import Imag

Passing allocatable array into a subroutine

I am working on a f90 code that I didn't write. I am not a very experienced fortran user. There is a part that bothers me a bit and I am not sure if it is a nor

How to read/write a file in Java

I would like to replace some items in a file, based on some regular expressions. In order to do that: I read the file line per line For every line, I check for

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"