Posts Tagged ‘How-To’

Page 1 of 41234

Calculate Free Disk Space in Java using Apache Commons IO

As a Java developer, lot of times I have to play around with file system. Sometimes I have to copy files/directories from one location to another; sometimes have to process certain files depending on certain pattern. In one of my test program, I wanted to calculate available disk space using Java. Lot of code snippets are ... Full story

Java Tip: How to Sort Arrays in Java using java.util.Arrays class

Here is a small but very useful tip that every Java programmer should be aware of. Have you ever tried sorting arrays in Java? Well, java.util.Arrays class has built in method to make your job easy. You can use following method to sort any array in Java. import java.util.Arrays; ... ... Arrays.sort (int ) Arrays.sort (float ) Arrays.sort (long ) ... Let us check an example were we will sort an array of ... Full story

Generating Random Data in Oracle

Most of the times, production data is not available in development environments. Here, I would like to share a single sql command which can generate random data. But before that, let's address another issue faced by a lot of new oracle users. We need to generate a sequence of numbers using a sql statement. This will generate a number sequence. ... Full story

Deleting Duplicate Rows in Oracle

Deleting Duplicate Rows in Oracle
Deleting duplicate rows from tables is one of the common task oracle developers come across. The data might get duplicated because of missing primary/unique key on the table or batch file getting loaded multiple times. Here I have tried to summarize different ways of deleting this duplicated data. Please note that this is not an extensive list ... Full story

JavaScript Array Remove an Element

JavaScript Array Remove an Element
Following is an example of JavaScript where we will remove elements from an array with Index and Value. There are different methods in JavaScript that we can use to remove elements. We will use splice() method. Remove Array element by Index First we will see an example were we will remove array element by its index. For this we can define a generic function removeByIndex(). function removeByIndex(arr, ... Full story

jQuery Resizable and Draggable Tutorial with Example

Have you ever tried doing some animation using plain Javascript or moving DIVs here and there or resizing them?! Well, you know then how much pain it is as not only you have to tackle the difficult part of animation but also making it cross browser compatible. Well you probably know why I am stretching up so ... Full story

Run Multiple Instance of Apache Tomcat in Single Server

Run Multiple Instance of Apache Tomcat in Single Server
A lot of time we want to run multiple instances of Apache Tomcat server on a single machine. Generally this is done for creating a separate load balancer server for an application or install a different application independently. This can be achieved easy by some configuration in Tomcat Server. We need to install a second instance ... Full story

Display Twitter User Image on your Blog/Website in 2 Minutes

Display Twitter User Image on your Blog/Website in 2 Minutes
Twitter API has became a powerful way of getting information about a twitter user and her activities. In my previous tutorial we saw how to create a simple twitter reader in 5 minutes. Let us see how to get the User Image (or Avatar) from Twitter and display it anywhere you want. So how ... Full story

Blocking Obscene/Unwanted Ads in Google Adsense

Blocking Obscene/Unwanted Ads in Google Adsense
Since few days we were noticing some really obscene ads of a Gaming website on our blog. After quick search we found that these Ads were from a website called evony.com. We received lot of concerns/comments from our website visitors who were restraining to visit us from their work area just because of these ads. Evony ads are like a virus for a lot of people's ... Full story

Static Import in Java: New way to Import things in Java!

Static Import is a new feature added in Java 5 specification. Java 5 has been around the corner for some time now, still lot of people who are new in Java world doesn't know about this feature. Although I have not used this feature in my work, still it is interesting to know about. What is ... Full story
Page 1 of 41234
Copyright © 2010 ViralPatel.net. All rights reserved.