Design a site like this with
Get started

Function to validate email in javascript

This regular expression will not verify if the particular email id exists or not. Instead, this regex is to validate the format of email id In jquery var ValidateEmail= function (email) { var regexp = new RegExp('^[^\s@]+@[^\s@]+\.[^\s@]+$'); var check = $(email).val(); if (!regexp.test(check)) { alert('Invalid e-mail!Please enter the e-mail ID in correct format'); $('#EmailID').css('border-color', 'red');... Continue Reading →

Chaining in jQuery

Using jQuery, We can chain together actions/methods as it allows us to run multiple jQuery methods/actions on the same element using just a single statement. We can chain the methods together using a period or dot(.) The advantage of chaining is that browsers don't have to find the same element more than once. Example $("#div5").css("color",... Continue Reading →

Fading in jQuery

There are four main fading effects in jQuery that can be applied to the HTML elements. They can be applied using these 4 methods: fadeIn() //to fade in a hidden element fadeOut() //to fade out a visible element fadeToggle() // toggles between fadeOut() and fadeIn() fadeTo() //fading to a given opacity (value between 0 and... Continue Reading →

jQuery slideToggle() Method

The slideToggle() method toggles between the  slideUp() and slideDown() methods. If an element is slid up, slideToggle() will slide it down and vice versa. Syntax $(selector).slideToggle(speed,callback); Example $("div").slideToggle();

jQuery function to hide and show HTML elements

We can show and hide HTML elements with the show()and hide  methods in jquery. A simple example is as follows Example $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); Similarly, you can apply it to any html element such as a button.


A hashing algorithm is a mathematical function that shortens the data to a fixed size. example Input “The Quick Brown Fox Jumps Over The White Lazy Dog” MD5 Hashing algoritm output 54a4cbe2eadcdb37493b4e66b47fe965 This resultant value is known as hash value. Uses of Hashing algorithms Speed: due to shortened data, Run calculations on data: Easy to... Continue Reading →

Dangling Pointers in C++

Dangling pointers Dangling pointers arise when an object is destroyed. Despite being deleted or de-allocated, it still has an incoming reference because the value of the pointer was not modified. The pointer still points to the memory location of the de-allocated memory. AVOID DANGLING POINTERS It is easy to avoid dangling pointer errors by setting the pointer to NULL... Continue Reading →

Void Pointer in C/C++

A void pointer or generic pointer is a special pointer that can point to objects of any datatype. It is declared just like a normal pointer by using void keyword at the time of declaration. void *p;

Size of a Pointer based on datatype

There is a lot of confusion about the size of the pointers based on datatypes. A usual question is if there is a difference of size in: int *p; char *p; string *p; The answer is simple. As we discussed in the previous detailed post on pointers, A Pointer points to the address of a... Continue Reading →

Blog at

Up ↑