Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to secure apache with using lets encrypt an open source ssl provider
In this article, we will learn how to setup TLS/SSL certificates using the “Let’s Encrypt” on Ubuntu server with Apache as a web server, we shall also cover how to automate the certificate renewal using corn jobs.PrerequisitesTo complete this demo we needed to have the below requirementsAn Ubuntu server with a user with sudo permissions.Apache server installed on it with a proper domain name configured.Installing the Dependencies on ServerWe needed to update the server using the below command and install the git to get the Let’s Encrypt client from the repository.$ sudo apt-get update$ sudo apt-get install gitDownload the Let’s ...
Read MoreC++ program to Calculate the Edge Cover of a Graph
Given a n number of vertices of a graph, the task is to calculate the edge cover of the graph. Edge cover is to find the minimum number of edges required to cover every vertex of the graph.Like we have n = 5Then its graph will be like −So its edge cover is 3Let’s take another example where the n is 8And its edge cover will be:4ExampleInput: n= 5 Output: 3 Input: n= 8 Output: 4Approach used below is as follows −Take the input from the userFind the ceiling value of the result of number of vertices by dividing it ...
Read MoreC++ program to calculate Profit Or Loss
Given with the cost price(CP) and the selling price(SP) and the task is to calculate the profit gained or loss incurred.Cost price or CP is the price at which the product is purchased by the seller and the selling price or SP is the price at which the product is sold by the seller.There is a formula to calculate profit gained or loss incurredProfit = Selling price – Cost priceIf Selling price is greater than cost price than there will be a profitLoss = Cost price – Selling priceIf cost price is greater than selling price than there will be ...
Read MoreHow to configure and secure the server setup on centos 7
In this article, we will learn some configuration steps that should be taken care for security purpose and usability, just after a new server is installed. This will help us in building a solid foundation.Avoiding the ‘root’ user LoginThe root is the administrator or the super user in the Linux environment, who has all the privileges on the system. Generally, it is highly recommended to use the root user directly, as it may cause many issues or any accidental loss of data or due to any changes which may be done accidentally.In the next step, we will be setting up ...
Read MoreC++ program to calculate GST from original and net prices
Given with the original cost and net price as an input and the task is to calculate the GST percentage and display the resultGST stands for Goods and Service task. It is always included in the Net price of the product and before calculating the GST percentage we need to calculate GST amount and for that there are formulas availableNetprice = originalcost + GSTAmountGSTAmount = Netprice – original_costGST_Percentage = (GSTAmount * 100)/ originalcostGST % formula = (GSTAmount*100) / originalcostExampleInput-: cost = 120.00 price = 150.00 Output-: GST amount is = 25.00 % Input-: price = 120.00 cost = ...
Read MoreHow to install install mariadb 10 2 centos 7
In this article we shall learn about – how to install MariaDB 10.2 on Centos 7 / RHEL. This can be used as a guide for beginners or as a reference. Please note that, this can also be used as an alternative replacement of MySQL.Features of MariaDBMariaDB is an open-source and an alternative relational database management software.MariaDB is robust, fast and Scalable with rich storage engines.MariaDB has new features such as GIS and JSON.Server Information and PackagesThe Package included: MariadB, Mariadb-server, MariaDB-libs.The Daemon Name used is: mariadb.Port No: 3306.Configuration path: /etc/my.cnf.Installing Maria DB 10.2 on Centos 7 / RHEL 7In ...
Read MoreC program to calculate distance between two points
Given with the two points coordinates and the task is to find the distance between two points and display the result.In a two dimension plane there are two points let’s say A and B with the respective coordinates as (x1, y1) and (x2, y2) and to calculate the distance between them there is a direct formula which is given below$$\sqrt{\lgroup x2-x1\rgroup^{2}+\lgroup y2-y1\rgroup^{2}}$$Given below is the diagram representing two points and their differences$$\frac{(x_2-x_1)}{(x_1, y_1)\:\:\:\:\:\:(y_2-y_1)\:\:\:\:\:\:(x_2, y_2)}$$Approach used below is as follows −Input the coordinates as x1, x2, y1 and y2Apply the formula to compute the difference between two pointsPrint the distanceAlgorithmStart Step ...
Read MoreHow to install and configure own wordpress instance on linux centos 7
In this article, we will learn about how to install WordPress in an open source website and blogging tools which works with PHP and MySQL. WordPress is the most popular Content management system (CRM) used on the Internet and it has more plugins to extend the functionality of the WordPress.PrerequisitesBefore we set up, the we need to have the below –We need a non-root user with Sudo privilegesWe need to setup LAMP (Linux, Apache, MySQL and PHP) which needs to be installed on the Centos 7 Server.Creating MySQL Database and User for the WordPressAssuming that we have already had LAMP ...
Read MoreC program to calculate distance between three points in 3D
Given with the 3-D plane and hence three coordinates and the task is to find the distance between the given points and display the result.In a three dimension plane there are three axis that are x-axis with its coordinates as (x1, y1, z1), y-axis with its coordinates as (x2, y2, z2) and z-axis with its coordinates as (x3, y3, z). To calculate the distance between them there is a direct formula which is given below$$\sqrt{\lgroup x2-x1\rgroup^{2}+\lgroup y2-y1\rgroup^{2}+\lgroup z2-z1\rgroup^{2}}$$Given below is the diagram representing three different axis and their coordinatesApproach used below is as follows −Input the coordinates as (x1, y1, ...
Read MoreC program to calculate age
Given with the current date and the birth date of a person and the task is to calculate his current age.ExampleInput-: present date-: 21/9/2019 Birth date-: 25/9/1996 Output-: Present Age Years: 22 Months:11 Days: 26Approach used below is as follows −Input the current date and birth date of a personCheck for the conditionsIf current month is less than the birth month, then we will not consider the current year because this year has not been completed yet and to compute the differences in months by adding 12 to the current month.If the current date is less than the ...
Read More