stream Questions
1
I have a web app where I need to be able to serve the user an archive of multiple files. I've set up a generic ArchiveExporter, and made a ZipArchiveExporter. Works beautifully! I can stream my dat...
5
Solved
Say I have a function, for example the old favourite
def factorial(n:Int) = (BigInt(1) /: (1 to n)) (_*_)
Now I want to find the biggest value of n for which factorial(n) fits in a Long. I could...
1
Solved
How should one implement the following logic located at https://beam.apache.org/documentation/pipelines/design-your-pipeline/:
//merge the two PCollections with Flatten//me
PCollectionList<Str...
Justen asked 16/5, 2019 at 18:30
1
I have event stream as follows:
sealed trait Event
val eventStream: fs2.Stream[IO, Event] = //...
I want to group this events received within a single minute (i.e from 0 sec to 59 sec of every ...
Uvular asked 8/3, 2019 at 21:28
1
Solved
I've been dabbling with flutter for a few days, and I'm trying to make a simple ToDo app, as a learning project. I'm trying to implement something like a BLoC. A list of ListItem widgets is built w...
2
Solved
I want to read multiple big files using Akka Streams to process each line. Imagine that each key consists of an (identifier -> value). If a new identifier is found, I want to save it and its val...
Janice asked 18/6, 2016 at 22:52
7
Solved
I have an object that implements the interface Windows::Storage::Streams::IBuffer, and I want to get an array of bytes out of it, however while looking at the documentation this interface looks pre...
Craddock asked 7/8, 2012 at 20:43
2
Solved
I'm working on a team that is developing an app which needs to work with sensors to represent a vehicle's state. This state can either be represented through values given by external hardware senso...
2
Solved
I'm trying to find a way to re-order messages within a topic partition and send ordered messages to a new topic.
I have Kafka publisher that sends String messages of the following format:
{system_...
Minded asked 12/5, 2017 at 13:55
2
Solved
I'm basically stuck at excercise 3.56 in SICP. The problem goes like this:
Exercise 3.56. A famous problem, first raised by R. Hamming, is to enumerate, in ascending order with no repetitions, a...
Impart asked 11/4, 2019 at 15:21
1
Solved
I have the following maps:
Map<String,Map<String,Long>> mapOne;
Map<String,Map<String,Long>> mapTwo;
The values inside these maps look something like :
{
BMW = {
SIZE=...
3
Solved
I have this mostly working but having a tough time finalizing it.
For now I have a simple route:
Route::get('file/{id}/', 'FileController@fileStream')->name('file');
this route connects to ...
3
I am using the stream API of Twitter (through tweepy) to collect tweets matching certain criteria, but when I use json.loads() to parse the created jsonl file I get this following error:
File "twi...
1
Solved
In a Node.js project, I am using a for await of loop with a readable stream as data source, so my code conceptually looks like this:
for await (const item of readableStream) {
// ...
}
The read...
Semblable asked 6/4, 2019 at 21:49
1
Solved
I'm building a NodeJS server with ExpressJS that processes data (50KB to >100MB) sent via POST request from a desktop app to be processed and returned. The desktop app gzip compresses the data prio...
Longrange asked 26/3, 2019 at 19:44
2
Solved
the README contains the following code as an example of writing a file fetched:
fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
.then(res => {
const dest = fs.cre...
Concubine asked 26/3, 2019 at 4:9
1
Solved
Currently the way to convert an object to json and gzip it is:
jsonBytes, _ := json.Marshal(payload)
//gzip json
var body bytes.Buffer
g := gzip.NewWriter(&body)
g.Write(jsonBytes)
g.Close()
...
2
Solved
I am basically trying to :
open a csv file as a stream
make some operation on each line
stream the result into a second csv file
in node.js.
Here is my code :
var fs = require("fs");
var csv...
4
I've redirected "cin" to read from a file stream cin.rdbug(inF.rdbug())
When I use the extraction operator it reads until it reaches a white space character.
Is it possible to use another delimite...
Marionmarionette asked 5/9, 2011 at 0:32
2
Solved
I have an example of a program:
using System;
using Newtonsoft.Json;
using System.IO;
public class Program
{
public static void Main()
{
using (var stream = new MemoryStream())
using (var rea...
Outdo asked 15/3, 2019 at 14:2
2
I have a problem/question regarding the bloc plattern with flutter.
Currently, i am starting my app like this
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext c...
Academicism asked 24/10, 2018 at 5:29
5
Solved
Outside of benefiting from Adaptive Rendering for alternate devices, does it ever make sense to write all of this code:
writer.WriteBeginTag("table");
writer.WriteBeginTag("tr");
writer.WriteBegin...
Kosak asked 21/2, 2009 at 20:49
1
Solved
I've got the following method:
pub fn load_names(&self, req: &super::MagicQueryType) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<String>> {
My goal is to get the v...
8
Solved
I want to close my stream in the finally block, but it throws an IOException so it seems like I have to nest another try block in my finally block in order to close the stream. Is that the right wa...
1
Solved
I have a stream of unordered measurements, that I'd like to group into batches of a fixed size, so that I can persist them efficiently later:
val measurements = for {
id <- Seq("foo", "bar", "...
Insulin asked 23/6, 2018 at 16:53
© 2022 - 2024 — McMap. All rights reserved.