Questions tagged [buffering]
Buffering is a process of temporarily storing data while it is being moved from one place to another.
497
questions
0
votes
0
answers
58
views
How to validate flux elements that are later buffered?
I have the following code which throws error and no flux elements is "processed" so printed on the screen:
public class Test {
public static void main(String[] args) {
Flux.just(...
0
votes
1
answer
31
views
Is the user/kernel space copy in Linux read(2)/write(2) a general design in operating systems?
I have a multi-part question about Linux's read(2)/write(2) system calls:
1.Where exactly is the copy behavior, as described in the title, stated?
I've tried looking through the Linux Manual Page(2) ...
0
votes
2
answers
73
views
Load Column Names Without Pulling Data Again
Background
My Excel workbook compares two large datasets, as read from external files. Let Data_A and Data_B be those queries, loaded to my worksheets as the tables Data_A
a_1
a_2
...
a_n
...
...
.....
0
votes
1
answer
50
views
Prevent the browser from downloading too much of a video
I host some videos in a private bucket storage in Google Cloud Storage.
The duration of these videos are quite long (about an hour each) but I would like to display in loop only 3 to 4 seconds of ...
0
votes
0
answers
15
views
Video is too much buffering
I am developing a website like Udemy using Laravel, where user purchase course and watch a course with different topics. but i am facing an issue when any user watch course any topic video the video ...
-1
votes
1
answer
89
views
Black screen when im trying to make double buffered GDI overlay
Im trying to create double buffered gdi overlay over desktop but all what i get is black screen with red line
HDC hdc = GetDC(0);
HDC mem_handle = CreateCompatibleDC(hdc);
HBITMAP ...
1
vote
0
answers
55
views
Data file is full of zeros after power outage
I have a graphical (Qt, C++) application that stores its state in a data file and updates that file every 60 seconds.
I wrote a function to prevent data loss when the application or the OS is ...
0
votes
1
answer
100
views
Alpine Pipes Buffering
I'm not really sure even what is the subject, initially I was struggling with grep with a suggestion the it is a root cause yet seems it is something related to pipes buffering or something
On Alpine ...
0
votes
0
answers
21
views
Whether the Resource i get in spring controller endpoint handler is buffered or not?
I have controller endpoint in spring boot microservice which receives some data (xml), should check it with another microservice and if ok, pass it to third microservice for an answer. I'd like to do ...
0
votes
0
answers
50
views
Low Bandwidth Streaming Issues
Hi I have imx6 board connected to a 1080p, 60fps camera source.
There are gstreamer pipelines which are build to render streaming and video recording sessions from this camera source.
The Streams are ...
1
vote
1
answer
120
views
Video stops buffering
I have a 4 videos and preloader, that should hide when all the videos is fully buffeder
<div id="preload">
<h1>
Download...
</h1>
</div>
<video ...
0
votes
1
answer
40
views
working on shapefiles in ArcGIS for creating buffering on multiple shapefiles
I am working on multiple shapefiles at once and I want to shift the shapefiles in a particular direction by 15m at the same time keeping the original shapefile on place. Kindly guide me for the same.
...
1
vote
0
answers
94
views
Cache large numpy array (or other arrays) into disk to save RAM memory
I have a algorithm, where I aggregate several large numpy arrays (or other arrays, like tensorflow or pytorch) from several processes into one process. The problem is that those arrays are quite large ...
0
votes
3
answers
285
views
python buffering in sys.stdout
Minimal example:
def main():
for i in range(100):
print("One line every 2s", end = "\n")
time.sleep(2)
if __name__ == '__main__':
with open("log.out&...
0
votes
1
answer
309
views
What is the replacement of IApplicationBuilder.UseResponseBuffering starting from .net Core 2+
Since the package Microsoft.AspNetCore.Buffering has been deprecated after .net Core 1.1, what is the best practice to restore the feature provided by IApplicationBuilder.UseResponseBuffering()?
1
vote
1
answer
150
views
Large TCP kernel buffering cause application to fail on FIN
I’d like to reopen a previous issue that was incorrectly classified as a network engineering problem and after more test, I think it’s a real issue for programmers.
So, my application streams mp3 ...
0
votes
0
answers
78
views
How can I implement iterator buffering using asyncio?
Suppose I have a Python iterator like this:
def my_iterator():
data = heavy_computation()
while data:
yield data
data = heavy_computation()
def client():
it = ...
0
votes
1
answer
212
views
Message Buffering Camunda rabbitmq spring-boot
i have a setup of 3 spring-boot projects each acting as a separate participant, each project deploys one bpmn model communicating with each other in a loop based pattern.
Although, i am using a ...
0
votes
1
answer
56
views
It seems that tail is buffering though -f option is set
I am writing a script for log parsing, made up with piped tail and grep commands.
For line numbering purpose, I use a command line which looks like (simplified) :
tail file_path -f|grep -n ""...
1
vote
2
answers
2k
views
Flask not streaming JSON response
I have below flask application that should stream JSON response
Directory structure:
server -
api.py
resources -
stream.py
api.py
from flask import Flask
from ...
1
vote
0
answers
34
views
Is php output buffering necessary here?
I hope you can help this newbie. Working on understanding the php output buffering and I came across this php code in some file I'm working on:
...
...
ob_end_clean();
...
1
vote
0
answers
1k
views
PYTHONUNBUFFERED in PyCharm - no stdout
It is my understanding that if PYTHONUNBUFFERED is set to a non-empty string, no buffering of stdout is supposed to happen. I use PyCharm, and by default this value is set to 1, and I have not changed ...
3
votes
2
answers
365
views
Does the scanf empty the buffer after reading the input data (in C)?
#include <stdio.h>
#include <stdlib.h>
int main()
{
char buf[1024];
int a,b;
int i;
setbuf(stdin, buf);
scanf("%d %d", &a, &b);
for(i=0;...
0
votes
1
answer
99
views
Error: insertOne()` buffering timed out after 10000ms
I am at the very beginning of learning Mongoose, and I am having trouble saving this model to my database and keep getting an error:
insertOne()` buffering timed out after 10000ms
This is my code:
...
0
votes
1
answer
878
views
Wrapping the same `io.Reader` multiple times with a `bufio.Reader` and calling `ReadByte`: will this cause problems?
Suppose I have the following program
(error checking removed for simplification):
func F(r io.Reader) {
b := make([]byte, 1)
for ii := 0; ii < 3; ii++ {
r.Read(b)
if b[0] == ...
2
votes
1
answer
2k
views
Sending messages to Kafka unbuffered using kafkacat
I have single node Kafka instance running locally via docker-compose.
(system: Mac/Arm64, image: wurstmeister/kafka:2.13-2.6.0)
I want to use kafkacat (kcat installed via Homebrew) to instantly ...
1
vote
1
answer
632
views
What is the purpose of the ob_ functions in php? (ob_start(), ob_get_contents(), etc.)
I've read the PHP documentation, but it fails to give any practical examples.
I'm using some open source code, and it contains this email function. I'm trying to understand why these ob_XXX() ...
0
votes
1
answer
232
views
Printing out one line to screen from popen in PHP?
I'm making a batch megadownload site in PHP. I'm parsing the input, validating it, then passing it to a bash script. I'm piping the output to the web page, but the contents of the webpage show like ...
2
votes
0
answers
2k
views
Disable client reqeust body buffering in nginx
location /api/file-upload/ {
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_pass http://backend:8080/file-upload/;
}
Below warning has been encountered ...
0
votes
1
answer
334
views
Android ExoPlayer takes more time on buffering
I want to load URL from server. But ExoPlayer takes more time on buffering. There is no error while playing video.
My code is below
try {
BandwidthMeter bandwidthMeter = new ...
2
votes
0
answers
155
views
Android media player's onBufferingUpdate() always showing 100% buffered
I have a simple video player in Android (code in here) that plays a video from a URL. I'm trying to print the buffer percentages using mediaPlayer's onBufferingUpdate(). But it only prints 100, ...
0
votes
1
answer
838
views
How do you prevent any buffering, only show most recent frame with RTSP?
Are there any hints or other mechanisms with RTSP to make it only show the most recent frame, instead of buffering? I.e. if there is no smooth motion in the video but need only the most recent frames?...
0
votes
0
answers
176
views
What determines whether packer buffers stdout
I invoke packer from python Popen as
proc = Popen(['packer', 'build', '.'], stdout=PIPE, encoding='utf8')
for o in proc.stdout:
do_stuff_with(o)
Sometimes do_stuff_with gets called frequently ...
0
votes
0
answers
714
views
MongooseError: Operation `tests.findOne()` buffering timed out after 10000ms
I will be very grateful if you could help me with this issue. Although there are many similar problems, I couldn't find a solution about mine.
Everything is okay, when I'm starting the app- it is ...
0
votes
1
answer
131
views
exo_player_control_view overlaps buffering (Progress Bar)
I have a custom exo_player_control_view where in the top layout I added 80% black color.
When controls showing, buffering from white becomes darker.
How to keep the buffering totally white and don't ...
1
vote
1
answer
647
views
Sending Latest http Request when previous call finishes in Angular
I am trying to accomplish the following:
I have a request form with say 4 fields (A, B, C, D) for updating a ticket. Whenever a user exits a field (after typing something) a request should be sent to ...
2
votes
1
answer
141
views
How do you fork-then-execve without changing buffering on stdin?
I am building an application that uses either replxx or libedit to read a line from a terminal, along with tab completion. In order for replxx and libedit to work, each library puts stdio into raw ...
2
votes
1
answer
381
views
How to properly use setvbuf in C?
I would like to set my input stream as unbuffered using setvbuf() but I don't really know how to use it.
I've done some googling and found that when you set a stream to unbuffered, the buffer and size ...
0
votes
1
answer
344
views
How can I open large (2GB) files and precompute it quicker?
This is the code I am currently using to open this very large matlab file:
self.data = {}
f = h5py.File(filepath, 'r')
for k, v in f.items():
self.data[k] = np.array(v)
self.data = list(self.data....
0
votes
1
answer
166
views
Don't print the last character: print only after the next input
I have a problem, when I try to print an input, the program doesn't print the last string (in this case var_quantita).
But if I add an \n, or if I send another command from stdin, it works.
So I think ...
4
votes
2
answers
725
views
How is printf getting flushed before scanf is executed?
I have recently read a lot about standard output buffering. I'm aware that printf is buffered but so far I thought that its buffer only gets flushed when a new line is read into the buffer or fflush(...
0
votes
0
answers
241
views
How to make a simple downloader client using chunk buffering
I want to make a simple downloader that downloads parts on the server in browser and after they finish it join them together and save it through browser like what Mega.nz does
So like we have 5 chunks ...
0
votes
2
answers
759
views
Ubuntu: Pipe raw unbuffered data to TCP port
My overall goal:
I have a hardware device that streams sensor data to a Ubuntu laptop running a Python script. Data comes in chunks of 240 samples (one per line with \n) every 2 seconds and prints to ...
-2
votes
2
answers
546
views
PHP Progress Indicator
This is an old problem but there are so many conflicting answers out there that I am asking it again.
I have a PHP script which sends emails to a mailing list of about 200 people. This takes several ...
3
votes
0
answers
242
views
How to get a UDP socket to drop the oldest-queued packet rather than the new incoming packet?
Here's the scenario: I've got a real-time(ish) GUI display that shows the current state of some sensors on a server across the network, and I need the display to be as low-latency as possible, so my ...
0
votes
2
answers
2k
views
Speed up reading in a compressed bz2 file ('rb' mode)
I have a BZ2 file of more than 10GB. I'd like to read it without decompressing it into a temporary file (it would be more than 50GB).
With this method:
import bz2, time
t0 = time.time()
time.sleep(0....
0
votes
2
answers
465
views
Can't disable buffering on a cgi using nginx, fastcgi and bash
I want to make a CGI that launches a program and displays the output in the web-browser in real-time. Real-time here means as soon as a line of output is produced by the program it should be displayed ...
0
votes
2
answers
233
views
Why does a socket connection buffer so much data?
I have one program sending data with 10Hz frequency.
import socket
import time
if __name__ == '__main__':
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('127.0.0.1', 19080)...
1
vote
0
answers
104
views
Unexpected fgets behavior on modified file
Here is my code.
char a[200], b[200];
FILE* fp = fopen("a.txt", "a+");
fprintf(fp, "abc\n");
fflush(fp);
fseek(fp, 0, SEEK_SET);
fgets(a, 100, fp);
sleep(5);...
8
votes
2
answers
358
views
How do I intercept the unbuffered output of a Proc::Async in Raku?
With a snippet like
# Contents of ./run
my $p = Proc::Async.new: @*ARGS;
react {
whenever Promise.in: 5 { $p.kill }
whenever $p.stdout { say "OUT: { .chomp }" }
...