≡ Menu

12 Essential Python For Loop Command Examples

Python For LoopFor loop is an essential aspect of any programming language.

In python, for loop is very flexible and powerful.

In this tutorial, we’ve explained the following Python for loop examples.

  1. Python For Loop for Numbers
  2. Python For Loop for Strings
  3. Python For Loop Using Default Range Function
  4. Python For Loop With Custom Start and End Numbers
  5. Python For Loop With Incremental Numbers
  6. Python For Loop Range with Negative Values
  7. Continue Statement Inside Python For Loop
  8. Break Statement Inside Python For Loop
  9. Can a For Loop itself have an Else without If?
  10. Else and Break Combination Behavior Inside Python For
  11. Nested For Loops in Python
  12. Handling List-of-Lists in Python For Loop

[continue reading…]

If you are running VMWare ESXi, after you make certain configuration changes that doesn’t have anything to do with ip-address change, you might get the following error message during the system startup.

“Bringing up interface eth0: Error, Some other host already uses address 192.168.101.10 [FAILED]”

As you can imagine, this will not start the network, and you cannot connect to the host node that is running on the VMWare ESXi.

Most of the time, this particular issue happens on ESXi host that is running Linux distros. In this particular example, I had this issue on CentOS 6 host.

In this quick article, we’ll explain how to fix this issue.
[continue reading…]

MariaDB Create Alter DropOnce you’ve installed and configured MySQL or MariaDB, the first step is to create a database.

Only after creating a database, you can create tables and insert records.

This tutorial explains the following examples that are used to create and manipulate a MySQL database:

  1. Create New MySQL Database
  2. Create MySQL DB with Specific Character Set (UTF8)
  3. Delete Existing MySQL Database
  4. Create MySQL DB Only If it Doesn’t Exists
  5. Drop MySQL DB Only If it Exists
  6. Alter Database Characteristics for db.opt
  7. Upgrade Data Directory Option for Migration and Encoding

[continue reading…]

Tomcat 9 InstallApache Tomcat is an open source Java server.

You need Tomcat when you want to deploy and execute a Java application that is written in any of the Java technologies including Java Servlet, JSP, etc.

This tutorial explains how to install the latest Apache Tomcat version 9.x on Linux platform
[continue reading…]

3 C Program Examples to Create a File with Data

This tutorial explains how to create a file from a C program.

In these examples, we’ll create new HTML files and write some content to it.

The content of the file will be different, but these three C example program should explain you how to use the c file functions like fopen, fprintf, etc., to create and manipulate files.
[continue reading…]

MariaDB Install and ConfigStarting from CentOS 7, you will not see a package called mysql-server in the yum repository.

Now the package is called as mariadb-server.

The original MySQL is now owned by Oracle corporation.

But MariaDB is a fork of the original MySQL database. Just like the original MySQL, MariaDB is also open source, developed by open source community, maintained and supported by MariaDB corporation.

From our point of view, only the package name is changed. MariaDB is still MySQL, and all the mysql command line utilities are still exactly named the same including the command called mysql.

This tutorial explains step-by-step on how to install and configure MariaDB on CentOS or RedHat based Linux distros.
[continue reading…]

How to Install Java 8 JRE and JDK from RPM file on Linux

Java JRE JDK InstallJRE stands for Java Runtime Environment.

JDK stands for Java Development Kit.

In most situations, if you want to run a Java application, you just need to install Only JRE.

But, if you are doing some development work, or compiling an application that requires Java SDK, then you have to install JDK.

This tutorial explains how to install JRE only, JDK only, and both JRE JDK together.
[continue reading…]

Git Branch CommandOne of the most powerful feature of git is its ability to create and manage branches in the most efficient way.

This tutorial explains the following git branch command examples:

  1. Create a New git Branch
  2. Delete a Git branch
  3. Delete remote-tracking branches
  4. Switch to a New git Branch to Work
  5. Create a New Branch and Switch Immediately
  6. Working on a Git Branch (Making Changes)
  7. View all Local git Branches
  8. View Remote git Branches
  9. View Merged and Not-Merged Local Git Branch
  10. Rename a Git Branch
  11. Force Rename a Git Branch
  12. Display Git Branch in Color
  13. Display Full or Partial SHA1 Git Commit Values
  14. Create a Branch at a Specific Location
  15. Display Specific Git Branch Details

[continue reading…]