15,270 questions
Best practices
0
votes
0
replies
4
views
Tensorflow Keras Autoencoder Masking Features not Timesteps
I have Conv1D autoencoder network, and i a have unreliable data source of a data stream, speaking i receive different event patterns at fixed interval of e.g. 2 seconds. Sometimes I have 4 different ...
2
votes
1
answer
141
views
fopen and stream_select not working after PHP 8 upgrade
I upgraded a PHP 7 application to PHP 8. The following code was working before, but no longer:
$options = [
'http' => [
'method' => 'POST',
'header' => "Content-Type: ...
0
votes
2
answers
78
views
API response is in stream. How should I convert that in dart so I can show it in the UI?
The thing is this
Response: agent-stream-start:Hello, Faseeh ur Rehman! How can I assist you today?
This is how the response is returned from the call. I am working on a flutter mobile application ...
0
votes
2
answers
142
views
Use Stream to connect to MS-Word docs in SharePoint and copy contents to local MS-Word doc
I have MS-Word Document templates that are stored in SharePoint. I need to write a sub within an Excel file to reach into SharePoint, copy the contents of the word document(s), and save to a local ...
Best practices
0
votes
1
replies
92
views
java stream api: logging inside a stream
Disclaimer: The question below was met with quite a bit of critisicm. The only reason I did not delete this question is becasue stackoverflow doesnt let me after somebody reacted on it. Also the code ...
Advice
0
votes
6
replies
131
views
Why is FileReader as efficient as BufferedReader in reading 1KB chunks of data?
I was trying to read data (chars) from a large text file (~250MB) in 1KB chunks and was very surprised that reading that file using either FileReader or BufferedReader takes exactly the same time, ...
Advice
0
votes
2
replies
61
views
why java stream api is one time use but reactor's publisher not?
why can we subscribe as may as we want from reactor publisher but just one time from java stream api?What reason is there for stream to be one time use?
Advice
0
votes
13
replies
241
views
JDK 21 What is the point of wrapping a FileReader/InputStreamReader in a BufferedReader?
Java Tutorials site shows this example when discussing character streams:
//The CopyLines example invokes BufferedReader.readLine and PrintWriter.println to do input and output one line at a time.
...
1
vote
0
answers
34
views
Node.js back-pressure documentation - what's the relevance of their example?
The Node.js Backpressure in Streams documentation begins with an example that compares the use of the zip(1) utility with a Node.js script that uses a simple stream to achieve the same result.
A good ...
-1
votes
2
answers
162
views
capture JieLi (JLDV 16) wifi Camera video stream
I bought a small 12V Wi-Fi rear camera from AliExpress. The camera appears to use an AC54 or AC51 chip from JieLi Technology.
The device openes a wifi hot spot on channel 3 and got the ip 192.168.1.1.
...
0
votes
1
answer
61
views
"Response Content-Length mismatch: too few bytes written (0 of 152295)" When copying pages from a PDF to another using iText
I'm trying to read a PDF as MemoryStream, and copy pages from that PDF to a new one.
I'm using iText PdfReader and PdfWriter.
var ms = new MemoryStream();
using PdfReader pdfReader = new ...
-1
votes
1
answer
72
views
Is there a way to resize the libVLC MediaPlayer after my Maui App resumes back to the foreground on Android?
So I am using the libVLC Package for my .Net MAUI App to Stream some Media on an Android tablet. As a guideline i was using the libVLC Maui Sample from here: https://code.videolan.org/videolan/...
2
votes
1
answer
46
views
How to send streamed response to client using Timer.periodic in dart?
I am struggling to send streamed response to the connected client. The code below is the example HttpServer used to respond to the client, the client code is also mentioned using a custom class to ...
4
votes
1
answer
139
views
How does flushing work between C and C++ streams when they are synchronized?
By default, C++ streams (cin, cout) are synchronized with C streams (stdin, stdout). This allows mixing C and C++ style I/O. I am trying to understand what this means in practice regarding flushing. ...
0
votes
2
answers
106
views
How to capture delta records in Snowflake when a table is dropped and re-created every day?
I have a pipeline that drops and re-creates several Snowflake tables every day (effectively a full refresh using CREATE OR REPLACE TABLE). I want to capture daily deltas (inserts/updates/deletes) for ...
0
votes
1
answer
147
views
Why is there no newline being presented here?
I wrote the following bit of code to read through a passed in email stream (or .eml file while I'm testing).
During the test, it's supposed to read through each line of a stream but it seems it's just ...
1
vote
2
answers
150
views
How to make a copy of stdout that does not close?
I would want to copy sys.stdout such that it will not be closed.
There is some generic code that does:
def dosomething(fd: IO[bytes], input):
with fd as f:
for buf in input:
f.write(...
3
votes
1
answer
94
views
Unable to post large file with python requests library
I try to post large file and read response as streaming with requests python library.
I have to send a large text file (2 million lines of log ) and receive response back as streaming. If I did by ...
0
votes
1
answer
145
views
How to enable HTTPS wrapper on Synology DSM 7?
I've set up Web Station on a Synology DS918+ NAS (running the latest version of DSM 7.x).
We want to use it as a local intranet server accessible only from local IPs, so we don't need external access, ...
0
votes
1
answer
124
views
why am I getting "Bad state: Stream has already been listened to."?
Before asking this question, I extensively searched stackoverflow and other platforms for similar questions. However I could not find an answer to my problem.
So, basically, I am trying to use dart ...
2
votes
2
answers
103
views
Flutter -> PCM data with bom
I ran into a bug. My Flutter app communicates with a backend that sends PCM data. Using Postman, I can save the file and play it with ffplay without any issues.
But the Flutter .pcm is corrupt.
Here ...
0
votes
0
answers
92
views
How to read Boolean value from Stream as a TextReader asynchronously?
I have this code which works but is a complete mess. Is there any more efficient way to read a Boolean value from a stream asynchronously that doesn't involve checking each character in such a manual ...
1
vote
1
answer
89
views
Using Saxon-EE, is it possible to stream the input source for a transformation
We are streaming the content of a (rather large) XML file. Before we process the content downstream, we want to transform it using Saxon.
Using the following Akka flow:
public Flow<ByteString, ...
0
votes
0
answers
92
views
Phoenix LiveView stream only shows first page of data; “Load more” inserts data but "terminates" websocket with KeyError :team_number not found
I'm still learning Phoenix LiveView and trying to make a simple paginated list of teams using stream/3. The first page loads and shows fine, but when I click a "load more" button to add more ...
0
votes
0
answers
66
views
Twilio `<Stream>` Call Disconnects After 5 Seconds – No Error, Audio Not Played
I'm using Twilio's <Stream> tag to stream audio to a WebSocket for a voice call. The WebSocket is established successfully and I receive audio chunks from Twilio just fine. However:
The call ...
0
votes
1
answer
367
views
How to safely wait for new data in a gRPC C++ server streaming reactor using the Callback API?
I've implemented a gRPC server streaming reactor using the C++ Callback API. Here's the basic idea: a separate application thread produces data every 10 ms and calls a response() method on the reactor....
0
votes
0
answers
33
views
Process Dynamodb CDC stream to convert it to a pandas dataframe
I’m using a DynamoDB stream to read data. The data contains several columns, and a few of them are expected to be of SUPER type in Redshift, as they include lists, dictionaries, or string values.
I'm ...
2
votes
1
answer
130
views
How to stream a large file on Kubernetes pod
I want to create a large file(>200GB) and store it in Min.IO store. I deploy my attempts in a web app on a Kubernetes pod.
One attempt was with a modified Redeable stream and csv-writter library ...
0
votes
1
answer
47
views
Sliding Window Assigner in Apache Flink
I am using flink to consume events from kafka and having a sliding window assigner for 1 hour window every 5 mins and then it has to write result in cassandra.
I want to understand how this works ...
3
votes
1
answer
98
views
Checking if a file descriptor is writable in PHP
I know there are already 3 standard streams: STDIN (0), STDOUT (1), and STDERR (2). I am testing the possibility of utilizing non-standard streams (> 2) in PHP.
My intention is to write to a non-...
2
votes
1
answer
77
views
What is the role of writableStrategy and readableStrategy in a TransformStream?
The Web Streams API allows configuring back pressure through queuing strategies. My understanding is that back pressure makes the producer of a stream slow down if the consumer of the stream cannot ...
2
votes
1
answer
46
views
EventSource reader keeps repeating itself
I am working with the Mistral AI API to return a stream to the frontend but the frontend keeps repeating itself so instead of just streaming the whole text on screen it just starts again when it's ...
1
vote
1
answer
73
views
Stream connection not receiving data in Xcode 16
The following code used to work perfectly in Xcode 15. (Release mode)
I was able to receive non-zero data from the stream
self.inputStream?.read(&inputbuffer, maxLength: readsize)
However, after ...
0
votes
0
answers
47
views
What is the difference between Future and Stream in Flutter, and when should I use each? [duplicate]
I'm new to Flutter and I'm a bit confused about the difference between Future and Stream.
From what I understand, a Future returns a single value in the future, and a Stream returns multiple values ...
2
votes
1
answer
160
views
What's the differences between io.TeeReader and io.MultiWriter?
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. ...
0
votes
1
answer
112
views
Flink Scheduled JDBC Source
I have the following definition of the JDBC source in Apache Flink.
val jdbcSource = JdbcSource.builder<LoggedInEvent>()
.setDBUrl("jdbc:postgresql://db:5432/postgres")
....
0
votes
0
answers
65
views
NestJS Archiver Stream Fails for Large Files (Takes Too Long & Times Out)
I'm using NestJS and the archiver package to zip files in a streaming approach. The goal is to stream the zip archive either:
Directly to Google Cloud Storage (GCS)
Or to a Buffer (local testing)
...
1
vote
0
answers
35
views
Python Reactivex and OpenAI -- Stream hangs?
Please see my code block below. In order to run it, I do the following. When I run the following code, things print as expected, and the process exits as expected.
stream = await client....
-2
votes
2
answers
135
views
Process many files in bash while simultaneously updating a progress bar
I am trying to run a function once for each file from a large list that I am piping in.
Here is some example code, here just grepping in the files whose names are coming from stdin.
In my real code I ...
0
votes
1
answer
106
views
Using Azure Speech To Text Service where I'm giving input as memory stream but getting error "NOMATCH: Speech could not be recognized"
I'm using Microsoft.CognitiveServices.Speech speech to text service where I'm giving input as MemoryStream instead of file input using a custom api. However I get the error "NOMATCH: Speech could ...
1
vote
3
answers
95
views
Python xml iterparse consumes memory
I want to process large XML file (50GB) that is archived in zip file (5GB). My idea was to process it in stream mode because of the file size.
I implemented code:
import xml.etree.ElementTree as ET
...
0
votes
0
answers
87
views
python socket streaming (yield) llm response seems to be blocking everything
I am learning llm recently and trying to build a simple chatbot, where multiple clients can connect to this chatbot and chat with the model. I created a simple python code below, but I noticed when ...
0
votes
0
answers
93
views
Create a Vertex AI Index with STREAM_UPDATE
I'm trying to create an index using the following metadata file and cli command. (All names are fake). It creates an index with a BATCH update. I need to upsert datapoints and that requires an index ...
0
votes
0
answers
19
views
How to restrict kafka stream messages consumption (to avoid external resource starvation)
I created a Kafka stream-based application that performs processing (whatever it is) on files.
The application basically receives "in real time" messages in a topic, and every message ...
0
votes
1
answer
328
views
Streaming Not Working Through NetScaler with Chunked Transfer Encoding
I'm having an issue with streaming responses through Citrix NetScaler when using chunked transfer encoding. I've set up a streaming endpoint in a Spring Boot application that works perfectly when ...
0
votes
0
answers
16
views
Stream in spring data jpa?
Does it make sense to return a Stream in the jpa method?
I'm looked at Query interface, and it just getResult and make it as stream. I can do it myself.
public interface TypedQuery<X> extends ...
0
votes
0
answers
76
views
Failed to create stage bundle factory, Pyflink and Kafka error
I'm trying the Pyflink - Kafka connection.
I'm using Python 3.11 on Pycharm, with the flink-sql-connector-kafka-3.3.0-1.20.jar and apache-flink 1.20. I'm running Kafka on Docker, and I've tested the ...
2
votes
1
answer
86
views
How to improve web camera streaming latency to v4l2loopback device with ffmpeg?
I'm trying to stream my iPhone camera to my PC on LAN.
What I've done:
HTTP server with html page and streaming script:
I use WebSockets here and maybe WebRTC is better choice but it seems like ...
0
votes
0
answers
59
views
Java stream row not getting cleared from heap space
OutOfMemoryError while streaming 20M+ rows in Spring Boot with Hibernate
Issue
I’m streaming 20M+ rows from my Content table using a Stream<Object[]> in Spring Boot with Hibernate. However, I ...
0
votes
0
answers
78
views
File Downloads on iOS Firefox Show "Unknown" Filename and Incorrect File Size
I'm working on a file download feature in my Node.js + Express backend and React frontend. The download works fine on most browsers, but I’m experiencing the following issues only on iOS Firefox:
The ...