Author: Editorial Team
-
Closure in JavaScript
1. Introduction In this tutorial, we’ll discuss one of the most important concept of JavaScript – Closure. Closure is a popular interview question. Closure is not a special syntax and is not related to a particular class or library. You can think it as a concept. Closure is created as a result of writing code…
-
ConcurrentHashMap in Java
ConcurrentHashMap is defined in java.util.concurrent package. This class is a member of the Java Collections Framework. This class implements Serializable, ConcurrentMap and Map interfaces. Retrieval operations of this class does not result in locking and are non-blocking.
-
Set in JavaScript
1. Introduction Set is a collection of unique values. Value in the Set can be primitive value or object reference. Values in Set can be iterated in the insertion order.Each value in the Set is unique so a value will not be found twice in the Set. 2. Value equality The values in the Set…
-
Map in JavaScript
Map is a collection of key value pairs. Map allows both primitive and objects as key or value. Map at first looks like an object which also holds key value pairs, but it is different than object.
-
SOLID Design Principles
SOLID acronym stands for following design principles: Single Responsibility Principle, Open Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, Dependency Inversion Principle
-
Subscription in RxJS
1. Introduction A Subscription is an object that represents a disposable resource. Calling the subscribe() on an Observable object returns a Subscription object. Subscription has method unsubscribe() which disposes the resource held by the Subscription. 2. Methods of Subscription A Subscription object has two important methods: unsubscribe(): This method does not take any argument and…
-
Observer in RxJS
1. Introduction An Observer is a consumer of values delivered by an Observable. Observable has callbacks for each type of notification delivered by an Observable: next, error and complete. A typical Observer object looks like the following: 2. Using an Observer To use the Observer, provide it to the subscribe of an Observable: 3. Partial…
-
Observables in RxJS
1. Introduction Observables are lazy Push collections of multiple values. That is an Observable can push multiple values to its subscriber. The term lazy in the definition means that the Observable will not push values to the subscriber until subscribe is called. This is analogous to a function call, which does not execute until called.An…
-
Natural key and surrogate key
1. Natural Key A natural key is a type of unique key in a database which has an equivalent in the external world outside the database. Database tables are used to represent entities in the real world. A natural key is some unique attribute or group of attributes of the real world entity which uniquely…
-
CopyOnWriteArrayList in Java
CopyOnWriteArrayList is a thread-safe variant of ArrayList. All mutative operations (add, set and so on) are implemented by creating a new copy of the underlying array.
