Skip to content

JChecksum now on SourceForge.net

About a year ago I wrote the program File Hasher. I really liked that program, so I decided to go back and see if I could polish it up a little bit. One thing turned into another, and I ended up adding several new features (like drag and drop files for hashing) and right click “Hash It!” menu items.

The program seemed polished and useful, so I decided to upload it to SourceForge. Becuase I made several new changes and the project is now hosted on SourceForge, I decided to change the name of the project from File Hasher to JChecksum.

If you want a very simple and easy to use file hashing program, I would reccomend you try out JChecksum.

You can find JChecksums website here.

Tagged , , , , , , , , ,

Barcode Generator

Barcodes. They are ubiquitous and without them our entire point-of-sale system would fall apart. I recently became intrigued by barcodes, so I decided to write a program to generate them. I chose to only generate one specific type of barcode, Code 128B.  These type of barcodes support all ASCII keys, making them great for short words/phrases.

So I wrote BarcodeGenerator, a Java console program that will generate barcodes. Currently the program only supports Code 128B barcodes, but I may add more later.

The source code is Open Source. You can find it in the Jar file under com\joshwalters\app.

BarcodeGenerator uses JArgs for parsing the command line options.

Here is a sample barcode generated with my program:

A Code 128B barcode. It says Josh.

A Code 128B barcode. It says "Josh".

Download: Barcode Generator

Tagged , , , , ,

Name Percentage Calculator

I recently purchased a book on the Python language, Core Python Programming. It is a very good python book for people already familiar with other programming languages.

To test out this new language I decided to write a simple program that would find the percentage of occurrence of first and last names from the US Census Bureau name distribution files. It would then figure out how many estimated people share a given first name and how many estimated people share a given last name. It would then estimate how many people share both a first and last name.

The percentages and estimations of names are not 100% accurate to the US population as a whole, but they should work well enough to give a ballpark figure.

Here is a demo of the programs output:

Gender: Male
First name: Josh
Last name: Walters

First name probability percent (Josh): 0.023
Estimated number of people with first name (Josh): 69880

Last name probability (Walters): 0.040
Estimated number of people with last name (Walters): 121530

Estimated number of people with the name “Josh Walters”: 28

Hit “enter” to quit…

Python has to be installed on your computer in order for the program to run. If you have python installed all you have to do is double click on NamePercentageCalculator.py in order to run the program.

Name Percentage Calculator is released under the GPL version 3. The name distribution files come from the US Census Bureau and are therefore in the public domain.

Download: Name Percentage Calculator

Tagged , , , ,

Stock Portfolio Report Generator(SPRG) in Java

I wanted to write a Java program that interfaced with the Yahoo stock CSV system, so I decided to write a program that would generate a spreadsheet report file based on stock portfolio data stored in an XML file. The generated spreadsheet report stores the number of shares of each stock, the  purchase price per share, the current price per share, the current value of individual stock and all stock, and the gain gain/loss in percent and in dollars.

There is an example stock portfolio XML file in the download file. Use this to create your own portfolio XML file.

You can run the program with: java -jar sprg.jar sampleStockPortfolio.xml
A report spreadsheet labeled with the current date will then be created in the same folder.

The spreadsheet output is handled by Apache POI. The XML files are parsed with DOM for verification against a schema file and with StAX for actual data reading.

Stock Portfolio Report Generator(SPRG) is released under the GPL version 3 license. The source code is in the JAR file.

Download: Stock Portfolio Report Generator(SPRG)

Tagged , , , , , , , ,

Credit Card Validator Program in Java

Recently I removed a credit card applet from the site. I have decided to re-write the applet into a stand alone executable jar. I have also made a few small improvements to the source code.

The Credit Card Validator program allows you to validate credit card numbers with the Luhn checksum algorithm. It also allows you to generate credit card numbers that pass the Luhn checksum. These card numbers won’t work, they will only pass a Luhn checksum.

The Credit Card Validator program uses my Credit Card Checksum Package.

You can run the program by extracting the zip file and then double clicking on “creditcardvalidation.jar” or by typing “java -jar creditcardvalidation.jar” in the console.

The Credit Card Validator program is released under the GPL version 3. The source code can be found in the jar.

Download: Credit Card Validator

Tagged , , ,