Gitlab offers various features and one of them is pipeline. Gitlab pipeline is used to perform continuous integration, continuous deployment ,code quality checks, security checks, artifact storage etc. The .gitlab-ci.yml file plays a vital role in the gitlab pipeline. All the pipeline configuration is written in the .gitlab-ci.yml file.CI/CD pipeline can run automatically when events are triggered like pushing to a branch , merging to a branch etc. Pipeline Components Jobs and Stages together form the pipeline. YAML keywords are used to define the stages and jobs. Jobs: Jobs run specific commands to achieve a single goal. For example a ... Read More
In this article, we will learn to achieve the same result as $(document).ready in JavaScript. In jQuery, $(document).ready() is a widely used function that ensures the DOM (Document Object Model) is fully loaded before executing JavaScript code. Different approaches The following are the approaches to achieve the same result as $(document).ready in JavaScript − Using document.readyState Using DOMContentLoaded Event Using document.readyState In jQuery, if you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the ... Read More
In this article, we will learn to create an array of objects in Java. An array of Object classes can be created that can accept any type of object. During the operation on such an array, instanceof operator can be used. Different Approaches The following are the two different approaches to creating an array of objects in Java − Using an Object[] Array Using a Class-Specific Object Array Using an Object[] Array Java provides a built-in Object class, which is the superclass of all classes. This means an array ... Read More
In this article, we will learn to check if a particular value exists in TreeMap in Java. A Java TreeMap is an ordered map that keeps key-value pairs in ascending order of keys. Although it is efficient to look up a key, checking for a value is inefficient since one has to iterate over the values. What is TreeMap? A TreeMap is a Red-Black tree-based implementation it is a part of java.util package and implements the NavigableMap interface. It maintains the natural ordering of keys or a custom order defined by a Comparator. Since it is sorted by keys, searching ... Read More
In this article, we will learn to create an Array in Java. Arrays provide an efficient way to manage and access data collections, making them essential for many programming tasks. What is an Array? A Java array is an ordered, fixed-size collection of elements of the same data type. Each element in an array is kept at a specific index, beginning with 0. Java arrays may store primitive data types (int, double, char) and objects (like String, Integer). Creating an Array In Java, you can create an array just like an object using the new keyword. The syntax of creating ... Read More
To dockerize an ExpressJS app, we will be going through a detailed stepwise explanation in this article. Containerization is becoming an essential in the software development process to ensure that the software is developed and deployed in different environments and in a consistent manner. Docker is the most popular containerization tool that helps in packaging an app and its dependencies. Problem Statement This article focuses on the challenges of deploying Node.js applications due to dependency conflicts, environmental issues, and system-specific settings. In the traditional way of deployment, the runtime environment has to be set up manually which resulted in ... Read More
In this article, we will write a C++ program that implements a Max Heap. A Max Heap is a binary tree where the value of each node is greater than or equal to the values of its children. We will explain how to create a Max Heap using arrays and implement operations like insertion and deletion. The article will cover the following topics: What is a Heap? What is Max Heap? What is Heapify? Max Heap Implementation Deletion from ... Read More
Separating objects based on properties in JavaScript means rearranging a group of objects into a new structure where objects that share the same value for a specific property are placed together. Objects are collections of key-value pairs. It stores large data as a key with associated information as its value. In JavaScript, you often need to group objects inside a larger object based on certain properties. Separating objects based on properties in JavaScript can be done by writing a simple function using the reduce method. In this article, we will understand how to do this effectively. Understanding the Problem ... Read More
Extracting values between various square brackets can be done using JavaScript regular expressions. The regular expressions in JavaScript are useful for extracting values enclosed within different types of brackets, such as square brackets ([ ]), curly brackets ({ }), and parentheses "( )". In this article, we'll look at how to use JavaScript's RegExp to find and get content that is inside square brackets easily. Understanding JavaScript RegExp Regular expressions (RegExp) are patterns used to match and manipulate strings in JavaScript. JavaScript RegExp helps you find and get text that is inside specific brackets by using patterns. The ... Read More
Checking whether a number is NaN (Not a Number) or finite is important while working with numerical computations in JavaScript. NaN (Not a Number) indicates a value that can't be represented as a number, often occurring from invalid operations like dividing zero by zero (0/0). Finite numbers are all real numbers in JavaScript that are neither Infinity, -Infinity, nor NaN. JavaScript provides several built-in methods to determine if a value is NaN (Not a Number) or if a number is finite. In this article, you will understand how to check if a number is NaN or finite using these built-in ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP