stream Questions
2
Solved
I have to transfer a file from and API endpoint to two different bucket.
The original upload is made using:
curl -X PUT -F "data=@sample" "http://localhost:3000/upload/1/1"
The...
Zipah asked 8/11, 2021 at 14:14
4
Solved
I am using Python and it's subprocess library to check output from calls using strace, something in the matter of:
subprocess.check_output(["strace", str(processname)])
However, this only gives...
Scrapbook asked 8/1, 2019 at 11:59
4
Solved
I want to delete data from my stream after I read it.
Basically I want the same system than channel in Go.
So, if I add 5, 3 and 2, my stream contains 5, 3 and 2.
When I start reading, I get 5, an...
3
I'm using some LLVM tools (like llvm-nm) as static libraries. I.e. i copied source llvm-nm.cpp, renamed main(..) to llvm_nm(..) and compiled it as static library. I'd like to forward standard outpu...
3
Solved
I'm writing a simple web app in Go and I want my responses to be streamed to the client (i.e. not buffered and sent in blocks once the request is fully processed) :
func handle(res http.ResponseWr...
2
Solved
Consider the following:
var asyncFunction = function(data, callback) {
doAsyncyThing(function(data){
// do some stuff
return callback(err)
})
}
fs.createReadStream('eupmc_lite_metadata_2016_04...
Mossberg asked 16/4, 2016 at 8:50
2
Solved
I'm trying to learn streams and am having a little bit of an issue getting it to work right.
For this example, I'd simply like to push a static object to the stream and pipe that to my servers re...
Girvin asked 20/12, 2013 at 17:37
7
Solved
How do you think what is the best way to find position in the System.Stream where given byte sequence starts (first occurence):
public static long FindPosition(Stream stream, byte[] byteSequence)
...
3
I love Elixir streams. In particular I've got a function which constructs an infinite stream of prime numbers; you can take the first 10,000, or all the primes below 1,000,000, or whatever, with th...
3
Solved
I am updating my project from PHP 7.0 to PHP 8.0 and I couldn't find out, if it is allowed to EXPLICITLY assign resource as the data type:
of a class property,
of a method/function parameter,
retu...
5
Solved
I like to use std::ostrstream to format text but not print it to stdout but instead write it into an std::string (by accessing the std::ostrstream::str() member). Apparently this is deprecated now....
Sitka asked 1/6, 2012 at 11:46
9
Solved
Requests is a really nice library. I'd like to use it for downloading big files (>1GB).
The problem is it's not possible to keep whole file in memory; I need to read it in chunks. And this is a ...
Sat asked 22/5, 2013 at 14:47
4
Solved
I have been trying to create a way to stream a youtube url (preferably audio only, although this doesn't matter too much) right from python code. I have tried numerous things but none really seem t...
7
Solved
In RingoJS there's a function called read which allows you to read an entire stream until the end is reached. This is useful when you're making a command line application. For example you may write...
Gwenny asked 16/11, 2012 at 5:23
1
Solved
I have a simple list of items. Each item has attributes which are often changing (e.g. every second).
I use turbo_stream_from "list_items" in order to keep the data fresh.
I wanted to add...
Distracted asked 25/4, 2023 at 20:16
5
Solved
I use require("fs").promises just to avoid to use callback function.
But now, I also want to use fs.createReadstream to attach a file with POST request.
How can I do this?
Or what alter c...
Suppletion asked 10/5, 2019 at 9:1
4
How can I make a lazy list representing a sequence of doubling numbers? Example:
1 2 4 8 16 32
Guardhouse asked 27/10, 2009 at 16:17
2
Solved
This is how I write to a stream then read from it using 1 thread:
System.IO.MemoryStream ms = new System.IO.MemoryStream();
// write to it
ms.Write(new byte[] { 1, 2, 3, 4, 5, 6, 7 }, 0, 7);
...
Ceasefire asked 8/9, 2012 at 5:20
3
Solved
I am getting a "nullable expression" error. The problem is occurring in the following lines:
left: isSideBarOpenedAsync.data ? 0 : 0,
right: isSideBarOpenedAsync.data ? 0 : screenWidth - ...
Alabaster asked 28/5, 2021 at 13:52
5
Solved
I have class ImportProvider , and I want write unit test for Import method.
But this should be unit test, so I don't want to read from file to stream.
Any idea?
public class ImportProvider : IImp...
Geodesic asked 13/5, 2015 at 10:33
5
Solved
I am trying to write a program to get a zip file from s3, unzip it, then upload it to S3.
But I found two exceptions that I can not catch.
1. StreamContentLengthMismatch: Stream content length mis...
Amphichroic asked 5/5, 2017 at 7:43
2
Solved
Short example of what I'm having trouble understanding:
Stream<int> getNumbersWithException() async* {
for (var i = 0; i < 10; i++) {
yield i;
if (i == 3) throw Exception();
}
}
With ...
Stereobate asked 15/8, 2020 at 10:54
13
Solved
I need to write a unit test for a method that takes a stream which comes from a text file. I would like to do do something like this:
Stream s = GenerateStreamFromString("a,b \n c,d");
Gadolinium asked 10/12, 2009 at 8:14
13
Solved
I am using the following code to start a process builder. I want to know how can I redirect its output to a String.
ProcessBuilder pb = new ProcessBuilder(
System.getProperty("user.dir")...
Goodlooking asked 23/5, 2013 at 12:35
3
var request = new HttpRequestMessage(HttpMethod.Get, $"api/Items");
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
using (var response = a...
Antiscorbutic asked 24/6, 2020 at 20:33
© 2022 - 2024 — McMap. All rights reserved.