Photo by Ivan Bandura on Unsplash

In this article, I’m going to explain some of the best practices in Angular application development that I’ve learnt and used in XmlToJson project.

1. Use const when the value is not going to be reassigned

When a variable is about to point to a constant reference always, we can simply put instead of . It helps to improve the code readability and throws a compile-time error when we mistakenly reassign a value.

2. Isolate API calls in service

We can put API calls service and invoke them in components where necessary. Whenever we need to change the logic of API calls, it’ll be easy to check out in that dedicated API service directory.


Photo by Robert Collins on Unsplash

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.😃

Application Overview

Before going to the implementation, we’ll take a look at how our application will be constructed.


Photo by Alex Alvarez on Unsplash.

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.

What is a Character in Java?

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';

What is a String in Java?

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";

What is an Array in Java?

Arrays are fundamental data structures that can…


Photo by MI PHAM on Unsplash

In this article, we’ll look at how to use join on more than two tables and aggregate the result using the function in Microsoft SQL Server.

If you don’t know about Microsoft SQL Server, I’ll briefly explain to you what it is.

😃

What is Microsoft SQL Server?

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 and to convert a string to an integer.

1. Use Integer.parseInt() to Convert a String to an Integer

This method returns the string…


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.

How to reset your root password — step-by-step

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…


What is VirtualBox?

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.

Why You’ll Need It

  • Oracle’s VirtualBox is easy to install and use
  • It’s free
  • You can run and experience any operating system safely
  • If you’re…

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.

Terms in the Relational Data Model

  1. Relational model: a collection of relations.
  2. Relation: table
  3. Tuple: row
  4. Attribute: column
  5. Domain: a set of atomic values
  6. Atomic values: single values
  7. Degree of a relation: number of attributes in a relation
  8. Cardinality: number of tuples in a relation.
  9. Relation schema: describes the relation by specifying relation name, list of attributes, and degree of the relation.

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.

Photo by Yancy Min on Unsplash

Let’s dive in!

Thanoshan MV

Undergraduate | Technical Writer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store