How do I get dates between two dates?

In the following example code I am going to get  dates between two dates. First, I need to convert the date value into milliseconds and increase startup date value from one date.

One date in milliseconds equlas to 24 * 60 * 60 * 1000L

import java.util.*; public class DateUtil { static final long ONE_DAY = 24 * 60 * 60 * 1000L; public static void main(String[] args) { getDatesBetween("03/23/2011","03/28/2011"); } public static void getDatesBetween(String startDate,String endDate) { long from=Date.parse(startDate); // long value of from date long to=Date.parse(endDate); // long value of to date int x=0; while(from <= to) { x=x+1; System.out.println ("Dates : "+new Date(from)); from += ONE_DAY; } System.out.println ("No of Dates :"+ x); } }

Java Hex Color Code Generator

Last week I got an ideas on a random color generator in Java. One of my friends asked me to implement this logic.

Here is my example hexadecimal color code generate logic.

public Map hexCodeGenerator(int colorCount){ int maxColorValue = 16777215; // this is decimal value of the "FFFFFF" int devidedvalue = maxColorValue/colorCount; int countValue = 0; HashMap hexColorMap = new HashMap(); for(int a=0; a < colorCount && maxColorValue >= countValue ; a++){ if(a != 0){ countValue+=devidedvalue; hexColorMap.put(a,Integer.toHexString( 0x10000 | countValue).substring(1).toUpperCase()); }else{ hexColorMap.put(a,Integer.toHexString( 0x10000 | countValue).substring(1).toUpperCase()); } } return hexColorMap; }
Or You can use Math.random also. Here is example using Math.random

public static Map randomCodeGenerator(int colorCount){ HashMap hexColorMap = new HashMap(); for(int a=0;a < colorCount; a++){ String code = …

Java HTTPS Client

Here is example for a Java HTTPS client

import; import*; import; public class HttpsClient{ public static void main(String[] args) throws Exception{ String httpsURL = ""; URL myurl = new URL(httpsURL); HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection(); InputStream ins = con.getInputStream(); InputStreamReader isr = new InputStreamReader(ins); BufferedReader in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } in.close(); } }

How to Unlock Any Huawei Modem

1). - Find the IMEI number

2). type this on web browser |

3). Unlock code should display like this
» Unlock: 61949385
» Flash: 46034704
(c) SERGEY/MKL 2010

4).  Enter the unlock code in Unlocker or Any Unlocking Software and Unlock the Device

This is totally free Don't waste your money on Unlocking software

Unlocker 1
Unlocker 2



Mobitel MMS Settings For Android

Setting up the handset for Internet

Select Settings.
Select Wireless & networks or Wireless controls (older versions).
Select Mobile networks.
Select Access point names.
Press the Menu, --> New APN
Select enter Name (Mobitel or something). Press ok
APN: mobitel3g or mobitelbb and press OK.
Select, APN type, enter internet or default and press OK.
Other information not necessary.
Press the Menu and select Save.

Setting up the handset for MMS

On the handset, press the Menu key.
Select Settings.
Select Wireless & networks or Wireless controls (older versions).
Select Mobile networks.
Press the Menu, enter Mobitel MMS or something.
APN: wapmms and press OK
Scroll to, and select, Proxy, enter and press OK.
Scroll to, and select, Port, enter 8080 and press OK.
Scroll to, and select, User name, enter Not Required and press OK.
Scroll to, and select, Password, enter Not Required and press OK.
Scroll to, and select, MMSC, and press OK.
Scroll to…

Secure SMS Android Application

What is Secure SMS?

Secure SMS is a Messaging application which provides you a Secure SMS messaging service. You can send and receive Secure SMS via this application. Messages can be sent to a person who has this Secure SMS app and to a person who does not has this app.

User can configure application password when application opened in first time.


Inbox will show you, the Messages which received by you from Secure SMS application or from configured number. You can delete inbox message by Context Menu(To show a context menu on long click). By clicking on each message you can view full message body, sender and sent time.

My First Android Application

What is android:
    Android is a Linux based Mobile Operating system, which developed by Google's. 

 Two weeks ago I published my first Android Application. I called it as Zip/ Postal code Catcher. Why I have used Zip/ Postal ??  Because some countries Use Postal code, and some countries called it as Zip code.Then I named it as Zip/ Postal Code Catcher. Zip/ Postal Code Catcher is a free android application.

Application Features :
Search Postal codes over 30 countries.If Provided city name does not match, then it will display the nearest matching postal codes.  Using GPS based Postal code search option, you can find the nearest five post-office codes(sorted with air distance) This Application totally based on JSON web service access. In My first release GPS based postal code catching option is not included. But last Thursday, I have added GPS based postal code search option. By the way, currently it is being used by 707 users :)  . 

Market Link :…