How to validate date using Java regular expression

10 Comments


My earlier post on how to validate email address, SSN and phone number validation using Java regex still attracts lot of visitors. Today I realized that another piece of data that many programmers need to validate is the date. Many Java applications have to process input date values, so I thought it will be beneficial to this blog readers to show how regular expression can be used to validate date in java.

First I’ll show you how to validate date using java reg ex in US format and later I’ll show you how that same logic can be applied to validate date in English format (used in most countries outside North America).
More

article clipper vert How to validate date using Java regular expression
 

How to write to properties file in Java

4 Comments


One of most visited posts on this blog is How to read properties file in Java. In that post I explained how you can read from a properties file. But many people came to that post searching for an example on how to write to a properties file. So I thought it will be beneficial for those visitors if we a have separate post with an example of how to write to a properties file in Java.

More

article clipper vert How to write to properties file in Java
 

Best way to check if a Java String is a number.

2 Comments

One of the routine tasks in many Java applications is to convert a string to a number. For instance, you may have a form where user submits his or her age. The input will come to your Java application as a String but if you need the age to do some calculation you need to convert that String into a number.
More

article clipper vert Best way to check if a Java String is a number.
 

Make AdSense Deluxe plugin work with WordPress 2.8.5

4 Comments

Recently I upgraded to WordPress 2.8.5. The upgrade process itself went smoothly but some of the plugins I have installed on my blog stopped working with latest WordPress version. One of them is AdSense Deluxe.I use AdSense units on my blog (as you can see) and use AdSense Deluxe plugin to manage my ads. The plugin was still displaying my AdSense units properly, the problem was that I could not access its admin panel to change settings or ad units. I was getting following error.

“You do not have sufficient permissions to access this page.”

More

article clipper vert Make AdSense Deluxe plugin work with WordPress 2.8.5
 

Improve your writing style without breaking a sweat.

2 Comments

spell s Improve your writing style without breaking a sweat.
Image credit:Mooganic

Nothing is more embarrassing than a misspelled word or incorrect grammar in an article on your blog. OK, may be there are other more embarrassing things out there but this still is not a nice scenario for a professional blogger. As a blogger you should try to catch all your mistakes before your readers catch them and point fingers at them (or worst publish your mistakes on flickr for all to see:) ). Almost all commercial word processing programs offer built-in spell and grammar checkers. These tools allow the users to write without worrying too much about the spelling and to some extent the structure of their sentences. This peace of mind naturally increases their productivity. Now you can get that same functionality for your WordPress blog by installing a smart plugin. Aptly named ‘After The Deadline’, this plugin frees you from worrying about spelling and grammatical structure and let you focus on your main goal – to write.

“After the Deadline is a plugin for WordPress and TinyMCE with contextual spell checking, advanced style checking and intelligent grammar checking.”

More

article clipper vert Improve your writing style without breaking a sweat.
 

Five best free iPhone applications for bloggers

7 Comments

iphone1 276x300 Five best free iPhone applications for bloggers

iPhone

Smart phones are a great tool for bloggers to blog even when they are away from their computers. Ever since iPhone was introduced mobile-blogging hit its stride. With a plethora of apps available for iPhone you can now easily post to your blog wherever you are. Although most iPhone apps have a modest price but if you search hard you can find some gems of applications even for free. Following are five free but excellent iPhone apps that are immensely valuable for the bloggers on the move.
More

article clipper vert Five best free iPhone applications for bloggers
 

Why you should join ProBlogger community NOW.

4 Comments


Recently Darren Rowes of problogger.net launched a premium forum for bloggers ( problogger.com). I was surprised that he offered the membership of only $1.95 a month.
I singed up as soon as I heard the news and I believe it’s worth much more than that. The community is getting close to 2000 member strong. The first advantage of a fee-based forum is that usually do not get spammers flooding the message boards. More

article clipper vert Why you should join ProBlogger community NOW.
 

Nine Must Have JavaScript Tools For Every Web Developer

2 Comments

Almost all major web development projects include some javascript. Developing Javascript may be easy for some but working around various browsers’ incompatiblities makes it a bit more tedious chore. As a developer I always welcome the opportunity to use development tools that may help in the development process. Following is a list of some useful Javascript tools that I believe every web programmer should have at his or her disposal.
More

article clipper vert Nine Must Have JavaScript Tools For Every Web Developer
 

How to determine smallest and largest number in Java

No Comments

numbers 300x141 How to determine smallest and largest number in Java

Numbers


A couple of weeks ago a reader asked me for a Java program to read command-line input from the user and then display the smallest value the user has entered. He wanted to use digit ’0′ to indicate that the user is done entering the data and not to include 0 in the list of numbers entered by the user. Here is the Java code to do this. Bonus: This program also determines the largest value entered by the user.
More

article clipper vert How to determine smallest and largest number in Java
 

New features coming to Java 7

2 Comments


Joseph Darcy, the lead of Project Coin, formally announced the approved changes to the Java language to be included in JDK 7.  Although there was no major change announced, the announced enhancements will improve program readability. Following are few changes that I am glad they are going to incorporate in JDK7.
More

article clipper vert New features coming to Java 7
 

Older Entries Newer Entries