Questions tagged [subject]
394 questions
5
votes
1 answer
Add information to the subject on apache shiro
Im using apache shiro. When i want to know if the user have permissions and roles i use SecutiryUtils.getSubject(). I like to know how to add more information to the subject like email, primary key and any other business information that i need so i…

Tiago Wanke Marques
- 91
- 9
5
votes
2 answers
Shiro resets the session after 2 min
I am using Apache Shiro in my webapp.
I store some parameters in the session notably the primary key of an object stored in the database.
When the user logs in, I load the object from the database and save the primary key in the session. Then…

user2177336
- 205
- 3
- 13
5
votes
1 answer
Non replaying hot observable
Original question
I have a scenario where I have multiple IObservable sequences which I want to combine with Merge and then listen to. However, if one of these produces an error I don't want it to crash everything for the other streams, as well as…

lbergnehr
- 1,578
- 11
- 15
4
votes
2 answers
Override the Subject.next method
I have the following code, in which I wanna override the next to have some custom logic. It doesn't work this way, but only works if the next is a property with an arrow function. What's the reason behind it?
export class Store extends…

Ramesh Thiruchelvam
- 346
- 3
- 10
4
votes
1 answer
using rxjs subject to show and hide component in Angular 7
I had 3 components inquiry-form, inquiry-response and inquiry-summary
and for some conditions, this components can be hide and show, Im using rxjs subject to send data between component, this is the scenario:
inquiry-form
has 2 div
user enter id…

hafizi hamid
- 405
- 2
- 20
- 41
4
votes
1 answer
Angular Component calls Service that calls service: both need to do something with result
I'm not sure how to word this question.
I have an Angular component that needs to call a method on a service class. That method needs to call an http method through my own http service, then do something with the result.
But then the component…

FunkMonkey33
- 1,956
- 2
- 16
- 24
4
votes
2 answers
Subject is not working when route navigating from one component to another component in Angular 6
I have Component A, Component B, and a service. I declared Subject in the service and subscribed the Subject in component B., And I'm sending some data from Component A to the Subject before navigating to component B. It is navigating to component…

Sunilkumar Mandati
- 179
- 10
4
votes
2 answers
How to use void Subject in RxJava2?
I've managed to create it this way:
private final PublishSubject subject = PublishSubject.create();
But how to pass value to it in onNext(T t)? I can't pass null to it, cause it will throw an exception. onComplete isn't an option too.

Max Makeichik
- 227
- 4
- 18
4
votes
1 answer
How to cleanly reconnect to a ReplaySubject while avoiding past memoization side-effects?
I hold state in one ReplaySubject that replays the last copy of the state. From that state, other ReplaySubjects are derived to hold...well, derived state. Each replay subject need only hold it's last calculated state/derived state. (We don't use…

aaronofleonard
- 2,546
- 17
- 23
4
votes
1 answer
Action on subscribe() and unsubscribe()
in RxJS I'd like to take some special action once an Observer subscribes to an Observable and when he unsubscribes. I can of course overwrite the subscribe() and unsubscribe() methods, but that seems crud.
Isn't there a way during creation of the…

Daniel
- 597
- 11
- 19
4
votes
1 answer
Does rspec memoize the `subject` block?
The coding standard that I'm working in specifies that a group of specs testing a function should have a subject that is the function being called. It looks like this:
define User do
context :foo do
let(:user) { FactoryGirl.create(:user) }
…

user2574255
- 85
- 1
- 6
4
votes
1 answer
Objective C: Send email with subject and body and switching app
I want to send eMails with subject and body.
This is my code right now and it works as expected. It´s leaving my app and creating a new message in Mail.
[[UIApplication sharedApplication] openURL:[NSURL…

Ronald Hofmann
- 1,390
- 2
- 15
- 26
4
votes
1 answer
Python/Plone: Getting all unique keywords (Subject)
Is there a way of getting all the unique keyword index i.e. Subject in Plone by querying the catalog?
I have been using this as a guide but not yet successful.
This is what I have so far
def search_content_by_keywords(self):
"""
Attempting…

Frankline
- 40,277
- 8
- 44
- 75
3
votes
2 answers
How to select only first non NA value of each group in R?
I have a data frame like
mydata <- data.frame(Id=c(01,01,01,01,01,01,02,02,02,02),
VISIT=c("Screeing","Baseline","Baseline","Baseline","Week 9","Week 9","Baseline","Week 2",
"Week 2","Week 2"),
…

Katie
- 119
- 1
- 7
3
votes
2 answers
Angular 2+ cached HTTP request force reload
In my angular service I have a cached http request which is called once when my component is initialized
//variables
private readonly URL: string = 'http://makeup-api.herokuapp.com/api/v1/products.json';
private cachingSubject:…

Олег Войтинський
- 739
- 6
- 17