Program to find Perfect Number Program in C++

What is a Perfect number: Perfect Number is a number in which sum of all its positive divisors excluding that number is equals to the number. For example:     6 Sum of divisors = 1+2+3 = 6 Here we will find perfect numbers between 1 and 500. Program explanation: Take first number as 1. … Read more

MySQL Error: 1142, SELECT command denied to user

So I went through the error while migrating one of the app to cloud. The full error statement goes like : MySQL Error: #1142. Response form the database. SELECT command denied to user “username@ip” for table “table1” From the error statement it looks like that ‘SELECT’ access is missing for the user for that particular … Read more

Simple Red Black-Tree(RB-Tree) implementation in C++

Red Black-Tree (RB-Tree): A red-black tree(RB-Tree) is a binary search tree with one extra attribute for each node: the colour, which is either red or black. It has following properties: Every node is either red or black. Every leaf (NULL) is black. If a node is red, then both its children are black. Every simple … Read more

Different star pattern in Python

In this post we will discuss about different basic star pattern in Python. These are very basic and beginners programs, let me know in case you want me create more shapes and patterns. Star pattern : 1 * * * * * * * * * * * * * * * Program to implement … Read more

C++ program to concatenate two Strings using Pointer

In this post we will write a simple C++ program to concatenate two strings using Pointer, the code is self explanatory with comments for better understanding. Write a C++ program to concatenate two Strings using Pointer: You can also execute this code on our online compiler.   #include <iostream> using namespace std; int main() { … Read more

Shell script to check MySQL Replication Status

Working as MySQL DBA I’ve faced the MySQL replication issue almost every other day, I would say one of the weak point of MySQL RDBMS is the replication and replication down/delay is one of the most common error which can be seen in MySQL replication setups. Let’s discuss how as a DBA or as site … Read more