Software Developer / Photography Enthusiast 

Facebook Flickr LinkedIn RSS

Evaluate a Mathematical String Using ScriptEngine

Suppose you have a String containing some mathematical operation(s). For example, we need to perform the following calculation, but for various reasons, the data type is a String: (10*(34+92)-23)/4. Rather than figuring out ways to parse it (e.g. split or some fancy regex), we can use Java’s ScriptEngine to evaluate the function as is.

Continue Reading

 

Screen Capture Utility

Screen Capture Utility

Using my previous post on how to take a screenshot using Java’s Robot class, I expanded this idea to create a Screen Capture Utility that would automate the process of taking multiple screenshots over a period of time.

Continue Reading

 

MicroInternet

During my graduate studies, one of my projects for a networking class involved simulating TCP/IP at the application layer between nodes across a network. This “micro-Internet” consists of hosts and routers, each having the capability to emulate TCP’s reliable communication and IP’s packet forwarding. The source code is available for download here.

Continue Reading

 

CopyCat

CopyCat is an anti-plagiarism tool that compares documents for similarities, giving a percentage of similarity, the ability to export, and analyze two documents side-by-side.

Continue Reading

 

Saving a JTable Using Apache POI

Have you ever needed to save the contents of a JTable? One convenient way to save this data is to make it available as an Excel spreadsheet. Using Apache’s POI, we can do this without too much frustration.

Continue Reading

 

Long Integer ADT

Data types in Java and C++ (amongst other languages) are limited to a specified range. Even the majority of basic calculators will usually return an error if you attempt to perform an operation using a number larger than 9 digits. Of course, there are libraries in Java (and likely in C++) that will let you overcome these limitations (e.g. java.math.BigInteger). This long integer abstract data type is my own implementation in C++. Because the code for this project is somewhat extensive, I will only post the header files and smaller source files. The full source code can be downloaded here.

Continue Reading

 
Home 2009 January