Posts

Showing posts from May, 2015

To convert currency from number to string format in Java

Here is a code : import java.util.Locale; import java.util.regex.Pattern; /**  * CurrencyConverter is used to convert the given amount string into words  *  * @author Ravi Sharma  */ public class CurrencyConverter { /** String array of words for tens Names */ private static final String[] tensNames = { "", "", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY" }; /** String array of words for ones Names */ private static final String[] onesNames = { "", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "ELEVEN", "TWELVE", "THIRTEEN", "FOURTEEN", "FIFTEEN", "SIXTEEN", "SEVENTEEN", "EIGHTEEN", "NINETEEN&q

To convert currency from number to string format in Java

Here is a code : import java.util.Locale; import java.util.regex.Pattern; /**  * CurrencyConverter is used to convert the given amount string into words  *  * @author Ravi Sharma  */ public class CurrencyConverter { /** String array of words for tens Names */ private static final String[] tensNames = { "", "", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY" }; /** String array of words for ones Names */ private static final String[] onesNames = { "", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "ELEVEN", "TWELVE", "THIRTEEN", "FOURTEEN", "FIFTEEN", "SIXTEEN", "SEVENTEEN", "EIGHTEEN", "NINETEEN&q

Launch of KalCulate

Image
KalCulate - is an financial accounting software package purely written on java and FXML. It is product by  OpenLX Technologies . I am very happy to say that after 6 months of hard work finally, the kalCulate is launched on 19/5/2015 and ready to download on kalculate.com . Launching of kalCulate is done by Shri Nitin Gadkari (Minister of Transport Ministry). It is India’s first Linux based Financial Accounting & Inventory Application package. Transport Minister Shri Nitin Gadkari giving speech on Information Technology at the launching ceremony of KalCulate

How to setup java development kit on ubuntu

Download the latest jdk file in .tar.gz format from given link below http://www.oracle.com/technet…/…/javase/downloads/index.html extract the .tar.gz file open terminal type:- sudo tar -zxf jdk_file_name.tar.gz -C /path/to/extract Now set the latest jdk your default jdk type:- sudo update-alternatives --install /usr/bin/java java /jdk/home/bin/java 1 sudo update-alternatives --install /usr/bin/javac javac /jdk/home/bin/javac 1 Now check your java version type:- java -version you will find your java installed in additional you can set JAVA_HOME variable in path type :- sudo nano /etc/bash.bashrc add this lines at the end of file JAVA_HOME=/path/to/jdk/ export JAVA_HOME now save your changes and run !!!!!!!!!!!!!

Example of Progress Bar and Progress Indicator in JavaFX 8

Image
Here is the code ///////////////////////////////////////////////////////////////////////////////////////// import javafx.application.Application; import javafx.geometry.Pos; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.control.ProgressBar; import javafx.scene.control.ProgressIndicator; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; import javafx.stage.Stage; /**  *   * @author Ravi Sharma  *  */ public class ProgressSample extends Application { final Float[] values = new Float[] { -1.0f, 0f, 0.6f, 1.0f }; final Label[] labels = new Label[values.length]; final ProgressBar[] pbs = new ProgressBar[values.length]; final ProgressIndicator[] pins = new ProgressIndicator[values.length]; final HBox hbs[] = new HBox[values.length]; @Override public void start(Stage stage) { Group root = new Group(); Scene s

Eight reasons to love Java 8

Here is Eight reasons to love Java 8, and why java #1 programming language in the world. 1. It enables the Internet of Things. Java 8 can help businesses take part in the world of connected, always-on devices. Think smart appliances in the home and billions of wearable devices, medical sensors, connected vehicles, smart meters, and industrial controllers. The opportunities are endless. Both Java SE 8 and Java ME 8—the two platforms that make up Java 8, along with Oracle’s related embedded products—provide a scalable, flexible, secure development platform for the Internet of Things. 2. Less code means more productivity. Java 8 facilitates improved developer productivity through reduced boilerplate code. This is due in large part to lambda expressions, which are the most significant and anticipated new feature in Java SE 8. Lambdas (for short) let developers simplify the code they write every day. Developers can expect the way they do their jobs to change: They will be able to w