A command line or terminal is an important component of the Linux operating system, as it allows for inclusive administration and management of the operating system as a whole. Even if we are talking about a Linux distribution that uses a graphical interface, you will still need a terminal to unleash all the power and potential of Linux. Linux provides a "shell" to work on the command line. The shell is a command interpreter responsible for executing commands based on what you enter on the command line. The most popular shell is bash (short for "Bourne Again Shell, " ... Read More
In SQL databases, it is often necessary to retrieve the list of table names within a database to understand the structure or to perform the certain operations. Each SQL-based database system offers specific ways to query its metadata to extract the table names. In this article, we will explore how to get the names of tables in popular relational database systems including the MySQL, SQL Server, PostgreSQL and Oracle. We will cover the built-in SQL queries and functions that are commonly used for this task. Need to Retrieve Table Names? Database Exploration: When working with ... Read More
Arrays are linear data structures used to handle data in programming. Sometimes while dealing with arrays we need to add new elements to an existing array.In this article, we will discuss several methods to add elements to the end of an array in PHP, complete with code examples, outputs, and an analysis of the time and space complexity of each approach. Following are different approaches to adding elements to an array − Using square brackets [] We add an element to the end of an array in PHP is by using square brackets []. This syntax is only suitable when ... Read More
In order to delete the middle element of a stack, then first we need to remove the elements above the middle element. After removing the middle element, we restore the elements above it to maintain the original sequence. We can achieve this using a recursive approach, as explained step-by-step below. We cannot delete the middle element of the stack directly because, according to the stack property, we can perform only push and pop operations on the top of the stack. Steps to Delete the Middle Element of a Stack Step 1: Determine the Position of the Middle Element, First ... Read More
In this article, we will learn how to solve the "Minimum Number of Jumps to Reach the End" problem using Java. Let's break it down step-by-step. The idea is to find the smallest number of jumps needed to get from the start to the end of an array. Each element in the array represents the maximum number of steps you can take from that position. Problem StatementGiven an array arr[], where each element represents the maximum number of steps you can move forward from that position, the goal is to start from the beginning of the array and ... Read More
When exploring machine learning, and artificial intelligence especially in probabilistic models and time-series analysis, you’ll likely come across two crucial concepts: Discrete & Continuous Markov Chains as well as Hidden Markov Models. Of them, the first one is the approach based purely on probability theory while the second one has certain differences in the structure, application and in fact, in the complexity level. To effectively use these differences it is crucial to comprehend them by employing into practical application such as speech to text conversion, finance, and natural language processing. This article will provide an overview of Markov Chains and ... Read More
A Git server on Ubuntu can help you host your repositories on a centralized server. This is particularly important for anyone working in a development team. In this tutorial, we will explain the details of setting up a Git server on Ubuntu including the installation of Git, Users and other Security considerations. What You’ll Need A machine with Ubuntu 20.04 or higher and access to a terminal and a basic knowledge of Linux as an operating system Root or sudo access to install software Basic knowledge of ... Read More
In this article, we will learn how to sort lists containing null values in Java and ensure these nulls are kept at the bottom while upper elements remain in order. This can be done using Comparator.nullsLast, which sorts the non-null elements and places all null elements at last. Problem Statement A list of strings with some string values and nulls is given. Write a Java program to sort a list placing nulls in the end. Input Initial List = ("Jack", null, "Thor", null, "Loki", "Peter", null, "Hulk") Output Initial List = [Jack, null, Thor, null, Loki, Peter, null, Hulk] List ... Read More
In this article, we will learn how to use the Properties class in Java to store and display key-value pairs. The Properties class is useful for handling configuration settings or storing data in a structured way, where both keys and values are strings. By using the put() method, we can easily add values to a property list and later retrieve or display these key-value pairs. This approach provides a simple and efficient way to manage data in a key-value format in Java applications. Problem Statement A properties list contains country-year pairs. Write a Java program to store values ... Read More
In this article, we will learn to sort the elements of the stack in descending order. A stack is a data structure that works on the LIFO (Last In First Out) principle which means that the last added item is removed first. One real-life example of a stack is browser history where the last used website appears first. In this article, we are going to discuss, how we can sort the element of stack in descending order in Java. Problem Statement In the given problem, we have a stack of unsorted integer elements, which we have to sort in descending ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP