Questions tagged [buffer]

A buffer is an area of memory set aside for temporary storage of data while it is being moved from one place to another. This is typically done to speed up processes with significant latency, such as writing to a disk, printer or other physical device. The output is ready to be sent to the device before the device is ready to accept it, so it is moved to the buffer so that the sending program does not have to continue waiting.

Filter by
Sorted by
Tagged with
2 votes
1 answer
88 views

Mysterious (I think) buffer over run in C

Sorry if this is a duplicate post. I am currently having an issue where I am getting a warning on this piece of code saying C6386: Buffer overrun while writing to 'titleTextPointer' but I'm fairly ...
osbourne clark's user avatar
0 votes
0 answers
13 views

UDP connection with iPerf3

My question is the following: I'm doing some tests between 1 Access Point (AP) and 1 Client, so the connection is over wifi 2.4GHz 802.11 g. At client side i have 2 PCs like at the AP side. I have a ...
Massimo's user avatar
0 votes
0 answers
20 views

Handling color in a image buffer

Many years ago, I wrote a Swift application on macOS that draws the Mandelbrot Set. Some days ago, I decided to rewrite that app and improve it after all this time (I’m not a Swift programmer and I ...
Maqrol's user avatar
  • 11
0 votes
0 answers
20 views

Convert PDFs to text via tesseract.js in memory

I wanted to grab all of the text from a PDF via tesseract.js and did so fairly easily. "use strict"; const fs = require("fs"); const { fromPath } = require("pdf2pic"); ...
chriscrutt's user avatar
-1 votes
1 answer
14 views

formidable, formData received and parsed, UPLOADS a file of 0 bytes to S3 Bucket

I may need some help here. After receiving this file from the client using the code below and I send it to S3, the file uploaded has 0 bytes. I read a few people and methods using Buffer and ...
airbender's user avatar
-1 votes
0 answers
44 views

Clean the buffer in C inside a function [closed]

I have this program but when performing consecutive conversions without closing the program, the previous value is added to the left and I don't know how to clear the buffer. #include <stdio.h> #...
Alejandro Caro's user avatar
-1 votes
0 answers
32 views

How the way did vim copy into buffer?

I'm a new user vim. I overcome a :q! quite vim problem. So i got a new problem about copy and paste. Recently, I know about buffer concept. And I'm wondering when I copied something it was saved in ...
Giang Nguyễn Tuấn's user avatar
-2 votes
0 answers
17 views

Upload Buffer in three.js nextjs [closed]

I need to load a buffer from a .glb file in nextjs with three.js, how would I do it? this buffer Object data : (2635952) [103, 108, 84, 70, 2, 0, 0, 0, 176, 56, 40, 0, 196, 20, 0, 0, 74, 83, 79, 78, ...
el programador SKRT's user avatar
1 vote
0 answers
26 views

C# ShortBuffer implementation does not work right

I am porting some code from java to C# (and no, I don't use Android, code just came from android library), which makes heavy use of Java.nio Buffers (ByteBuffer as well as ShortBuffer) (especialy ...
LimetaPeta's user avatar
0 votes
1 answer
41 views

OpenGL causing issues when opening window

My code is not opening the window properly its just showing me blank page #include <iostream> #define GLEW_STATIC #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm....
yassir alrawi's user avatar
0 votes
1 answer
51 views

Is there a way to Optimizing Linear Memory Model in WebAssembly for Improved Memory Management?

We've been exploring challenges the flat memory model in WebAssembly, as highlighted in Empowering Web Applications with WebAssembly: Are We There Yet?: https://weihang-wang.github.io/papers/wasm-...
Faizal Abdul Hakim's user avatar
1 vote
0 answers
39 views

How to display the DataFrame information in your Streamlit app instead of printing it to the console

*# I'm attempting to display the output of df.info() within a Streamlit application, but the app consistently displays 'None'. * I've tried modifying the default buffer and capturing the output, but ...
Rahma Naeirat 's user avatar
0 votes
1 answer
43 views

C Program Pauses After Reading First Input

I'm working on a C program intended to remove blank lines between text from a .txt file. The program asks the user for the names of the source and destination files. However, I'm encountering an issue ...
Luke Auslender's user avatar
0 votes
0 answers
7 views

Should I use the CString::ReleaseBuffer() if I don't change the string size

I have CString and I want to change some chars in buffer (I want to replace national chars (eg. á to a). I change (in "for" loop) single charakters, but don't change string length. Do I need ...
Michal Hadraba's user avatar
0 votes
0 answers
16 views

Writing to stdout and stderr will mix together

I am implementing a console logger, and I am using setvbuf() to let the stdout and stderr work in _IONBF mode, so that every time I use fwrite(), the content should be immediately flushed to the ...
benrush's user avatar
  • 45
0 votes
0 answers
13 views

Sourcebuffer.appendBuffer throws InvalidState exception on iOS

I am trying to visualize in an HTML5 video element a stream of frames I receive from a server. I have implemented it using a sourceBuffer according to this The streaming works perfectly on Desktop (...
scream03's user avatar
-1 votes
0 answers
37 views

why my output clk signal coming from input differntial buffer not toggling or it showing x?

I am trying to implement a design where i am using IBUFDS and BUFG as clock buffer from language templates of vivado tool. my top module port contains two input clocking resources clk_n,clk_p now when ...
superb ranjeet's user avatar
0 votes
1 answer
109 views

How can I write coloured ASCII characters directly to the console's buffer?

I am a student that has become quite interested in the C++ language and I am currently working on a little project involving printing large number of coloured ASCII characters on the Windows Terminal ...
Matt Moissat's user avatar
0 votes
0 answers
12 views

SheetJS: write method returns blank sheets when sending data to FormStack

I am making a API call to FormStack which has a xlsx template I am using to pass some data to. The idea is I am sending different data to this template, and each time I do that operation, that data ...
Antonio Pavicevac-Ortiz's user avatar
1 vote
2 answers
59 views

Probable unrecognized buffer overflow

i'm working on a function which executes a specific powershell command and then returns the output if this is different from EOF. The function correctly executes the first time, but the second time ...
Alessandro Argentini's user avatar
0 votes
0 answers
56 views

Optimizing image buffer in C++

I have 3 (their names are right, left, and back) cameras whose frames I synchronized. However, the performance of the code is not that good and I wanted to get some advice on how to optimize my code. ...
jlee's user avatar
  • 1
0 votes
0 answers
25 views

Android - buffer and selectively save 30s of video

I want an app that'll take 30s of buffered video, but only save the buffer to a file when I press the shutter button. The application is for me to use it when I'm playing volleyball; when I make a big ...
ttshaw1's user avatar
  • 59
0 votes
0 answers
37 views

Best practice to operate on large and many buffers in OpenCl?

I would like to know what options would there be to process multiple large buffers using an OpenCL kernel considering the memory limit of the device. To put the problem into perspective imagine that ...
Paunescu Daniel's user avatar
0 votes
0 answers
9 views

How can I lock memory when creating a device in Directx9?

I cannot use the D3DPRESENTFLAG_LOCKABLE_BACKBUFFER locking flag while enabling multisampling when creating the device in Directx9. What path should I follow instead? I would like to point out that I ...
cvaqabond's user avatar
0 votes
1 answer
66 views

Do I need to account for host machine's endianness when writing to my Buffer class?

I'm writing a Buffer class which simply holds bytes in C++. It's got the usual read and write methods for various types; 16, 32 and 64 bit integers, floats and doubles. I'm using this primarily for in-...
Alex's user avatar
  • 330
0 votes
0 answers
24 views

Type 'Promise<Readable>' is not assignable to type 'Readable | Buffer' [duplicate]

I am having this error while trying to run npm build nodes/Gpg/Gpg.node.ts:141:8 - error TS2322: Type 'Promise<Readable>' is not assignable to type 'Readable | Buffer'. Type 'Promise<...
onlypfachi's user avatar
0 votes
0 answers
13 views

how do i deliberately an unsafe read function to implement a buffer overflow attack and the program code must contain procedures or functions

The function maincalls input, which does an unsafe read from standard input. It is necessary to select an input that leads to a return from function inputto function other. The function that returned ...
PROSPER DENNIS NYAMUNDANDA's user avatar
-1 votes
2 answers
76 views

C fgets string length not limited to input

I'm confused how even though the char array mystring I provided can only be upto 5 characters long, the length can exceed 5 if fgets is supplied with a larger limit. #include <stdio.h> #include &...
Helix Development's user avatar
0 votes
0 answers
28 views

Read NetworkStream with UTF8 Encoding

I'm trying to send JSON-objects via Network Streams. I'm able to send one message and deserialize it but after reciving it my While loop exits. I think it has to do with NetworkStream.Read expecting ...
Martin Wiklund's user avatar
0 votes
1 answer
58 views

Force flush Python-part of Bash-script?

I have a simple Bash-script that spend more than 99 % of its time on executing a Python application (the script is just a wrapper that feeds this Python script files in a for-loop and renames the ...
d-b's user avatar
  • 855
0 votes
1 answer
79 views

How to convert Vec<u8> png response from actix-web/rust into Buffer in Nodejs

I have two APIs that talk to each other, one is written in rust (actix-web) and the other in node. My nodejs application is requesting a PNG from the actix API. The actix API response is a Vec ...
Marcus Ruddick's user avatar
0 votes
1 answer
64 views

ReadableStreamBYOBReader.read ignoring offset on chrome

I'm trying to read a file with minimal amount of data copy using a ReadableStreamBYOBReader, but it seems that reader isn't reading at and writing to the correct offsets in Chrome. In the following ...
Sinder's user avatar
  • 277
0 votes
0 answers
26 views

Make a flat buffer using terra::buffer

Is it possible to make a "flat" buffer around lines in the same way as st_buffer work: buf_sf <- st_buffer(st_as_sf(py2),dist = py2$width, endCapStyle = 'FLAT') for terra it works with ...
Jeppe Olsen's user avatar
0 votes
2 answers
49 views

Buffer for String like IntBuffer

Is there a class in Java ( 8+ ) that has similar functionalities as IntBuffer or other classes inheriting fom java.nio.Buffer but for String items? Implementing my own version would be simple for my ...
Hans GD's user avatar
  • 52
0 votes
0 answers
28 views

How can I deal with float IEEE 754 and uint/int at the same time using Node js Buffer?

Hello everyone: I have to parse some data with some format that involves uint, int with sign and float trying to optimize the using of bytes. I think I can handle decently with uint/int numbers ...
Ariel Marcelo Pardo's user avatar
0 votes
0 answers
10 views

Save clipboard's contents as file and return the data to the clipboard later? Different types of copied objects

How can I store buffer/clipboard data from CMD+C as some kind of object or write the contents to txt file to return it later to buffer/clipboard to use CMD+V. The data might be always different like ...
Eugene's user avatar
  • 57
0 votes
0 answers
45 views

Convert an http response application/pdf to Base64 encoding

I have this REST multipart response: --uuid:30f86629-9036-40cf-abf1-a04967a8255b Content-Type: application/xop+xml; charset=UTF-8; type="text/xml" Content-Transfer-Encoding: binary Content-...
kimondoe's user avatar
  • 569
0 votes
1 answer
58 views

How do I set the image data of an IonImg element to be the contents of a variable of type "Buffer"?

I'm using Ionic 7 and React 18. I have this type defined interface Card { ... frontImg: Buffer; frontImgAltText: string; ... } In my component, how do I set the image for an IonImg ...
Dave's user avatar
  • 15.2k
0 votes
0 answers
30 views

Gzip reader only reading 32768 bytes at max

I am trying to compress fixed slice of struct, while trying to un-zip the same buffer gzip.Reader is only reading till 32768 (2^15) at max, causing malformed extracted data. Below is the code - ...
warl0ck's user avatar
  • 3,394
0 votes
0 answers
25 views

I cant write buffer to a file

I am trying to get dto from the params then convert it to the buffered data and write it to a file but it writes data to file as json again. What could be the problem here? async import(dto: ImportDto,...
Numby's user avatar
  • 11
0 votes
0 answers
42 views

I need to create my own method hasNextLine with block reading and system.lineseparator

I've been struggling with it for almost a week. I need to make a function in my class that returns true/false if there is a next line in system.in, in a string or in a file.(no matter if it will ...
Stepan Zakhariev's user avatar
0 votes
0 answers
11 views

Modify the audio content of CMSampleBuffer without creating copy of it and write the file

I am capturing the audio content which is stored in CMSampleBuffer. Now I want to access the audio samples directly from the buffer without creating copy of it and perform some modifications on it (...
Babitha shetty k's user avatar
0 votes
0 answers
18 views

how to modify the length of tab when we modify the files in bufferline.nvim

It's not a critical problem, but I'm asking it on Stack overflow because it's so annoying. The problem is that we can look only half of the circle. The circle shows when the editor modifies the file ...
APTX12's user avatar
  • 41
0 votes
1 answer
49 views

How to translate Python's BytesIO function to Node.js/TypeScript?

I am currently in the process of merging my Python backend with a Svelte frontend using Svelte-Kit with the Node.js adapter. I have a media file as a Buffer and I am trying to figure out how to keep ...
parakeetdev's user avatar
1 vote
1 answer
79 views

Cannot turn off line buffering in C

So, I'm working on a big project, and it requires the stdin and stdout buffers to be disabled so that input and output are processed immediately. However, when I try to do that using setbuf or setvbuf,...
Milk_Cool's user avatar
0 votes
0 answers
29 views

Readable stream from blank pdf file (without text)

In my code, I retrieve a PDF file from Amazon S3, and I create a readable stream from it. I then proceed to read the file in chunks with the intention of determining its MIME type. While this approach ...
Bablo's user avatar
  • 59
1 vote
0 answers
69 views

How can I use "FixedBufferStream" to create an io.Writer in Zig?

I am trying to create a writer from an empty buffer so that I can write tests for my function fn writeHello(writer: std.io.Writer) !void { try writer.print("Hello, world!\n"); } I used ...
richardIII's user avatar
0 votes
0 answers
40 views

Elasticsearch RestHighLevelClient bulk operation not working after some time of restart of service

Elasticsearch RestHighLevelClient bulk operation not working after some time, but initially it works. This is how our code looks. public BulkResponse bulkOperation(BulkRequest bulkRequest) { ...
Hari Prasad N's user avatar
0 votes
3 answers
90 views

What is the name of the data member of an object "cin" which stores an input data in C++?

Eg. cin>>var; Object cin reads input data from the user and as soon as the ENTER key is hit, the operator ">>" extracts the contents of cin and stored into the specific variable &...
Thang Tons's user avatar
0 votes
2 answers
108 views

Impossibility to clear the buffer

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> void perimeter(double, double, double, double *, double *); double square(double, double, double, ...
betchreal's user avatar

1
2 3 4 5
142