Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
1 answer
153 views

I'm trying to open a file as output so that I can write converted model data to my file. The problem currently is, even though the path does exist, and the file is created, it isn't actually open. I'...
DefinitelyNotAFreak's user avatar
Advice
2 votes
6 replies
128 views

Why does the following code throw an EOF exception during reading from the stream? The stream state is goodbit before reading. All works as expected if I do not enable exception throwing. https://...
Serge Kork's user avatar
2 votes
2 answers
119 views

I'm trying to write a small bash script that will take values from my mouse's horizontal scroll wheel to change my system's volume. Using this guide, I've come up with the following command to ...
SodaIsSoda's user avatar
Advice
1 vote
21 replies
281 views

I just wanted to ask if it's possible to read to a specific file format, say if I wanted to read from a file that has a format of something "info.uc" or "main.uc", how would I go ...
ShizamDaGeek's user avatar
3 votes
3 answers
237 views

I need to process 100 Gigabytes of logs in a weird format, then do some analysis on the results. Initial parts of parsing and CLI done, tried on some test data with 1 GB and it took around a minute. I ...
nemo nemo's user avatar
1 vote
1 answer
78 views

I am trying to implement request steering in Linux kernel’s blk-mq layer to distribute I/O requests across CPU cores based on load. My goal is to redirect requests from busy cores to less busy ones to ...
kdh's user avatar
  • 194
1 vote
1 answer
139 views

I've been trying for a few weeks now to fire a batch file that runs the command to scan a document from a scanner attached to the same machine. I'm working on a web app that (using PHP) is meant to ...
Christopher Robinson's user avatar
0 votes
2 answers
66 views

I'm trying to get the hang of the Ada.Text_IO package, and it has many differences with IO of C. One of them differences is how Get treats control characters and Horizontal or Character Tabulation ...
tymurmchyk's user avatar
0 votes
0 answers
40 views

I run the following code compiled with gfortran program blocking implicit none print *, disp_len("haha") contains function disp_len(x) character(*) :: x integer :: ...
aitzkora's user avatar
  • 339
1 vote
1 answer
103 views

So I am working with a windows IO Completion Port to implement some sort of IO event loop that keeps track of IO operations in a client/server model. I am heap allocating data for each IO operation, ...
void's user avatar
  • 13
5 votes
2 answers
220 views

In my application, I have a thread which just runs std::getline() constantly to get user input, to then send it to a server via a socket. I've made a signal handler to close the program properly when ...
PeasKeeper's user avatar
5 votes
2 answers
264 views

Hello, I’m experimenting with stdout buffering in C and trying to understand what happens when the buffer is smaller than the string being written. For example: #include <stdio.h> #include <...
Dahy Allam's user avatar
3 votes
0 answers
146 views

I’m trying to forward input from os.Stdin to a network stream in Go like this: go func() { for { if _, err := io.Copy(stream, os.Stdin); err != nil { log.Error(err) ...
Onyz's user avatar
  • 33
1 vote
1 answer
81 views

I have been having a lot of trouble reading text a line at a time from a pipe in Python and determining when the socket has been closed on the writing end. I have had the problem when communicating ...
Steve Jorgensen's user avatar
2 votes
2 answers
150 views

Well, I'm writing my own OS just for fun, and I thought it would have been cool to add a bytecode "language" interpreted by the kernel itself. I took inspiration mainly from Java, which is ...
varevind's user avatar
3 votes
0 answers
76 views

I want to create my own reader class that is derived from BufferedIOBase. I'd like to have multiple 'open' class methods with differing parameters to create class instances, like this: from ...
BoCoKeith's user avatar
  • 1,004
2 votes
2 answers
101 views

An MRE will be tricky here because this relies on (a very simple) secondary terminal executable, but I'll try my best: Windows 11, WoW64 (32-bit compatibility) executable mode c99 An MSVC-like (but ...
avigt's user avatar
  • 600
2 votes
1 answer
84 views

I'm trying to get short audio samples into my iOS app (in Kotlin Multiplatform). Here's my relatively simple setup (sampleRateInHz is defined elsewhere): val bufferSize: AVAudioFrameCount = 512u val ...
Ryan's user avatar
  • 23
0 votes
1 answer
83 views

I am trying to make a sort of input() function for a project I've been working on. The function simply reads from stdin and returns the string. Here's what I came up with: const std = @import("...
GabrieleC0's user avatar
0 votes
0 answers
92 views

My web app generates binary files (byte by byte, using Uint8Array) and I want to let users save these files to their device. I use URL.createObjectURL( Blob ), see https://jsfiddle.net/u9trmg1p var a =...
Ivan Kuckir's user avatar
  • 2,575
0 votes
1 answer
58 views

I am given a SpooledTemporaryFile through FastAPI's UploadFile. My goal is to write it to disk so I can extract it and process its contents later. This seems simple, but I am having problems saving ...
Elijah Crum's user avatar
0 votes
0 answers
76 views

I'm currently writing a printer driver in Java 1.6. I need to be able to read/write to the device file (/dev/usb/lp0) with a timeout. I'm using a wrapper around a RandomAccessFile, then use a channel ...
Gaetan L.'s user avatar
  • 685
1 vote
0 answers
82 views

I'm trying to read safetensors file in C. As a read on Huggingface's documentation, I'm taking first 8 byte of file for header size; ... uint64_t header_size = 0; int read_header_size = fread(&...
Ömer Faruk Demirel's user avatar
5 votes
3 answers
165 views

I have some software that supports UTF-8 config files. It doesn't have extensive Unicode support, just parsing files. If there is a code point that is disallowed by the format, I would like to convert ...
Jan Schultke's user avatar
  • 43.7k
0 votes
1 answer
46 views

I need to read from storage and parse > 20 JSON files (around 5-12 MB each) at the same time. I use workmanager for this because it runs in a separate Isolate, but this slows down the UI a lot and ...
proninyaroslav's user avatar
0 votes
0 answers
101 views

I'm looking to write an iterator Item = u8 to a file. The iterator has a large len so collecting the iterator and then writing the resulting vector isn't very efficient. I'm thinking of collecting ...
Pioneer_11's user avatar
  • 1,441
5 votes
3 answers
250 views

Basically, I am trying to read a file that contains first a number n of integers, then n integers in range [-10^5, 10^5]. All integers are separated by '\n'. I need to then sum all these integers, ...
DireNeedForSpeed's user avatar
3 votes
1 answer
166 views

_read() and read() 3rd argument (_MaxCharCount) is unsigned int, which limits the read to 2GB, is there a version that uses a 64 bit third argument? because there is _lseeki64 so doesnt make sense why ...
August sinyukov's user avatar
2 votes
1 answer
131 views

I want to write my own minimal operating system, and started off with a keyboard driver based on the tutorial of Frank Rosner (https://dev.to/frosnerd/writing-my-own-keyboard-driver-16kh). Since this ...
Max Herrmann's user avatar
1 vote
2 answers
95 views

I'm setting up IO for a largescale CFD code using the MPI library and the file IO is starting to eat into computation time as my problems scale. As far as I can find the "done" thing in the ...
Subject303's user avatar
3 votes
0 answers
217 views

TL;DR: Initally I thought the numpy load functions doubles memory usage at peak after some additional tests it seems like the underlying file system (StorNex [cfvs]) leads to a size-independent 2GB ...
Helmut's user avatar
  • 496
3 votes
1 answer
117 views

Console.writer().println() is displaying "Enter 3 words" after console.readLine(). Can anyone explain why? class Class3{ public static void main(String... args){ Console console =...
Libro's user avatar
  • 33
0 votes
0 answers
44 views

I have a WDL workflow that I use miniwdl to run. The second task of my workflow outputs its first command's results to the input folder by default. I was able to work around this by including '-o .' ...
Acanaceous's user avatar
0 votes
1 answer
71 views

I am trying to write my own game engine. I packaged the files such as assets of the games so that the engine can read them faster and easier. However, I encountered a problem. I could not find the ...
Koray Üstündağ's user avatar
0 votes
0 answers
48 views

I expected that without calling fclose(), and with the buffer not being full, nothing would be written to the file. But when the program finishes, the data still appears in the file. Or the C runtime ...
Dahy Allam's user avatar
2 votes
1 answer
149 views

I want to build an llm app and add a middleware to monitor token usage. The result I get from the llm provider is a sse stream. I googled and get two similar results, io.TeeReader and io.MultiWriter. ...
lxt's user avatar
  • 55
0 votes
1 answer
53 views

Why is print(line) in read_stdout printing every character instead of the entire line? I am expecting it to add to the queue once the newline character is reached, but it's just putting every ...
user740521's user avatar
  • 1,206
4 votes
2 answers
138 views

I'm learning how the POSIX read() function works in C. I understand that read() is considered unbuffered, meaning it doesn't manage any internal buffer like fread() does. But I'm confused by the ...
Dahy Allam's user avatar
0 votes
1 answer
77 views

I’m trying to understand how operating systems load a program into memory from a hardware perspective. I know that DMA (Direct Memory Access) is used for I/O operations, allowing data transfer between ...
sh1220's user avatar
  • 1
-1 votes
1 answer
117 views

await using (var streamReader = File.OpenRead(filePath)) using (var reader = new StreamReader(streamReader)) { while ((line = await reader.ReadLineAsync()) != null) { // my logic } } ...
Manan Adhvaryu's user avatar
0 votes
0 answers
48 views

I am trying to write a binary string as binary data to file but my function seems to be having a problem with the int conversion. I am reading a text file and manipulating it which gives me a string ...
user3840530's user avatar
2 votes
1 answer
101 views

I have a program where a user can write (append) to a chosen text file for storing information. Each line should be two numbers, and a date string (YYYY-MM-DD). There a multiple different text files ...
Woodenplank's user avatar
0 votes
1 answer
133 views

I am developing a secure P2P file transfer tool in C which is intended to be used for sending arbitrary-size files from between two machines running the program. I have been trying to figure out what ...
vibhav950's user avatar
0 votes
1 answer
65 views

I am working on a project in which I need to zip a Word document and then upload the file to a Blob Storage in Azure with a password on the zip file. At this point in time I have managed to get the ...
user23464334's user avatar
0 votes
2 answers
61 views

I am currently reading a json file from s3 location using the below code and then printing the data. Json File [ { "name": "A", "lastName" : "B" }, { ...
Tanya Bhandari's user avatar
0 votes
0 answers
48 views

I am developing an utility which needs to match tapped CGEvents to the USB device that originated them (a touchscreen, specifically). I got to the point where I can get the Service Registry ID from ...
MicheleDG's user avatar
  • 143
2 votes
2 answers
83 views

I’m currently learning BASIC (I use FreeBASIC) and I’m trying to open files. However, instead of opening files, my program deletes them. This is my code: Dim f as Integer f = FreeFile Open "...
Jean Dubois's user avatar
4 votes
3 answers
148 views

I'm writing a function in C++ that has to return more than one value, and I know that I can't. So I thought to pass the function two pointers to the files I want to open. This is the code and then I'...
Alessio Spinellino's user avatar
3 votes
3 answers
180 views

According to the documentation, write returns either the number of bytes written or -1 in case of an error. It's not clear whether the number of bytes written can be 0 when nbyte is positive. The ...
Michael's user avatar
  • 6,021
1 vote
0 answers
55 views

Researching strange issue with weird delays in the app took me to the line where logging is called. At that line data received from communication channel are simply dumped to the log on trace level (...
Rodion Gorkovenko's user avatar

1
2 3 4 5
354