Questions tagged [stream]
DO NOT USE FOR THE JAVA STREAM API INTRODUCED IN JAVA 8 (use [java-stream] for those questions!) A stream is a series of data elements which can be accessed in a serial fashion.
15,780
questions
0
votes
0
answers
9
views
Humminbird echosounder multicast stream data to listen c#
Good day firends
I am trying to write app for my echosounder humminbird helix 9 to live receive data from it.
I have connected it by router and using wire shark i found that it streams data ...
0
votes
0
answers
26
views
Implement a minimum flush size for io.BufferedWriter in Python
I'm extending the BufferedWriter class from the io module and so far it looks something like this:
class MyBufferedWriter(io.BufferedWriter):
@classmethod
def open(cls, config, buffer_size=...
0
votes
1
answer
24
views
PHP SSL "older" stream sockets close unexpectedly
I am developping a SSL websocket server, PHP 8.2.
I can accept SSL conections with no problem.
Issue is:
Connection A, then B then C then D are accepted.
When conection C closes (clients make the ...
0
votes
0
answers
16
views
Java 8 group List of Lines so adjecent lines are together
I have a list of lines where line is represented by two points.
Eg
public class Line {
String start;
String end
}
The list looks like [P1, P2], [P2, P3], [P10, P11], [P11, P12], [P12, P13] ...
0
votes
0
answers
5
views
Twitch Chat Style: Separator Lines
I know that what I'm about to ask may not be directly related to the specific platform I've used before, but since you've been a great help on multiple occasions, I was hoping you could assist me this ...
0
votes
1
answer
21
views
Flutter Bloc: Ui doesn't update with data emitted from Stream
In my app I added a stream that listens to changes on a document ( the document contains some String fields and List<String> arrays )
Bloc code:
void _onPageHomeGetUserData(
...
1
vote
0
answers
27
views
Does new instance of stream passed to a method automatically get disposed? [duplicate]
Assume we have the following class
public class TestProsessor
{
public void Process(Stream stream)
{
// do not dispose stream.
}
}
Then it is called like this
public void Main()
{...
-1
votes
0
answers
35
views
How to support streaming on sites using PyQt5? [closed]
I'm making my browser using PyQt5. I’m asking myself: how can I make it so that I can watch video streams on websites? I tried through vlc, but there I need to download something else, because there ...
0
votes
0
answers
21
views
VLC cache and stream buffer freeze
I am using VLC to stream video footage from a video camera over an http network. I then have a second application that reads the video frames from the stream that VLC outputs. I notice that ...
0
votes
0
answers
5
views
In TDengine, is stream computing only possible when the number of replicas is 1?
In TDengine, stream computing is only possible when the number of replicas is 1. Does this mean that this feature cannot be used in a cluster situation where the number of replicas is greater than 1?
0
votes
0
answers
14
views
papparse how do I manage errors and retrieve meta information while pipeling?
I am parsing a CSV file using papparse streaming feature
import fs from 'node:fs'
import papa from "papaparse"
const reader = fs.createReadStream(csvPath)
.pipe(something)...
0
votes
0
answers
39
views
Transcode webcam blob to RTMP using ffmpeg.wasm
I'm trying transcode webcam blob data to a rtmp server from browser by using ffmpeg.wasm .
first, i create a MediaStream.
const stream = await navigator.mediaDevices.getUserMedia({
...
0
votes
1
answer
45
views
Java Stream limit vs Standard for loop performance
In a case I need n elements from a collection with a certain filter.
In a standard for loop, I can break if a reached n elements without going throufh the rest of elements
Collection limitConcition = ...
0
votes
1
answer
44
views
Can I make my code cleaner using Streams in Java 8 [duplicate]
I have a list of Merchant objects with (Merchant Code, purchase ref, ...etc).
It would look something like:
1, purchase abc, description
1, purchase cde, descr 2
2, purachase fed, desc 4
3, purchase ...
-1
votes
2
answers
42
views
React setState and streaming response
How do I deal with a streamed response ?
using the function approach of setState with functions doesn't seem to work:
the hooks are not executed in the correct order and the response is unordered
...
0
votes
0
answers
21
views
How to stream more than 4GB zip files while generating the zip file in python
I have n number of audio files in s3. If I make a django api request, it should get all the audio files from s3 and generate a zip file and download it as zip file. While generating the zip file, it ...
0
votes
0
answers
37
views
How can I take the difference of two overlapping byte streams in Python?
I have an audio stream coming in from an API call which generated text-to-speech; I am currently generating overlapping chunks of consecutive texts and want to only write the difference between a ...
0
votes
0
answers
68
views
Encrypt/Decrypt model files
I have a trained pytorch model that I export using torch.jit.trace(model,input). It saves as a model.pt file. I am able to load the model in c++ (libtorch) using jit::load(). I want to encrypt the ...
1
vote
0
answers
21
views
stream.PipeTo() finishes node process
I've been learning about WebStreams. I wrote a simple code that uses ReadableStream and WriteableStream.
But when I want to show a message on console after stream.pipeTo(), it doesn't works. What's ...
0
votes
0
answers
44
views
Node JS: Read from Stream then compress and create a compressed file using writable stream using fflate
I have been trying to use the fflate library to compress a json file with streaming.But when i try to use fflate it is not working. couldnt find good examples of the the usage.This is sample snippet ...
1
vote
1
answer
32
views
How can I effectively split text coming from a stream where the output is not necessarily new words but might be letters
so I have a stream of text which comes in where the next item coming in is the all the previously generated text + some additional text which may either be a new word, letter, or part of a word. I'm ...
0
votes
1
answer
30
views
How to stream audio to the caller?
How can I send a stream of audio back to the caller?
I have a ReadableStream of bytes that correspond to audio data. I am retrieving this from my server on the fly.
I'd like to play this stream of ...
0
votes
0
answers
37
views
Return a use case response with a stream and a final result
In dart/flutter, i try to determine a users GPS position once. Since a one-time query for a GPS position might be very inaccurate (accuracy ranges from 3 to 100m sometimes), i try to "listen"...
0
votes
2
answers
46
views
How to stream mp3 to S3 and retrieve URL immediately?
How can I write a stream to S3 and immediately retrieve a link to read the content back?
I'd like to upload my mp3 file to S3, get the URL to the resource, and send it to the user.
Since the upload ...
2
votes
0
answers
38
views
Can I rightfully name my opened file a stream if at some point I move its file-pointer backward?
Quoting from https://learn.microsoft.com/en-us/cpp/c-runtime-library/files-and-streams?view=msvc-170
Before you can perform many of the operations on a file, the file must be opened. Opening a file ...
-2
votes
3
answers
103
views
Time complexity of adding elements to collection vs using stream in java
I was asked this question in an interview to count the number 1 and 0 in a binary array
eg: arr = 1, 1, 0, 1, 0, 1, 0, 0, 0. We should not use Array.sort or Collections.sort function.
I could think ...
-1
votes
1
answer
98
views
C++ std::istringstream how to not terminate at '\0' [closed]
There is a function Foo that takes in an input stream of char. I want to call Foo from my function Bar, which takes in a C-style array with size. char is used to represent a byte (not using std::byte ...
0
votes
0
answers
37
views
Issues with Input Stream in Java during testing
I'm testing my program against a test database, and to conduct these tests, I need to input data, which I do using System.setIn. However, only the first test runs correctly; all subsequent tests fail ...
0
votes
0
answers
36
views
Selective stream.read()s vs one long stream.read()
I am building a composite image from thousands of individual frames that I register and then place. The individual frames are about 6400x4800 pixels, but ultimately only contribute about 200x500 ...
0
votes
2
answers
77
views
Java stream an array list and compare with previous record
I have a simple RecordA class that holds an id and an int value. Multiple "sorted" RecordA elements are stored in a list.
I want to traverse the list and compare the current with the ...
0
votes
0
answers
21
views
How to stream a video on a node.js server to a video element on the browser
l am using streams in node createReadStream(pathToVideoFile).pipe(res), l then create a video blob on the client side from the res.data string from the server followed by URL.createObjectURL(videoFile)...
0
votes
0
answers
20
views
How to filter a list with same date value using java streams
I would like to filter a list of T class objects having which is having date fields using java 8 stream.The date is of type LocalDateTime , i want to compare the dates. If there are two records with ...
0
votes
1
answer
53
views
Value of list changing inside for loop while using stream
Set<String> l = locMap.keySet();
for (Map.Entry<String, String> ven : venderAndFactoryLocMap.entrySet()) {
if (ven.getValue().equals(VENDOR)) {
Map<String, String> x1 = l....
1
vote
1
answer
56
views
Receiving URL request with incomplete data error
I am making a simple ChatGPT app in Swift that requests data from the API in a stream. The API returns the correct data but when I receive it, words and characters are missing. I tried debugging but I'...
0
votes
0
answers
18
views
For Web App is there a better way to pull an image from the camera?
I want to pull images from the camera, change/filter them with custom code, and display them in the browser in real time. I'd like to know the best way to retrieve the image from the camera stream so ...
0
votes
1
answer
38
views
How Could Disconnect From Local JSON File?
I need to download every 10 minute a JSON file in to my project. (Older file delete and new file replace it)
and between delete and replace last process read data from data with newtonsoft.json ...
-1
votes
0
answers
16
views
How to read a web stream in MS Access with VBA code?
I comunicate with an IP ANPR camera which webserver send a continuous web stream ws://192.168.10.147:7681 containig alarm state data containing vehicle plate number that camera recognized. I nead to ...
0
votes
3
answers
55
views
How to add All the elements of an integer array in a StringBuilder using stream adding extra space to each of the element
I am trying to add all the elements of an int array brr into a StringBuilder res using the following code.
I tried the following way
StringBuilder res = new StringBuilder();
Arrays.stream(brr)....
0
votes
0
answers
11
views
Cannot stream live data from websocket fyers
I'm currently working on a project that involves real-time data analysis, and I've successfully subscribed but cannot stream the data.
while (true)
{
byte[] buffer = new byte[1024];
...
0
votes
0
answers
11
views
how do I paginate streaming mssql nodejs queries?
Using the nodejs mssql package I have streaming queries working inside a promise, but I'm trying to figure out how to clean everything up and allow me to generically emit rows when a method is called. ...
-1
votes
0
answers
38
views
How can I convert a text stream coming in from a request to an IOBytes object?
I am using an API where I send and receive requests which come in as streams (I'm hosting an LLM which streams text output) using this chunk of code:
def get_streaming_response(response: requests....
-2
votes
2
answers
57
views
Fetching Data from DB using streams
Recently, I was asked how to retrieve data from a database without using SQL queries. They suggested using streams to accomplish this, and I'd like someone to explain how this can be done.
I initially ...
0
votes
1
answer
45
views
Record and download the video of a client using their stream or canvas
I'm trying to record and download the live video of a client using canvas or their stream
Code below:
const mediaSource = new MediaSource();
mediaSource.addEventListener('sourceopen', handleSourceOpen,...
0
votes
0
answers
26
views
Parsing items using JSON Stream
I am quite new to the concept of streams in Node js. I am using the JSONStream package in node to parse an api response. The response is an array of javascript objects and is being streamed from the ...
0
votes
0
answers
41
views
How to create a Stream out of IObservable<byte>?
I've been thinking how to create a bridge between IObservable<byte> and Stream, but I'm completely lost.
The use case for this is when a function needs you to provide a Stream, but you have your ...
0
votes
1
answer
52
views
Unable to stream openAI response from a fastify server
I am banging my head against the wall with something which should be so very simple! Just to call the openAI API and return the stream from the fastify server.
I have seen the docs and streams are ...
0
votes
0
answers
28
views
Quarkus returning a Multi<> as Rest response
I have a question regarding Quarkus and Rest Responses. I'm not that experienced with micro services.
I have an Quarkus backend, which is handling different types of rest requests. Uploading a file, ...
0
votes
1
answer
30
views
Helidon: GraphQL with Stream and Defer annotation
I am working on a graphql API using Helidon MP and looking to confirm that directives @ stream and @defer supportable?
GraphQL documentation link for reference: https://graphql.org/blog/2020-12-08-...
0
votes
2
answers
58
views
Is any blocking Read method available for Stream?
I am writing an application in C# to open a terminal to a Docker container remotely via a web application. I need to read the stream returned by the Docker.NET client and forward the read bytes via a ...
-1
votes
1
answer
51
views
Handling streamed HTTP ressponses
I have the following example that connects to an HTTP service which streams responses back in a stream of chunks to create a JSON structure. For each chunk my code appends a byte rb array with the ...