Tic Tac Toe is well-known two square board game in which two players have to put their mark on certain spaces in turns. The player that gets three of their marks in a row either in a horizontal, vertical, or diagonal manner wins that game. If all turns are used and no player gets the line, then the draw is the end of the game. In this article, we will see how to build a Tic Tac Toe game in plain HTML, CSS, and JavaScript. The code allows a two-player mode game and additional features including the Reset button, an ... Read More
As an efficient containerization tool, Docker is used in applications across numerous sectors. Developers find it a very useful tool, and they don't need to rely on the target system to deploy their program in production or any other environment.It is a standard procedure to add users to a docker group. You can communicate with the docker daemon without sudo privileges by adding the user to the docker group. Superuser capabilities are usually needed to run Docker commands without adding a user to the Docker group. You can execute the commands without having docker access by adding a user to the ... Read More
In this article, we will learn to illustrate the use of binary literals in Java. This feature is particularly useful when working with low-level data manipulation, such as in embedded systems or when dealing with bitwise operations. What is Binary Literal? A binary literal is a number that is denoted using binary digits that are 0s and 1s. The values written in data types – byte, int, long, and short can be easily expressed in a binary number system. The prefix 0b or 0B is added to the integer to declare a binary literal. For example − ... Read More
In this article, we will learn the ResultSetMetaData getColumnDisplaySize() method with an example in Java. This is useful when you need to understand the display requirements of a column in a result set. Method Signature The getColumnDisplaySize(int column) method of the ResultSetMetaData class in Java retrieves the maximum width of the specified column, measured in characters. int getColumnDisplaySize(int column) Parameters: The 1-based index of the column for which you want the display size. Returns: The maximum number of characters that can be displayed for the specified column. ... Read More
Most modern operating systems rely on disk I/O caching to improve system performance by storing frequently accessed data in memory. However, there are times when you might want to clear these caches, such as when benchmarking disk performance, troubleshooting, or ensuring that data is read from the disk rather than memory. This tutorial will guide you through the process of purging disk I/O caches on a Linux system but first let's dive into brief detail on what disk I/O caches are. Understanding Disk I/O Caches Linux uses a portion of system RAM to cache disk reads and writes, which speeds ... Read More
WhatsApp is one of the most popular messaging applications worldwide, known for its simplicity and robust features. It allows you to share pictures, videos, make audio and video calls, one-to-one or in groups, with your friends and family. Moreover, there are plenty of groups and channels in WhatsApp for everyone which you can explore and join as per your interests. While it is primarily designed for mobile devices running Android and iOS, many users wish to access it on their desktop systems, including those running Linux. For Windows and Mac systems, WhatsApp provides official binaries for installation on your desktop ... Read More
IP address stands for Internet Protocol address, which is a unique string of numbers assigned to each device connected to a computer network that uses the Internet Protocol for communication. A system needs an IP address for various networking tasks in Linux, like setting up network connections, configuring services like file sharing, SSH or FTP or troubleshooting network-related issues, etc. An IP address can be classified into two main categories, public and private. A public IP address usually can be accessed from the Internet, whereas private addresses are reserved for internal use within your private network without being directly exposed. ... Read More
Converting images to grayscale is a common image processing task that can be easily accomplished using command-line tools in Bash. This tutorial will show you several methods to convert images to grayscale using popular image manipulation utilities. Using ImageMagick ImageMagick is one of the most powerful and widely used command-line tools for image manipulation. Before you can use it, you must install it on your system. In Ubuntu, you can install it using apt as − # Debian/Ubuntu $ sudo apt install imagemagick # RedHat/CentOS $ sudo dnf install ImageMagick After installation, here are some of the methods ... Read More
In an operating system, file extensions usually help identify file types and ensure proper handling by applications. When working with files in a Unix-like operating system including Linux, you may encounter situations where files sometimes lack extensions, making it difficult to identify their types or open them with the appropriate applications. Fortunately, Bash, the default shell on many Linux distributions, provides powerful tools to simplify the process of adding file extensions. This tutorial will guide you through various options that you can use to add file extensions to files using Bash. Adding File Extension using the mv Command The simplest ... Read More
Artix Linux is a fast, customizable and user-friendly Linux distribution based on Arch Linux. It is now more stable and secure than its predecessors while using real init systems instead of systemd. Artix Linux can be installed either by console (text-based) or GUI installer. Although GUI installers are an easier and faster option at least for beginners and novice users. In this article, we'll cover installation of Artix Linux via GUI installer method. Besides there are some pre-requisites that you need to have on your system before beginning the installation, which we'll cover next. Prerequisites Ensure that VirtualBox is installed ... Read More