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

Prevent SQL Injection PHP

This tutorial will help you to prevent SQL inject in PHP. In this tutorial first, check a basic example of SQL injection process. How can users steal data from your website using SQL injection? This tutorial also includes methods to prevent SQL injection using PHP-MySQLi and PHP-PDO drivers. Simple SQL Injection Example For example, A have a website for Bank. You have provided a web interface to bank customers to view their account number and balance. Your Bank website uses URL like http://example.com/get_account_details.php?account_id=102 to fetch details from the database. For example get_account_details.php have code something like below.

Customers accountId…

Read More

The Python os.path module is used for the file or directory pathename’s manipulations. The method isfile() of this module is used to check if any file is available or not. Similarly exists() function returns true for files and directory exists. This tutorial includes: Check if file exists in Python Check if file is readable in Python Create directory if not exists in Python 1. Check if file exists For example, To test how isfile() and exists() functions work. Create a TestFile.py file using following content and execute it python. isfile() – function check if given input file exists and is…

Read More

How to upgrade to Ubuntu 17.04 from Ubuntu 16.10. Ubuntu 17.04 (Zesty Zapus) is a non LTS release. We don’t recommend users with production systems to upgrade this. The programmers or personal desktop users can upgrade to this release and enjoy its features. This tutorial will help you to Upgrade to Ubuntu 17.04 in easy way. Find details about Ubuntu 17.04 release date and features. Prerequisites This tutorial assumes that you have a running Ubuntu 16.10 system. Also, assumes you have shell access of system with sudo privileges. Step 1. Perform Backups We strongly recommended to backup all your important…

Read More

Managing updates on your Ubuntu system is important to keep everything running smoothly. Sometimes, you might want to keep certain software packages at their current versions and not let them update. This is called excluding packages from upgrades. In this guide, we will show you how to stop specific packages from being updated using the apt-get upgrade command. Even if you are new to Ubuntu or computers in general, don’t worry! We will explain everything in easy steps so you can follow along. By the end, you’ll know how to keep certain packages from updating, which can help keep your…

Read More
Visual Studio Code Editor IDE

Visual Studio Code is a lightweight source code editor for JavaScript, TypeScript and Node.js Applications. It also has extensions for multiple other programming languages like C++, C#, Python, PHP, Go, etc. This tutorial will help you to install Visual Studio Code on OpenSUSE and SUSE Linux Enterprise operating system. How to Install Visual Studio Code Editor in Ubuntu & Debian How to Install Visual Studio Code Editor in Fedora & CentOS Note: Visual Studio Code is Different that Visual Studio IDE Step #1. Enable Package Repository Create a new file /etc/yum.repos.d/vscode.repo and edit in text editor. sudo vim /etc/yum.repos.d/vscode.repo Now…

Read More
Visual Studio Code Editor IDE

Visual Studio Code (not Visual Studio IDE) is a lightweight source code editor for JavaScript, TypeScript, and Node.js Applications. It also has extensions for multiple other programming languages like C++, C#, Python, PHP, Go, etc. This tutorial will help you to install Visual Studio Code on CentOS, RHEL, Fedora, and its derivatives systems. Remember that Visual Studio Code is a different application than Microsoft Visual Studio IDE. How to Install Visual Studio Code Editor in Ubuntu & Debian How to Install Visual Studio Code Editor in SEL & openSUSE Step 1 – Enable Yum Repository Visual Studio Code provides an…

Read More
Visual Studio Code Editor IDE

Visual Studio Code is a lightweight source code editor for JavaScript, TypeScript and Node.js Applications. It also has extensions for multiple other programming languages like C++, C#, Python, PHP, Go, etc. This tutorial will help you to install Visual Studio Code editor on Ubuntu, Debian, Linuxmint, and its derivatives systems. How to Install Mono Framework on Ubuntu This tutorial covers two methods for install VS Code on Ubuntu, Debian, and Linux Mint systems. How to Install VS Code on Ubuntu using Snap The Visual Studio Code is officially distributed as a Snap package in the Snap Store. Also, most of…

Read More
exclude specific packages from Yum Update Yum

During the full update or automatic packages upgrade process, sometimes packages are upgraded which is not required. Sometimes this causes serious issues on the server. For example, You need to exclude kernel, PHP, MySQL and Apache packages from getting updated while updating the system via yum. This tutorial will help you find the answer of how to exclude packages from the yum update? How to use exclude option with yum? How to prevent packages from auto update via yum? How to exclude only 32-bit or 64-bit packages? How To Exclude Packages from Apt-Get Upgrade 1. Exclude Packages with Command You…

Read More

Docker, the de facto standard in containerization, provides an efficient way to package and distribute applications. As a developer or system administrator, there are times when you might need to get shell access to a running Docker container. This could be for debugging purposes, application management, or other various tasks. This guide provides a step-by-step process on how to gain shell access to your running Docker containers. Prerequisites Before we delve into the process, ensure that you have Docker installed and running on your machine. This guide assumes you have a basic understanding of Docker concepts such as images, containers,…

Read More

As other programming languages, Java also provides ternary operator. The ternary operator is the simple one liner statement of an if-then-else statement. A ternary operator uses ? and : simbles. A simple ternary operator works similar to the if-then-else statement. If any condition evaluates to true then true statement executed else false statement executed. Below is the basic syntax of ternary operator in java: Syntax of ternary operator condition ? trueStatement : falseStatement Basically, there are 3 parts of statement seprated with ? and : symbols. Condition : First part is the condition section. trueStatement : Second is the code…

Read More