java

Use Timer to schedule periodic tasks

The java.util.Timer and java.util.TimerTask classes can be used for many simple thread related tasks. Use them to perform an action either periodically or just once. As well, the first execution can be delayed to a specific time in the future. The general guideline is : if it may take a long time, or may block,… Continue reading Use Timer to schedule periodic tasks

Design Patterns · java

Abstract Factory Design Pattern

1-This pattern is one level of abstraction higher than factory pattern. 2-the abstract factory returns the factory of classes. Like Factory pattern returned one of the several sub-classes, this returns such factory which later will return one of the sub-classes. 3-we need to get the specification of various parts of a computer based on which… Continue reading Abstract Factory Design Pattern

Design Patterns · java

Factory Design Pattern

if we have a super class and n sub-classes, and based on data provided, we have to return the object of one of the sub-classes, we use a factory pattern. Example: Let’s suppose an application asks for entering the name and sex of a person. If the sex is Male (M), it displays welcome message… Continue reading Factory Design Pattern

java

How To Use Command Line Arguments in Eclipse

Detailed Instructions for Command Line Arguments in Eclipse Example: Welcome.java run->run configuration->java application->your project main ->Arguments->set  u arguments Basically, it’s simple. Click on Run -> Run (not Run Last Launched).In the window shown below, notice that the Welcome Java application is highlighted. In the large subwindow of the Run window, there is a set of… Continue reading How To Use Command Line Arguments in Eclipse

wordpress

List category posts wordpress plugin

About: List Category Posts is a simple WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode. It accepts a category name or id, the order in which you want the posts to display, and the number of posts to display since the first versions. Several parameters… Continue reading List category posts wordpress plugin