Implementation of Binary Trees in C++

A binary tree is a data structure with a finite set of nodes consisting of: A unique node with no parents called root and zero or more subtrees. Every node can be connected to an arbitrary number of nodes, called children. Nodes with no children are called external nodes or leaves. Internal nodes are the... » read more

Introduction to DNS lookup function in PHP

In this example, you will learn about the DNS look function in PHP and how to use it. For demonstration purpose, we will create a simple HTML form which takes domain name from as the user input. The form will be submitted to practice_ac.php which contains the PHP code to lookup the DNS record of the domain... » read more

Search an element in Binary Search Tree using C++

The Binary search tree is a data structure consisting of nodes. The nodes are either null or have reference to other (child) nodes. Every node can have up to 2 nodes, called the left node or the right node. Each node will also contain a value, which will determine where these nodes are placed within... » read more

Implementation of Radix Sort in C++

Radix sort is a sorting algorithm that is used to sort numbers. For example, if we are dealing with unsorted numbers, we know that these numbers are formed using digits from 0 to 9. So we need ten places labeled 0 to 9 to unsorted numbers. Radix Sort in C++ So, let’s get started with... » read more

Find the number of lines in a text file using C

The following code will find the total number of lines in a text file using C. The code uses C programming language’s built-in functions to access, open, read and count the number of lines of the text file. Number of lines in a text file using C #include <stdio.h> int main() { FILE *fptr; int... » read more

Filtering DataTable with Select Method using C#

DataTables are used to represent the data in a tabular format with several rows, columns, and constraints. There are several methods provided by the DataTable class for our easiness. Out of them, we will be talking about the Select() in this article. Select method is used to get the array of data of DataRow objects.... » read more

How to edit a row in a DataView using C#

DataViews are typically used in C# to represent a set of data obtained from the sources like a database or a dataTable from a different perspective. DataView often exposes several methods in sorting, searching and manipulating the data. In this example, we modify a row in an existing DataView with a new value. The dynamic... » read more

Perform a security check for your WordPress website

Planning, creating, and deploying any website can be a long and sometimes expensive process. It could be your blog, professional business website or your online business. No matter, what purpose your site is serving, it is essential to keep it secure and functional. If left unguarded, hackers can steal your information, install malicious software or... » read more

An Introduction to Arrays in PHP

In any programming language, a variable is a memory location that holds a value. It could be a number, string, an object but at a time, it can contain only one value. What if you need 20 such values, or 50 or even 100? One way is to declare and initialize those 100 variables. The... » read more

Count the Number of Bits Set to One using Java

In this article, we’ll be counting the number of bits set to one using Java. To make it more transparent, let’s take number 6 as an example. Number 6 is represented as 110 in binary. From our example, the output is 2, as there are two ones in the binary of the converted number. In... » read more

Convert Integer Values to Byte, Character, and Float using Java

In Java, just like most programming languages, we can convert one data type into another type using Type Conversion. Mainly, there are two types of conversions, and in this example, we’ll be using both of them. First one is automatic type conversion, which automatically converts compatible data types into another type using Java — for... » read more

Preventing Multiple Submissions on the Server Side using PHP

The code below will help you to prevent multiple form submission from the users using PHP. First, create a web form as shown below. <?php session_start (); ?> <!DOCTYPE html> <html> <head> <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> <style> *{box-sizing:border-box;} body{font-family: 'Open Sans', sans-serif; color:#333; font-size:14px; background-color:#dadada; padding:100px;} input{padding:5px; margin-bottom:5px; width:300px;} </style> <body> <?php if(isset($_POST['submit'])){ if (!isset (... » read more

How to create a multi-page form in PHP

When creating a multi-page form, you can save the data being entered at every step in session variables or temporary database. In this tutorial, we will be creating three different pages to save the information being entered in the session variables. Multi-page Form in PHP To get started, create a web form as shown below <?php... » read more