takeUntil in RxJS
takeUntil is an operator in RxJS that completes an Observable when a second Observable emits a value or completes. The second Observable is called the "notifier" Observable.
1
view
distinctUntilChanged in RxJS
In RxJS, distinctUntilChanged is an operator that filters out consecutive duplicate values emitted by an observable. It compares the current emitted value with the previously emitted value and only emits the current value if it is different from the previous value.
1
view
debounceTime in RxJs
In RxJS, debounceTime is an operator that delays emitting items from a source Observable by a specified amount of time, but only if no other items have been emitted from the source during that time.
1
view
ReplaySubject in RxJs
ReplaySubject: A ReplaySubject is a variant of a Subject that stores a buffer of previous values and replays them to new subscribers. It allows for creating an Observable that will emit previous values to new subscribers.
1
view
AsyncSubject in rxjs
In RxJS, an AsyncSubject is a variant of a Subject that only emits the last value in the stream to its observers, and only when the stream completes. It is useful when you only need the final value emitted by an Observable.
1
view
BehaviorSubject in rxjs
In RxJS, a BehaviorSubject is a variant of a Subject that always emits its latest value to its subscribers. It stores the latest value emitted, and any new subscriber will immediately receive that value before receiving any other values emitted by the BehaviorSubject.
1
view
Subject in RxJS
In RxJS, a subject is a special type of observable that allows values to be multicasted to multiple observers. In other words, a subject can have multiple subscribers, and when it emits a new value, that value is sent to all of its subscribers.
Subjects act as both an observer and an observable, which means that they can be used to subscribe to an observable, and also emit new values to that observable. Subjects can be used to create custom observables, and they are particularly useful in scenarios where you need to share data between different parts of your application.
There are four types of subjects in RxJS:
BehaviorSubject: It is a subject that always has a default value. When a new subscriber subscribes to the BehaviorSubject, it immediately emits the most recent value.
ReplaySubject: It is a subject that can replay multiple values to new subscribers. It will store a buffer of values and replay them to any new subscriber.
AsyncSubject: It is a subject that only emits the last value of the source observable and only after the source observable completes.
Subject: It is a basic subject that simply multicasts values to its subscribers.
Subjects can be used in a variety of scenarios, such as sharing data between components, handling user events, and creating custom observables. They are an important part of the RxJS library and are widely used in reactive programming.
1
view
Types of observables
RxJS is a library for reactive programming using Observables to handle asynchronous data streams. The following are the observable types that are available in RxJS:
Observable: The Observable type represents a stream of data that can be subscribed to, allowing data to be pushed to its observers over time. Observables can be created from events, arrays, timers, or any data source that can be represented as a sequence.
Subject: A Subject is a special type of Observable that allows for multicasting. It can be used to share a single stream of data among multiple observers. Observers can subscribe and unsubscribe to a Subject at any time, and new observers will receive all future values that are emitted by the Subject.
BehaviorSubject: A BehaviorSubject is a variant of a Subject that always emits its current value to new subscribers. It stores the latest value emitted and will immediately emit that value to new subscribers before they receive any other values.
ReplaySubject: A ReplaySubject is a variant of a Subject that stores a buffer of previous values and replays them to new subscribers. It allows for creating an Observable that will emit previous values to new subscribers.
AsyncSubject: An AsyncSubject is a variant of a Subject that only emits the last value in the stream to its observers, and only when the stream completes. It is useful when you only need the final value emitted by an Observable.
Operator: An Operator is a function that takes an Observable as input and returns another Observable as output. Operators can be used to transform, filter, or combine Observables, and can be chained together to create more complex data pipelines.
Overall, the different types of Observables in RxJS provide flexibility and allow for more complex data streams to be handled in a reactive and efficient manner.
4
views
Rxjs concepts
RxJs is a powerful library for reactive programming in JavaScript, which provides a way to handle asynchronous data streams and event-based programming in a more functional and declarative way. Here are some of the key concepts in RxJs:
Observables: An Observable is a representation of a stream of data or events that can be observed over time. Observables can emit multiple values, errors, or complete signals to subscribers, which can handle these events asynchronously.
Operators: Operators are functions that can be used to transform, filter, merge, or combine Observables. Operators are used to compose complex data flows from simpler ones, and can be chained together to create powerful and flexible data processing pipelines.
Subjects: Subjects act as both an observer and an Observable, allowing developers to multicast data to multiple subscribers. A Subject can emit new values and broadcast them to all subscribers, and can also act as a listener that receives and processes new data from Observables.
Schedulers: Schedulers provide a way to manage concurrency and scheduling of Observable subscriptions and operations. A Scheduler can be used to control the execution context of Observables, allowing developers to specify when and how often data is emitted, or how often subscriptions are made.
Subscription: A Subscription is a handle to a stream of data, which can be used to unsubscribe from the stream or cancel it altogether. Subscriptions allow developers to manage the lifecycle of Observables, and prevent memory leaks by properly disposing of unused streams.
Overall, RxJs provides developers with a powerful set of tools and concepts for building reactive and scalable applications, enabling them to handle asynchronous data streams and event-based programming in a more elegant and efficient way.
15
views
ngxs concepts
NGXS introduces several key concepts for state management in Angular applications. These concepts include:
Store: The Store is the central repository for all the application state. It holds a tree-like structure of state objects which are immutable. The store can be accessed from any component or service in the application.
Actions: Actions represent the intent to change the state of the application. Actions are dispatched to the store and are handled by reducers. Actions can carry payload data, which is used by reducers to update the state.
Reducers: Reducers are pure functions that take the current state and an action as input and return a new state. Reducers are responsible for updating the state of the application based on the action dispatched.
Selectors: Selectors are functions that are used to select a subset of the state from the store. Selectors can be used to filter, transform or combine the state in the store.
Plugins: Plugins are used to extend the functionality of the store. Plugins can be used to perform actions like logging, persistence or to add middleware to the store.
Dispatch: Dispatch is the process of sending an action to the store. The dispatch process triggers the reducer function, which updates the state of the application.
Subscribe: The subscribe method allows components to listen to changes in the state of the application. When the state of the application changes, subscribers will receive an updated copy of the state.
These concepts are the building blocks of NGXS, and they provide a powerful and consistent way to manage state in Angular applications. By using these concepts, developers can build complex applications that are easy to reason about and maintain.
11
views
Unspoken social rules that may help you
Unspoken social rules that may help you
Don't call someone more than twice continuously unless It's really urgent matter and if they don't pick up, wait until they return the call. They might be sleeping, sick, busy, or have something important going on.
If you borrow money from someone, return it, even before they ask for it.
Be nice and kind to waiters, cleaners, helpers, drivers, or anyone offering you a service, and treat them with the same respect you would give a manager or a CEO.
Always open the door for the person coming behind you. It doesn't matter if it is a guy or a girl, senior or junior.
If you take a taxi with a friend, and he/she paid now, you pay next time.
Never interrupt People talking. Wait until they finish then say what you want.
If you tease someone, and they don't seem to enjoy it, stop it and never do it again.
Say "thank you" when someone is helping you.
Don't break your promise or don't make one if you are not sure you can keep it.
When someone tells you a secret, take it with you to Your Grave, even if you wake up as enemies the next morning.
When someone shows you a photo on their phone, don't swipe left or right. You never know what is next.
Never talk about your riches in the midst of the poor. Similarly, don't talk about your children in the midst of the Barren.
1
view
ngxs
NGXS (Angular Global State Management) is a state management library for Angular applications.
1
view
Signs that you are doing better than 95% of the people in their 20th and even 30th
Signs that you are doing better than 95% of the people in their 20th and even 30th
You are involved in less casual relationships and you have started considering the rule of quality over quantity as an approach to starting new relationships.
You are serious about your most important goals. Most people don't even know their goals or they just follow the masses. Having goals means you are doing where better than you think.
You went through hard times. You know embrace the importance of hard times. Going through hardships is good. It means you are growing stronger, even if it's tough.
You seek peace over pleasure. Most people just look for the next dopamine hit.
You learn from mistakes. Most people run away from their problems or blame others.
Uterused that everything will be alright while putting in the necessary effort.
You have learnt to enjoy your own solitude without feeling lonely.
1
view
Habits of remarkable Effective People
Habits of remarkable Effective People
They always start with goals: Effort without a genuine purpose is just effort. Effective People don't just know what to do; they know why. They have a long-term goal. They have short-term goals that support their long-term goals.
Then they create systems: A goal is great for planning and mapping out what success looks like. A system is great for actually making progress toward that goal.
They believe in themselves: Diligence isn't easy. Hard work is hard. Pushing forward when successes are few and far between text optimism and self believe.
They believe there in control of their lives: Effective People don't fall for good luck or worry about bad luck. They assume success is totally within their control.
They find happiness in the success of others: Great companies are made up of employees who help each other, know their roles, set aside their personal goals, and value team success over everything else.
They use their goals to make decisions automatic: Remarkable Effective People apply the same framework to the decisions they make. "Will this help me reach my goal? If not I won't do it".
They don't multitask: Try to do two things at once and you will do both half-assed.
Deep freely ask for help.
5
views
What are some psychological facts for attracting people?
What are some psychological facts for attracting people?
Posture matters: If you stand up straight and make eye contact while talking to the people you are attracted to, it will make you more confident and attractive.
Have a strong sense of humor: It is thought to be a sign of Intelligence this is why, when assessing a potential partner, we tend to be more attracted to those who are funny.
Start the conversation first: Women are automatically attracted to guys who start a conversation, take the initiative and make them laugh.
...And always be the one to pull away from the conversation: It shows that you value your time and have other stuff to do. If you cut short your conversation the other person always wants more of it. It creates attraction.
Deeper voice: Men with Deeper voices are more likely to make a lasting impression on women than men with higher voices.
2
views
Poor Dads mindset
Poor Dads mindset
Go to school and get good grades
Get a safe and Secure job
Work hard and save
Work for money
Pay your creditors first
Save money by shopping for Bargains
Don't buy something you can't afford
Investing is risky
Your house is an asset
The rich are greedy
Money is a necessary evil
3
views
How to remember everything
How to remember everything
Learn, practice, recall repeat: While reviewing make sure you are calling and not just re-reding passively.
Practice chuckling: Take individual pieces of information and group them together into a larger unit.
Use metaphors and stories: Relate what you are learning to concepts and stories that you are already familiar with.
Use visual memory: Visualising or concept is often the best way to fully understand it and remember it.
Sleep: You are brain is like a muscle, it needs proper sleep to build those long-lasting connections.
1
view
How to be truly respected
How to be truly respected
Work slow as fuck
Be delusionally confident
Don't act like you don't see people, look them in the eyes
Never break eye contact first
Have the ability to beat someone but choose not to
Respect those who respect you, disrespect those who disrespect you
If someone treats you poorly, walk away from the situation
1
view
Facts about Hindu New Year you don't know
Facts about Hindu New Year you don't know
People follow Three Types of calendars mainly in India- lunar, solar, and Georgian.
Hindu celebrate their new year in April or March every year.
Actually, Hindu New Year marks the new spring season and agricultural harvest by sowing new seeds and noticing the change.
Hindu Nav varsh or King Vikram Aditya started the first Hindu New Year.
It is also believed that lord Brahma created the universe on this day and Satya yoga began.
10
views
Life becomes peaceful when you
Life becomes peaceful when you
Stop checking to see who has viewed your stories.
Stop deleting posts because they don't have enough likes.
Stop feeling embarrassed about things that make you feel happy.
Stop comparing yourself to somebody else you are beautiful.
Stop reading old text messages.
Stop believing that social media acceptance determines your self-worth.
Stop being ashamed of your type of music.
1
view
Places not to waste your energy
Places not to waste your energy
Don't waste your energy on the people who don't support you.
Don't waste your energy on what others think about you.
Don't waste your energy on a one-sided relationship.
Don't waste your energy on the people who need you occasionally.
Don't waste your energy on solving problems that aren't yours.
Don't waste your energy doing things just to stay distracted.
Don't waste your energy on impressing somebody who isn't interested.
1
view