Questions tagged [subject]
394 questions
-1
votes
1 answer
Angular observable is not working in callback funtion but Subject is working
I have a callback method in a service which have code like below:
@Injectable({
providedIn: 'root'
})
export class AService {
counter: number = 0;
anObject = new anObject();
dataObservable = {} as Observable;
dataSubject = new…

Mr. Learner
- 351
- 1
- 2
- 12
-1
votes
1 answer
Subscribers to BehavorSubject not deteciting chanfes
I'm working with localforage service who works asynchronous. I have created my own service to manage all about localforage dat. This service is added to appmodule to be global.
The problema that I have is that even I've been subscribed to…

Anonymous
- 55
- 1
- 5
-1
votes
2 answers
Angular Jasmine - spy a subject from a mocked service in a component
Hello I'm testing a component and in that component I have CartService with two subjects. Im creating a spyObject for that service. And now when angular tries to subscribe to those subjects they are well undefined. Tried to returnValue of a Subject…

Luker asd
- 77
- 1
- 8
-1
votes
1 answer
Optional Parameter for a Subject
I have a subject in my Angular Service,
itemClicked: Subject;
The problem is, I want to pass MenuItem only when I pass MenuTab as my first parameter, while pass nothing as my second parameter when the first…

javan.rajpopat
- 127
- 14
-1
votes
2 answers
Angular 8 - subscribe to one service from two different components
I have an angular service and two different unrelated components that use this service:
Service Code:
const url = 'ws://localhost:8080
@Injectable({
provideIn: 'root',
})
export class MyService{
public subject: Subject;
…

Natalie
- 71
- 4
-1
votes
1 answer
is it possible to use an instance or variable in the subject of rails mailer and how please :)
I would like to use an instance or variable like below in the mailer subject.
So I would like to get the user name or some other user detail in the subject, I tried several thing but I receive an error every time. I can't find documentation about…

skosman
- 27
- 5
-1
votes
4 answers
Write a program that accepts a positive integer from the user and prints the first four multiples of that integer. Use a while loop
I am trying to write as the question is stated, Write a program that accepts a positive integer from the user and print the first four multiples of that integer; Use while loop (Python)
total = 0
number = int(input("Enter integer: "))
while number…

David Martinez
- 1
- 1
- 1
-1
votes
1 answer
Angular 6: Why aren't the results of Next visible immidiately?
It's more of a theoretical question, since I don't have the code at hand, but I think it can be anwsered nevertheless.
I have a service (MsgService) that is responsible for supplying msg-s to components. When I update/set msg-s of the service from…

Mandy
- 107
- 1
- 2
- 9
-1
votes
1 answer
Subject inside RXJS's Subscribe method
I have cloned one Github repo based on RXJS with angular 2+.
Help me understand the meaning of this.createTodo$.subscribe(this.create$)
in below code.
I am able to understand that here we are trying to subscribe createTodo$ observable.Inside the…

Suruchi Babbar
- 27
- 4
-1
votes
1 answer
html and php fill subject line from contact form
So I have created a page which includes several hyperlinks to web forms (for eg. volvo would link to a form that emails to volvo website, saab would link to form that emails to saab form) however I am having a bit of trouble changing the subject…

Mr E
- 33
- 9
-1
votes
1 answer
Why Observable was subscribed more then once
Observable only can be subscribed by one observer . Subject allows values to be multicasted to many Observers but in this example why foo was subscribed twice? Thank you!
enter image description here

buctwbzs
- 41
- 5
-1
votes
2 answers
Spamassassin rule that compares part of the To: header with part of the subject line
I am trying to write a rule that will trigger when the user part of the 'To:' header is present in the subject line, followed by a number or preceded by a number.
For example
To: myname@thisdomain.com
Subject: myname 3679273
or
To:…

Rob
- 155
- 1
- 12
-1
votes
2 answers
How to check if java Subject.doAs method executed in separate thread?
I have found that to this method passed
PrivilegedExceptionAction
This object has method run(). Does it mean that will be created separate thread for executing? Please part of code that create this thread if yes. I didn't find it.

user710818
- 23,228
- 58
- 149
- 207
-1
votes
1 answer
Apply function to multiple subjects and retain the results in table in R
I am going to use the Chainladder package, and apply its function mackchainladder()
I have a data with many cumulative payments triangles in the Excel, formatted like the following:
ID A DY1 DY2 DY3 DY4 DY5 DY6 DY7 …

user3417998
- 3
- 2
-1
votes
1 answer
calculating the mean for each subj in r
I have a question regarding calculating means for each subj.
I have a dataframe as follows:
subj entropy n_gambles trial response rt
1 0 high 2 0 sample 4205
2 0 high 2 0 sample 676
3 0 high …

user2707619
- 11
- 4