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...
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...
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, "...
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...
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...
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...
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...
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 =...
20
Solved
12
Solved
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...
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...
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,...
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...
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")...
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")
1 Next >
© 2022 - 2024 — McMap. All rights reserved.