Table of Contents Introduction Prerequisites Limit Checkbox Selection Using JavaScript Using Form HTML JavaScript Using Div HTML JavaScript Testing Checkbox Selection Limit Using Form Using Div Source Code Introduction This tutorial shows how to limit number of checkbox selections using JavaScript in a group of checkboxes. Suppose you have a group of checkboxes in a…

Posted in JavaScript

Limit Number Of Checkbox Selections Using JavaScript

Introduction This tutorial shows an example on AJAX using JavaScript. AJAX is an acronym that stands for Asynchronous JavaScript And XML. Therefore it is not a technology but a technique which is implemented using JavaScript. Here I will show you how to use AJAX technique in simple way without using jquery or any other framework….

Posted in AJAX JavaScript

AJAX Example using JavaScript

Introduction This tutorial shows how to implement a JavaScript function which takes multiple ids and returns multiple elements. document.getElementById() only supports one name at a time and returns a single node but not multiple nodes or an array of nodes.

Posted in JavaScript

JavaScript function which takes multiple ids and returns multiple elements

Introduction This tutorial shows how to find the entire path from root to child for nested categories and subcategories. Let’s say you have a table in database in such a way it contains unlimited level of categories and you have another column in the same table which should contain the entire path for the nested…

Posted in MySQL

Find Path for Nested Categories in MySQL

Introduction This tutorial shows how to generate zero-fill auto-incremented unique identifier in MySQL. Sometimes you may need to generate such keys which are used in some part of the application for business logic. Below example shows how to generate zero-fill auto-incremented id in MySQL table.

Posted in MySQL

Generate Zero-fill Auto-incremented Id in MySQL

This tutorial shows how to select items randomly from each category in MySQL. So here I will select exactly one item randomly from each category. People who need sometimes to select photo from each photo category and display them on the page for animation purpose will be benefited. In this example I have used two…

Posted in MySQL

Select only one random item from each category in MySQL

This tutorial shows how to replace the characters in a string or text using regular expression in MySQL function. There is no built-in function available to replace any character in a string or text in MySQL so here I am creating a custom function.

Posted in MySQL

Custom regex function to replace characters in MySQL

We know that we cannot make any object if the Class contains private constructor but this is not true until a special care is taken to the private constructor. This tutorial shows an example how to create instance using Reflection even if the classes have private constructors. Though if the special care is taken to…

Posted in Java

Instantiate object from a Class which contains private constructor

This tutorial shows how to read input from keyword using Java programming language. For example if your database connection string changes then you don’t need to worry because for any database connection string like username and password, this will still work. This is a simple example, you can customize as per your need. You can…

Posted in Java

How to read input through keyboard in Java

Introduction The below example shows how to verify that a string contains only numeric value in Java. String may contain float value, double value etc. This example uses regular expression to check a string contains only numeric values. It makes sure that your string should contain only digits and dot(.). You may need sometimes to…

Posted in Java

Verify A String Contains Only Numeric Value Using Java

Introduction This tutorial shows how to merge multiple csv files into one in Java. You may need to merge multiple csv files into one in some situations for your business requirements. Suppose there are n number of csv files and each csv file is having different number of headers, so this example will show you…

Posted in Java

How to merge Multiple CSV Files into One in Java

Introduction The marker interface pattern is a design pattern that provide run-time type information about objects. It provides a means to associate metadata with a class when there is no explicit support for such metadata. The marker interface in Java does not have any method inside it, in other words, a marker interface in Java…

Posted in Java

Marker Interface example in Java