Before jumping into the development of complex CLI applications with advanced procedures and make use of other packages and libraries/tools, first, we need to understand the core concepts of making a CLI application.
After reading this article, you’ll understand the concepts of making a CLI, factory design pattern, and will be able to create CLI applications using any language.
In this article, we’ll see how we can create a simple TypeScript CLI that can run using Node.js.😃
Before going to the implementation, we’ll take a look at how our application will be constructed.
In this article, we’ll look at how to convert a string to an array of characters in Java. I’ll also briefly explain to you what strings, characters, and arrays are.
Characters are primitive datatypes. A character is a single character enclosed inside single quotation marks. It can be a letter, a digit, a punctuation mark, a space or something similar. For example:
char firstVowel = 'a';
Strings are objects (reference type). A string is made up of a string of characters. It’s anything inside double quotation marks. For example:
String vowels = "aeiou";
Arrays are fundamental data structures that can…
In this article, we’ll look at how to use join on more than two tables and aggregate the result using the function
STRING_AGG() in Microsoft SQL Server.
If you don’t know about Microsoft SQL Server, I’ll briefly explain to you what it is.
Microsoft SQL Server is a Relational Database Management System that revolutionized how businesses handle data. It helps to store and manage data.
If you’re familiar with other relational database management systems such as MySQL, or PostgreSQL then picking up Microsoft SQL Server is easy.
I’m running on the default instance of SQL server.
Now, let’s consider…
Computer-generated random numbers are divided into two categories: true random numbers and pseudo-random numbers.
True random numbers are generated based on external factors. For example, generating randomness using surrounding noises.
But generating such true random number is a time-consuming task. Therefore, we can utilize pseudo-random numbers which are generated using an algorithm and a seed value.
These pseudo-random numbers are sufficient for most purposes. For example, you can use them in cryptography, in building games such as dice or cards, and in generating OTP (one-time-password) numbers.
In this article, we will learn how to generate pseudo-random numbers using
String objects are represented as a string of characters.
If you have worked in Java Swing, it has components such as JTextField and JTextArea which we use to get our input from the GUI. It takes our input as a string.
If we want to make a simple calculator using Swing, we need to figure out how to convert a string to an integer. This leads us to the question — how can we convert a string to an integer?
In Java, we can use
Integer.parseInt() to convert a string to an integer.
In Linux, when you forget your account password, you can easily reset it using a root account. But when you forget your root account password, then you’re in a bad situation.
You can’t reset your root account password using a regular user account as a user account can’t perform such tasks in general.
In this article, we’ll be covering how to recover your CentOS root password. So let’s see how to do it.
In CentOS, it’s possible to have the scripts that run from the initramfs debug the shell at certain points, provide a root shell, and continue when that…
Oracle VM VirtualBox is a cross-platform virtualization application developed by the Oracle Corporation. It allows users to install operating systems on virtual hard disks such as Windows, macOS, Solaris and Linux.
As an example, you can run Windows and Linux on your Mac, run Windows server on your Linux server, or run Linux on your Windows PC while running your other existing applications.
Disk space and memory are the only problems that you’ll face when installing multiple virtual machines.
In this article, we shall consider key concepts of the relational data model and relational database constraints.
First, let us consider terms in the relational data model.
For example, a relation schema for student:
student(id, name, phone, address, age, gpa)
student is a relation…
Let’s say we have submitted a pull request to a public repository long ago. That repository’s main branch is updated often since then. Now that repository’s maintainer wanted to merge our pull request but our pull request branch is some number of commits behind their master branch. Therefore we need to update our pull request (branch) without any conflicts.
I had a similar experience.
In this article, I will explain you how to update pull request branch.
Let’s dive in!
Threads share memory and resources (data, code etc.) Threads execute concurrently. Hence, threads can access common resources simultaneously. This may bring us some undesirable outcome.
Synchronization prevents threads from accessing common resources simultaneously. It allows a thread to access a resource at a time.
Each object has a lock. If one thread has gained that object’s lock, the other threads will have to wait until that particular thread releases it. In this way, a thread can access a resource at a time.
We can use
synchronized non access modifier to gain object’s lock. …
Undergraduate | Technical Writer