stream Questions
4
Solved
I would like to stream the contents of an HTTP response to a variable. My goal is to get an image via request(), and store it in in MongoDB - but the image is always corrupted.
This is my code:
r...
6
I am writing a text file and each time i write i want to clear the text file.
try
{
string fileName = "Profile//" + comboboxSelectProfile.SelectedItem.ToString() + ".txt";
using (StreamWriter s...
Sincere asked 28/12, 2012 at 15:3
3
Solved
I'm creating Excel data on the fly using Exceljs
I want to buffer this thing in memory, then send it off to the user using Koa.
The write method for Exceljs expects a writableStream:
workbook.xl...
2
Streams
Some authors suggest to classify the events in "streams", and many authors identify the "stream" with the "aggregate Id".
Say an event car.repainted by which we mean we repainted the car ...
Hyde asked 1/9, 2018 at 0:57
3
Solved
I'm using a custom implementation of a Stream that will stream an IEnumerable<T> into a stream. I'm using this EnumerableStream implementation to perform the conversion.
I'm using it to perf...
Overcash asked 23/8, 2018 at 19:51
1
Solved
I have a BLoC that consumes a raw input Stream (that yields a list of JSON objects) and transforms it to usable objects using a StreamTransformer. The UI shows that list. The user can apply a filte...
4
I'm connecting to an external websocket API using the node ws library (node 10.8.0 on Ubuntu 16.04). I've got a listener which simply parses the JSON and passes it to the callback:
this.ws.on('mess...
Deltoro asked 6/8, 2018 at 9:10
3
I am writing a module, which is a writeable stream. I want to implement pipe interface for my users.
If some error happens, i need to pause readable stream and emit error event. Then, user will de...
Alterable asked 28/10, 2015 at 8:29
4
Solved
I can read unmanaged memory in C# using UnmanagedMemoryStream, but how can I do the reverse?
I want to read from a managed stream directly into unmanaged memory, instead of first reading into a by...
Disappearance asked 2/9, 2009 at 12:17
5
I have instance FileOutputStream and I want to write file.
after execution my code I can't find file on my filesystem.
maybe FileOutputStream have method that I will know where it writes?
1
Solved
I need to inject a png into a PDF using HummusJS.
In the production version of my API, I'll be receiving a post request containing a base64 that I'll convert to binary reader stream. (In the examp...
1
In [filebuf.virtuals]:
pos_type seekoff(off_type off, ios_base::seekdir way,
ios_base::openmode which
= ios_base::in | ios_base::out) override;
Effects: Let width denote a_codecvt.encoding...
Adrell asked 25/7, 2018 at 8:0
6
I would like to know what are the mark() and reset() methods of BufferedReader? How do I use them? I read the Javadoc but as a beginner I was unable to understand it.
Accurate asked 23/11, 2011 at 9:47
5
Solved
I have a big file of memory size 42 mb. I want to download the file with less memory consumption.
Controller Code
public ActionResult Download()
{
var filePath = "file path in server";
FileInfo ...
Ambulacrum asked 5/5, 2017 at 12:2
1
Using Koa2 and I'm not sure how to write data to the response stream, so in Express it would be something like:
res.write('some string');
I understand that I can assign a stream to ctx.body but ...
Dolomites asked 28/7, 2018 at 11:44
1
Solved
Decoding a byte stream into a text stream is easy:
import io
f = io.TextIOWrapper(io.BytesIO(b'Test\nTest\n'), 'utf-8')
f.readline()
In this example, io.BytesIO(b'Test\nTest\n') is a byte stream...
Tiler asked 29/7, 2018 at 22:36
5
We are given a continuous stream of integer ranges like [1,3], [5,10], [2,6], ...
when each new range comes, we need to check with existing ranges and see if it overlaps with any existing range, an...
3
Solved
Both ByteArrayOutputStream and BufferedOutputStream do buffering by placing data in an array in memory. So my questions are
what are the differences between these two.
When to use ByteArrayOutput...
1
Solved
Given the following input (which is a toned down version of the output with 100K+ objects of another complex query):
echo '{ "a": { "b":"c", "d":"e" } }{ "a": { "b":"f", "d":"g" } }' | jq '.'
{
"...
Drus asked 24/7, 2018 at 5:49
1
Solved
I have a need to pipe a readable stream into both a buffer (to be converted into a string) and a file. The stream is coming from node-fetch.
NodeJS streams have two states: paused and flowing. Fro...
Luzern asked 16/7, 2018 at 23:47
0
I have been trying to use a custom AVPlayerItem that lets me copy the currently playing media to file after it has been downloaded while it is streaming into the AVPlayer, essentially letting me ca...
1
Solved
The vector-0.1 package has a quite efficient Stream implementation (Data.Vector.Stream):
data Step s a = Yield a s
| Skip s
| Done
-- | The type of fusible streams
data Stream a = forall s. Str...
Hymnody asked 11/7, 2018 at 4:4
1
Solved
Data.Vector.Stream provides an nice Stream implementation that is very efficient thanks to the focus on fusability (see this paper for more). Since vector-0.1 this Stream implementation changed sli...
3
Solved
I was trying to convert an Url to Stream but I am not sure whether I am right or wrong.
protected Stream GetStream(String gazouUrl)
{
Stream rtn = null;
HttpWebRequest aRequest = (HttpWebRequest...
6
Solved
I am implementing file saving functionality within a Qt application using C++.
I am looking for a way to check to see if the selected file already exists before writing to it, so that I can prompt...
© 2022 - 2024 — McMap. All rights reserved.