Setup Firewall in Ubuntu 20.04 Server

Firewall is important in any server setup. It helps to allow required network traffic and restricts rest. Most importantly if firewall is not set correctly then it would open doors for the hackers. Following tutorial on setting up firewall in Ubuntu 20.04 Server is helpful to set it right. Login with your user name and […]

Introduction to Web Hosting

Web Hosting is essential for every web application. And if you are confused to decide which hosting is suitable for your project? Then, this step by step complete article is going to put light on web hosting in detail. At the end of this article you will be completely aware about the right hosting option […]

PHP MySQLi Delete Record

So far, I have discussed about connection establishment, create table, insert record, read records (select statement), update record. In this article we are going to learn about delete a record. Following is the table which I am going to delete a record. This table name is emp_info emp_id emp_name emp_age 1 Raj 22 2 Rahul […]

PHP MySQLi Update Records

In some cases, we may want to update table data using update sql statement. Lets see how can we update. The table which I am using to update record is as below. The table name is emp_info emp_id emp_name emp_age 1 Raj 22 2 Rahul 24 3 Vivek 26 4 Ajay 28 5 Suraj 29 […]

PHP MySQLi Read Records (Select Statement)

So far we have learned how to establish connection with mysql database using mysqli, create table, insert record. In this tutorial, we are going to learn how to print records from the table. For this we are going to use sql select statement. The table from which I am going to fetch record is as […]

PHP MySQLi Insert Record

In previous tutorial, we have learned how to create a table using mysqli and php. In this article we are going to learn how to insert record into table. For reference look at the below table. emp_id emp_name emp_age 1 Raj 22 2 Rahul 24 3 Vivek 26 4 Ajay 28 5 Suraj 29 In […]

PHP MySQLi Create Table

The first job, in php database project can be creating a table. In this article, we will learn how to create a table in mysql database using php and mysqli. (See following table example) emp_id emp_name emp_age 1 Raj 22 2 Rahul 24 3 Vivek 26 4 Ajay 28 5 Suraj 29 Lets see how […]

PHP MySQLi Establish Connection

In this first article of PHP MySQLi Tutorial, we are going to learn how to establish database connection with mysql database. Before proceeding further, you must have following knowledge Basics of PHP MySQL commands (create table, insert row, select row, update row, delete row etc.) What is MySQLi? MySQLi is a php based library which […]

Python PyMySQL delete record

So far, I have discussed about connection establishment, create table, insert record, read records (select statement), update record. In this article we are going to learn about delete a record. Following is the table which I am going to delete a record. the table name is emp_info emp_id emp_name emp_age 1 Raj 22 2 Rahul […]

Python PyMySQL Update Record

In some cases, we may want to update table data using update sql statement. Lets see how can we update. The table which I am using to update record is as below. emp_id emp_name emp_age 1 Raj 22 2 Rahul 24 3 Vivek 26 4 Ajay 28 5 Suraj 29 In the above table, lets […]

Python PyMySQL Create Table

The first job, in python database project can be creating a table. In this article, we will learn how to create a table in mysql database using python and pymysql. (See following table example) emp_id emp_name emp_age 1 Raj 22 2 Rahul 24 3 Vivek 26 4 Ajay 28 5 Suraj 29 Lets see how […]

Python PyMySQL Establish Connection

In this first article of Python PyMySQL Tutorial, we are going to learn how to establish database connection with mysql database. Before proceeding further, you must have following knowledge Basics of Python MySQL commands (create table, insert row, select row, update row, delete row etc.) To establish connection with a database like MYSQL server, we […]

Python how to check if list contains element?

In python, we can check if a list contains certain element. For this “in” keyword is helpful. Example selected_candidates=[“rahul”,”ajay”,”vijay”] #check if raju is present in the list if “raju” in selected_candidates: print(“Raju has been selected for the job”) else: print(“Raju has been disqualified for the job”) Output: Raju has been disqualified for the job.

Read html file in python beautifulsoup

Beautifulsoup is a powerful library that helps scrape complex to complex html website easily. Python+Requests+Beautifulsoup=Successful Web Scraping Read html file in python beautifulsoup To use beautifulsoup library, this library must be present in the system. If you are using pycharm, then go to file then project settings and install bs4. bs4 contains beautifulsoup library. Following […]

Python How to make a dictionary from two lists?

We have two lists. And we want to create a dictionary combining values of these two lists. In such case, we can create a dictionary from two lists as following way. Example name_list=[“rahul”,”vijay”,”ajay”] phone_list=[“1111″,”2222″,”3333”] #declare an empty dictionary phone_book={} for idnum in range(0,len(name_list)): phone_book.add(name_list[idnum],phone_list[idnum]) #lets print the dictionary print(phone_book) Output: { “rahul”:”1111″, “vijay”:”2222″ “ajay”:”3333″ } […]

Python how to check if string contains substring?

In certain situation, you may want to know whether a sting contains another sub-string. Then the helpful tool that eases the process of knowing this is, “in” keyword. It checks whether the supplied element is present in the target element or not. If element is present then it would return true otherwise it would return […]

How to make python print something multiple times?

Python has print function which prints the passed argument. And in some cases we may want to print a message multiple times. If we want to print something multiple times then for loop is an easy option. for _ in range(0,10): print(“hello friend”) Output: hello friend hello friend hello friend hello friend hello friend hello […]

Check if a python string contains a character

In some cases we may want to check if string contains a certain character. To do check presence of a character in a string in python, we can use the in keyword functionality. If element is present then it would return true other wise it would return false. Example sentence=”Orange is not apple” #lets check […]

Connect MS Access database in python (pyodbc)

MS access is also used as database to store and update data. In python projects we can use ms access as database and for that pyodbc library is required. Install pyodbc library Assuming you have prior known of python and library installation, run the following command in your terminal or command prompt. pip install pyodbc […]

How to select li element in selenium python?

In certain cases we may want to fetch data from list by using Selenium in Python. The simplest solution to target any element by its tag name is to use find_element_by_tag_name. Note: Selenium Python has similar function find_elements_by_tag_name. Do not use this one. It returns a list of targeted element. Select li element in selenium […]

How to launch Internet Explorer IE browser in selenium python?

Assuming you have prior knowledge of Python and Selenium, following are the step by step guideline to launch Internet Explorer browser in Selenium Python. To run internet explorer browser from selenium python, you must have to have internet explorer driver available in your system. You can download it from selenium’s official website. Selenium Official Website: […]

How to add new python interpreter in pycharm?

In mac OS and Linux OS, python older version is pre-installed. So if we run pycharm, then by default pycharm picks older version of python which is 2.7. But we want the latest version 3.0 as interpreter in pycharm. So following is the solution to add new python interpreter in pycharm. Open pycharm and launch […]

How to check if python is already installed?

Mac Operating System and Linux operating system has already python installed. Where as certain application needs python, so such application might have installed python in windows as well. So irrespective of the platform it is best to first check if python is already installed. How to check if Python is installed in windows 10? Open […]

Python Functions

So far we have seen using python created function for various purpose such as to know the length of list, sort list elements, print information etc. Can we create our own function? Yes. We can create our function in Python. Syntax def function_name(): //required code to accomplish a task User defined function should always begin […]

Python Set

Alike list and tuple, there is another kind of data type exist in python and that is Set. Set is unordered and unindexed. It means alike list and tuple, we can not access the elements of set using index number. Example: fruitnames={“Orange”,”Banana”,”Grape”} How to access elements of Set? By using for loop, we can print […]

Python Dictionary

There are situations where we may want to store key and value pair data in a variable. Dictionary Dictionary in python: Variable which holds data in key and value pair form is known as dictionary. Example: registration_numbers={“Rahul”:”99ik89lm”, “Ajay”:”99ik90lm”, “Vijay”:”99ik91lm”, “Sachin”:”99ik92lm”, “Krishna”:”99ik933lm”} How to print data from a dictionary variable in python? To print a value […]

Python Tuple

Python tuples are useful for listing elements (Objects). Tuple is quite similar to list but it has a difference. Tuple is slightly different than list. (I have discussed about list in one of the previous chapter) What is tuple? Tuple is collection of elements or objects. Objects of tuples are ordered in certain sequence. Which […]

Python List

List in Python programming is a type of variable which holds one or more than one elements. List Declaration We can use any name that has no space or any special character to declare a variable of type list. Example fruitnames=[“Orange”,”Banana”,”Grape”,”Pine Apple”,”Jackfruit”] roll_numbers=[101,102,103,104,105] While declaring list, square brackets are important. The starting square bracket, and […]

Python Loops

If a task is repetitive then its a loop. For example, if I want to print 100 for 100 times, then there are 100 loops. If I want to print all the names of class tenth 250 students, then here 250 loops are there. Now imagine, I need to print 10000 times the addition value […]

Python Different types of Operators

Operators in python programming are essential to perform various operations with more than one operands. For example, to perform addition operation between two the values of two variables we use addition operator. Similarly for subtraction we have subtraction operator. Lets know all these operator one by one. Addition Operator + Addition operator performs addition operation. […]

HTML Bold Tag, Italic Tag and Underline Tag

HTML has other essential tags such bold tag, Italic tag and Underline tag. Bold Tag Bold tag is used to set text as bold. Syntax <b>Some Text</b> Output Some Text Italic Tag Italic tag is used to set text as italic Syntax <i>Some Text</i> Output Some Text Underline Tag Underline tag is used to set […]

HTML Heading Tags H1, H2, H3, H4, H5, H6

Reader finds a content is easy to understand when the content is arranged in a proper structure. That is, content should begin with a heading text, and the rest content is divided into multiple sub heading texts. In a web page, we share a content with the reader. If the content is not well structured, […]

HTML Web Page Structure

HTML webpage has a structure which we are bound to follow. HTML Webpage Structure Every webpage must have two sections. head section body section How do we define head section? To define head section we use head tag. Head tag has opening and closing tag. (<head></head>) How do we define body section? To define body […]

Introduction to HTML for absolute Beginners

HTML is essential in designing webpages. No webpage is possible with out HTML. HTML is used to create webpage. What is HTML? HTML – Hypertext markup language is a language used to create and stylize HTML web pages. Who understands HTML? Any browser engine such as Chrome, Safari, Opera, Firefox, Internet Explorer understands HTML codes. […]

How to delay in Javascript?

In Javascript, we may face situation where we may want to make the javascript file to wait certain seconds. In simple language, how can we delay a function for certain amount of time. For this kind of requirement we use setTimeut function. SetTimeout Function setTimeout function is used to delay a process for certain amount of […]

How to get current full year using Javascript?

In some cases we may need to complete a task in loop. To handle such situation, we have for loop in Javascript. For Loop Lets begin with an example to understand the need of “for loop” Example Lets print 1 to 10 Solution: <script> var num=1; console.log(num); num++ // incremented the value by 1 console.log(num); num++ // […]

Javascript For Loop

In some cases we may need to complete a task in loop. To handle such situation, we have for loop in Javascript. For Loop Lets begin with an example to understand the need of “for loop” Example Lets print 1 to 10 Solution: <script> var num=1; console.log(num); num++ // incremented the value by 1 console.log(num); num++ // […]

Javascript If Else Statement

Before proceeding further lets first understand why if else if statement requirement came? Lets consider the simple situation, login process. A user is only allowed to access web pages of a website, if the user has logged in with valid credentials. See in the above case, “if” logic is there. Logic for login is as […]