io Questions

2

Solved

I am looking for some tool that will dump total disk I/O by a single process after it ends. So far my finding is :- iotop= It shows i/o per process in real time but does not give total after proc...
Roswell asked 12/7, 2014 at 15:35

3

Solved

"what exactly the python's file.flush() is doing?" says you should first f.flush() and then os.fsync(f.fileno()) to make sure the data are written to the disk. Furthermore, "does clo...
Impermanent asked 16/10, 2019 at 1:21

5

Solved

Is there anyway to write the following code in Ruby without writing the file to disk? temp_file = 'path/to/file.csv' users = [[email protected], [email protected]] CSV.open(temp_file, "...
Briannebriano asked 23/1, 2013 at 20:27

3

Solved

In java, InputStream class has methods read(byte[], int, int) and readNBytes(byte[], int, int). It seems that these two methods have exactly the same functionality, so I wonder what are the differe...
Kubiak asked 13/12, 2018 at 2:52

1

I have a server-side application that runs through a large number of image URLs and uploads the images from these URLs to S3. The files are served over HTTP. I download them using InputStream I get...
Outpost asked 13/2, 2019 at 18:3

6

Solved

I'm looking for magical Java class that will allow me to do something like this: ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); FileOutputStream fileStream = new FileOutputStream(...
Alpheus asked 2/11, 2011 at 21:13

11

Solved

I am looking for an operation to move and overwrite a File. I know that there is a new Method in Java7, but I was hoping to get around Java7. Also I know about the Methods in FileUtils and Guava, b...
Fabozzi asked 18/1, 2013 at 13:32

2

Solved

Can someone explain to me precisely the difference between a file descriptor and a file handle (separate from Windows' definition for the term; I'm curious about their definition, but that would re...
Iroquois asked 5/11, 2015 at 3:17

5

Solved

I want to write 2TB data into one file, in the future it might be a petabyte. The data is composed of all '1'. For example, 2TB data consisting of "1111111111111......11111" (each byte is represen...
Godly asked 8/8, 2012 at 20:46

14

I am trying to save a dataframe and a matrix as .npy files with np.save() and then read them using np.load() but I get the following error: File "/Users/sofiafarina/opt/anaconda3/lib/python3.7/si...
Gardiner asked 12/2, 2020 at 15:25

3

Solved

I have a text file of size 100-200 GB. So I wish to store in a compressed format (such as zip). However, I need to process it one line at a time due to its size. Though it is straightforward to rea...
Hateful asked 24/5, 2021 at 21:9

6

Solved

I'm wondering if there is any idiomatic way to chain multiple InputStreams into one continual InputStream in Java (or Scala). What I need it for is to parse flat files that I load over the network ...
Scalf asked 12/1, 2013 at 16:2

7

Solved

I have something like this: Scanner in=new Scanner(System.in); int rounds = 0; while (rounds < 1 || rounds > 3) { System.out.print("How many rounds? "); if (in.hasNextInt()) { rounds =...
Caridadcarie asked 15/5, 2012 at 15:36

20

Solved

Is there a default/official/recommended way to parse CSV files in C#? I don't want to roll my own parser. Also, I've seen instances of people using ODBC/OLE DB to read CSV via the Text driver, and...
Attitudinize asked 17/1, 2010 at 15:21

12

Solved

In bash, calling foo would display any output from that command on the stdout. Calling foo > output would redirect any output from that command to the file specified (in this case 'output'). I...
Vermeil asked 7/1, 2009 at 1:45

2

Solved

I want to write a program so that it takes two sets of integer input from terminal and computes two sums. My intention is to separate the two sets of input by EOF (pressing Ctrl+D). Here is my code...
Abad asked 28/12, 2013 at 13:53

2

Solved

So I created a data file like so: for(size_t n = ...;...;...){ //do some stuff double mean_value = ... double min_value = ... double max_value = ... FILE *fp = fopen(OUTPUT_FILE,"a+"); fpri...
Clomp asked 9/3, 2016 at 19:32

13

Solved

I'm writing a console program in C++ to download a large file. I know the file size, and I start a work thread to download it. I want to show a progress indicator to make it look cooler. How can I ...
Emulation asked 26/1, 2013 at 18:2

7

Solved

This is a pretty simple question: as a Git newbie I was wondering if there's a way for me to output my git log to a file, preferably in some kind of serialized format like XML, JSON, or YAML. Any s...
Steeplebush asked 5/1, 2011 at 2:56

6

So this is my first time that I'm attempting to read from an Excel file and I'm trying to do so with the openpyxl module. My aim is to collate a dictionary with a nested list as its value. However,...
Jessiejessika asked 29/12, 2018 at 0:7

2

Solved

I absolutely new to Kotlin and seems I just can not get the append-to-file procedure. I have filename given by val path: String = ".....txt" I want a method in my class that takes line: String and...
Intolerance asked 19/11, 2018 at 22:22

3

I'm trying to update the file modification metadata of a file. I can access the Metadata: use std::fs; fn main() -> std::io::Result<()> { let metadata = fs::metadata("foo.txt")...
Challis asked 20/3, 2022 at 19:18

66

Solved

If you have a java.io.InputStream object, how should you process that object and produce a String? Suppose I have an InputStream that contains text data, and I want to convert it to a String, so f...
Atkins asked 21/11, 2008 at 16:47

3

Solved

Is there a standard way to get the extension of a File in Kotlin? File("a/b/file.txt")
Insertion asked 18/12, 2017 at 15:41

9

Solved

Possible Duplicate: How do I measure how long a function is running? I have an I/O time-taking method which copies data from a location to another. What's the best and most real way of calc...
Kinfolk asked 24/12, 2012 at 9:30

© 2022 - 2024 — McMap. All rights reserved.