Author: Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Sometimes you may face issue with your WordPress blog with error message “Error establishing a database connection”. This will make your site unavailable for you and users. You can’t access your WordPress admin dashboard. This can be the frustrating time to you. This tutorial will guide you step by step to find out the cause and fix it. 1. Check MySQL Server First, check if MySQL server is up and running. You can use below command to connect your MySQL server. This will insure that your database server is running properly. $ mysql -u <username> -p If you don’t have…

Read More

Run Java Program in Command Line. To run a Java program, you first need to compile it. After compiling the java program a .class file created with the class name. Now you can run this class file.To compile java programs you must have JDK installed on your system. If you don’t have already installed, visit one of following links to install and configure Java on your system. Run Java Program in Command Firstly, create a sample Java program in a .java file. Add below code to HelloWorld.java file and save it. The file name must be the same as class…

Read More

PowerShell is a tool built into Windows that helps you automate tasks and control different parts of your computer. However, when you try to run PowerShell scripts, you might see an error message saying, “Running scripts is disabled on this system.” This happens because, by default, PowerShell is set to block scripts for security reasons. In this article, we will explain how PowerShell handles script permissions and show you how to fix this error so you can run scripts. Understanding PowerShell Execution Policies PowerShell uses different settings, called execution policies, to control if scripts can run. There are four main…

Read More

In the Linux ecosystem, mounting and unmounting disks are crucial operations that allow users to access and manage storage devices efficiently. This guide aims to provide a practical approach to understanding and executing these operations, enabling even beginners to handle their storage needs confidently. Introduction Mounting is the process of making a storage device accessible to the system by assigning it a specific directory (known as a mount point) in the directory tree. Unmounting, conversely, is the process of detaching the storage device, making it inaccessible to the system. These operations are fundamental for managing external hard drives, USB drives,…

Read More

Java is an object orientied programming languege. In Java you can use Integer.parseInt() or Integer.valueOf() functions to convert String value to an int value. In any case String is not a convertible then NumberFormatException will occur. #1. Using Integer.parseInt() Integer.parseInt() converts string value and returns an int primitive as result. For below example, first, we store 5 as a string value to id variable. Then convert it to integer and save to result variable.

Save the above content in ConvsertStringToInt1.java file and compile and run this program. Compile: javac ConvertStringToInt1.java Run: java ConvertStringToInt1 5 #2. Using Integer.valueOf() Integer.valueOf() also…

Read More

If you have already installed Java on Windows systems. Then you need to set the JAVA_HOME environment variable to make it work properly. Additionally, you also need to add java bin folder location in PATH environment variable. This tutorial will help you to set JAVA_HOME on Windows 7/8/10 operating systems. Step 1 – Edit Environment Variables You can set the environment variables by opening the system properties: Type sysdm.cpl on run window or Right-click on My Computer and select Properties. Go to Advanced tab. Click Environment Variables… button. Step 2 – Set JAVA_HOME on Windows Now click on the New…

Read More

Go, also known as Golang, is a popular open-source programming language developed by Google. It’s known for its simplicity, efficiency, and strong support for concurrent programming. In this guide, we will walk you through the steps to install Go on a Debian Linux system. Prerequisites A Debian-based Linux system Access to a terminal Basic knowledge of Linux commands Step 1: Update Your System Before installing any new software, it’s a good practice to update your system. Open your terminal and run the following commands: sudo apt update sudo apt upgrade This process will ensure that all your system’s packages are…

Read More

PHP, a server-side scripting language, is a cornerstone of web development, enabling dynamic content creation on web pages. One fundamental aspect of many PHP applications is the ability to handle and manipulate date and time. This article provides an in-depth guide on how to retrieve and format the current date and time in PHP, a crucial skill for any developer working with scheduling, timestamps, and time-sensitive data. Date and Time Functions in PHP PHP offers a range of built-in functions for date and time manipulation. The most commonly used functions are: date(): This function returns the current date and time…

Read More

JSON, or JavaScript Object Notation, is a lightweight data-interchange format that is easy for humans to read and write. Node.js has built-in support for parsing JSON files, making it a breeze to work with JSON data. To parse a JSON file in Node.js, you can use the built-in JSON module. The JSON module provides an efficient way to parse and stringify JSON data. It also provides a number of helpful methods for working with JSON data. This tutorial will help you to read JSON file using Node.js uses readFile and readFileSync functions of the jsonfile module. Installing Node Module For…

Read More

Accessing computers remotely has become an important part of the IT world especially in today’s scenario where everyone is working from home due to covid19. There are mainly two ways of connecting machines remotely depending on your operating system: SSH for Linux RDP for Windows In this tutorial, we will see how to use SSH to connect to a remote server? What is SSH? SSH stands for Secure Socket Shell and it is a network protocol used to access a system remotely in a secured way. SSH is an application layer protocol and it allows you to access another machine…

Read More