reactive-programming Questions

1

I have several asynchronous tasks/jobs that I need to run on a schedule and it seems that I could do this nicely using Observables. When a job fetches the data, an exception could occur (eg 404), a...

3

Solved

I think I must be misunderstanding something fundamental, because in my mind this should be the most basic case for an observable, but for the life of my I can't figure out how to do it from the do...
Drone asked 24/10, 2015 at 22:57

3

Solved

Here is my MutableStateFlow value I try to work with: val songList: MutableStateFlow<MutableList<Song>> = MutableStateFlow(arrayListOf()) I need to observe changes (after methods like ...

2

Is there a way to make pandas Dataframes observable? Lets say I have some Dataframes A, B, C that have the same index and C is calculated by C = A + B If I change a cell value in A (e.g. 2 => 4...

8

Solved

I've been looking to understand those 3: Subject BehaviorSubject ReplaySubject I would like to use them and know when and why, what are the benefits of using them and although I've read the docum...

6

Solved

Hi I am doing some research on RxJS. I am able to use the library simply by referencing it in my browser as such: <script src="https://unpkg.com/@reactivex/[email protected]/dist/global/Rx...

5

Say I wanted to separately handle the first event emitted by an Observable, but then continue my subscription. For example, if I had the following chain: observable.throttleTime(2000) .takeFirst...
Niels asked 26/5, 2017 at 21:5

1

Solved

First of all, I love Vue 3. I really enjoy it over many other frameworks. But I think I have found a limitation. I am trying to wrap some of my very complicated logic in class where internally each...
Show asked 3/10, 2022 at 18:9

2

Solved

I'm facing an issue with WebClient and reactor-extra. Indeed, I have the following method : public Employee getEmployee(String employeeId) { return webClient.get() .uri(FIND_EMPLOYEE_BY_ID_URL, ...

1

Situation: I have a non-reactive legacy library which expects an OutputStream and writes its output into it, the method signature is something like void produceData(OutputStream stream) I want to ...

3

Solved

Reading How to use RxJs distinctUntilChanged? and this, it seems that distinctUntilChanged alters the output stream to only provide distinct contiguous values. I take that to mean that if the same...
Suggestible asked 23/10, 2017 at 12:52

2

Solved

I need a long press event to bind to buttons in svelte 3. I want to do this in the least "boilerplaty" way possible. I've tried with a long press function but this seems a little convoluted and ha...
Diastrophism asked 2/7, 2019 at 3:9

3

Solved

I have a sleep method for simulating a long running process. private void sleep() { try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } } Then I have a metho...
Helsell asked 6/7, 2016 at 21:33

3

Solved

Even if my stream is not empty, the fallback stream would always be created? What's the intent behind doing this? This is extremely non-idiomatic. On the other hand, .onErrorResume is evaluated la...
Gaikwar asked 10/9, 2019 at 12:21

4

I am using reactive forms in Angular 7. I have many fields that are dependent on other fields. What I am curious about of what should I use (change) or this.form.get("control_name").value...

3

I am beginner in react-redux. I trying create a function like exporting a html text to pdf with Javascript and it works with html, but when I apply it to react component, it doesn't work. This is...
Nonpareil asked 8/1, 2017 at 3:21

6

Solved

I would like to use make a series of requests to a server, but the server has a hard rate limit of 10 request per second. If I try to make the requests in a loop, it will hit the rate limit since a...
Euler asked 16/2, 2017 at 20:31

1

Given an exchange using WebClient, filtered by a custom ExchangeFilterFunction: @Override public Mono<ClientResponse> filter(ClientRequest request, ExchangeFunction next) { return next.exch...
Wellgroomed asked 4/1, 2018 at 20:56

9

Solved

I am chaining async operations using RxJava, and I'd like to pass some variable downstream: Observable .from(modifications) .flatmap( (data1) -> { return op1(data1); }) ... .flatmap( (data2...
Coburn asked 27/1, 2015 at 17:12

3

I'm new to Project reactor and trying to understand difference between boundedElastic() vs parallel() scheduler. Documentation says that boundedElastic() is used for blocking tasks and parallel() f...
Brozak asked 19/4, 2020 at 13:0

1

Solved

I'm quite new to Mono and Flux. I'm trying to join several downstream API responses. It's a traditional blocking application. I don't wish to collect a list of Mono, I want a List of the payloads r...
Parsimony asked 4/6, 2022 at 23:11

1

Solved

In ReactiveX paradigm, Is it a responsibility of the consumer (IObserver) to deal with thread safety? E.g., if OnCompleted call comes along when OnNext is still executing on another thread? It look...

2

Solved

Hello guys I'm trying to grasp RxJS lib and the whole idea of reactive programming. I'm trying to merge two observables into one. First observable contains an array of objects DefectImages[] the se...
Sommerville asked 21/11, 2018 at 19:15

4

Solved

Let's say I have two infinite Observables that can emit values at any moment. They combine to create a Observable<ProcessFileEvent>. Observable<Integer> selectedFileId= ... Observable&...
Anse asked 8/7, 2015 at 19:45

1

I have a fundamental question about reactive programming in react. As you know, a react component re-renders only if one of its props changes and does not aware of what happened inside the props. B...
Chromatograph asked 13/4, 2022 at 9:29

© 2022 - 2024 — McMap. All rights reserved.