Author: Editorial Team
-
many-to-one association in Hibernate
1. Introduction In this quick tutorial, we’ll discuss many-to-one association in Hibernate. Associations are one of the most frequently asked questions in interview. These could be very confusing and could lead to design issues. We’ll understand many-to-one association by writing a program. The many-to-one association is one of the most common and simple associations. This…
-
Lexical scope in JavaScript
A lexical scope is a scope that is defined at lexing time. In other words, lexical scope is based on where variables and blocks of scope are written. Let us understand this with the help of an example. There are three nested blocks in this code. The global scope, which has one identifier outerFunction. The…
-
Double not (!!) in JavaScript
Double not (!!) is used to convert any value to its corresponding boolean primitive. That is, a truthy value to primitive true and a falsy value to primitive false. The conversion is based on the truthy and falsy value of the operand used with double not (!!). How it works? In first step, first not…
-
Falsy in JavaScript
1. Introduction While writing JavaScript programs, it is not mandatory for you to provide only true or false in Boolean context. For example, you can use a number or a string as a condition in if: A falsy value is a value that is considered false in a Boolean context. JavaScript uses type coercion to…
-
generator and generator function in JavaScript
1. Introduction Regular functions return a single value which could be primitive or object. A regular function can not be used to return multiple values based on demand. Generators can do that. A Generator can be used to create a data stream. A Generator will return a value based on a certain logic, each time…
-
Executor framework in Java – an introduction
The executor framework is Java enables you to separate thread creation and management for the implementation of concurrent tasks. With executor framework, you don’t have to worry about creation and management of threads, only create tasks and submit to the executor. Let us see important classes and interfaces of executor framework. 1. Executor This is…
-
getter in JavaScript
1. Introduction Sometimes, you may to access a property which is dynamically calculated. However, you can do this with the help of a method, but you are not willing to use a method. In such case, you can use get syntax. Let us understand this with the help of an example. Suppose there is an…
-
Object.freeze() in JavaScript
1. Introduction In this tutorial, we’ll discuss freeze() method of Object. The freeze() method freezes an object. Frozen object here means: new properties can not be added to a frozen object. existing properties can not be removed. values of existing properties of a frozen object can not changed. the prototype of a frozen object can…
-
Introduction to JavaScript Promise
1. Introduction Suppose you ordered a burger in a restaurant. The cashier will take your order and will promise you that the burger will be delivered. After some time once the burger is available, your burger will be delivered. It is also possible that the burger will not be delivered due to some problem. The…
-
Bootstrap Hibernate – Create SessionFactory
In this tutorial, we’ll create our first Hibernate application. We’ll understand how to create SessionFactory and will use it to interact with MYSQL database to get database version. 1. Create SessionFactory in Hibernate The starting point of writing a Hibernate program is to create a SessionFactory. Bootstrapping APIs are redesigned in Hibernate 5.0. The way…
