Posted in AJAX JavaScript

AJAX Technique Example Using JavaScript

AJAX – Asynchronous JavaScript And XML 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….

Continue Reading... AJAX Technique Example Using JavaScript
Posted in JavaScript

JavaScript function which takes multiple ids and returns multiple elements

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.

Continue Reading... JavaScript function which takes multiple ids and returns multiple elements
Posted in MySQL

Find Full Path For Nested Categories In MySQL

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

Continue Reading... Find Full Path For Nested Categories In MySQL
Posted in MySQL

Generate Zero-Fill Auto-Incremented Id In MySQL

Zero-Fill Auto-Incremented Id 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.

Continue Reading... Generate Zero-Fill Auto-Incremented Id In MySQL
Posted in MySQL

Select only one random item from each category 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 sample tables with data. You…

Continue Reading... Select only one random item from each category in MySQL
Posted in MySQL

Custom regex function to replace characters 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.

Continue Reading... Custom regex function to replace characters in MySQL
Posted in Java

Instantiate Object From A Class Which Contains Private constructor

Private Constructor You probably know that you 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 the private…

Continue Reading... Instantiate Object From A Class Which Contains Private constructor
Posted in Java

How to read input through keyboard in Java

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 also apply validation on each…

Continue Reading... How to read input through keyboard in Java
Posted in Java

Verify A String Contains Only Numeric Value Using 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 use string variable for storing…

Continue Reading... Verify A String Contains Only Numeric Value Using Java
Posted in Java

How to merge Multiple CSV Files into One in 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 how to merge multiple csv…

Continue Reading... How to merge Multiple CSV Files into One in Java