Log in

Category Archives: Java

11
November

Lately I’ve been doing a bit of Rails development for an important project at work. While I really enjoy working with the Ruby programming language and Rails (and ActiveRecord) can be huge time savers, I occasionally find myself wishing I was working with Java instead. I have several major beefs with Ruby on Rails, as [...]

11
July

CEDict now has its own domain!

Written by cdavaz. 2 comments Posted in: Chinese, Java, Perl, Web Development
Tagged with

I decided to register a domain for CEDict, so now you can access it at: http://www.cedict.info I’ve also made a few changes and bug fixes. One important bug that got fixed was that character and bigram frequency data was only getting partially loaded. This was due to a (possible, not yet confirmed) bug in MySQL’s [...]

07
June

Encoding Converter

Written by cdavaz. No comments Posted in: Java
Tagged with

I needed a program that simply converted a file from one encoding to another. I couldn’t find one on my system so I wrote this which works just fine. Most of the work is done implicitly by Java. All I did was created an InputStreamReader and OutputStreamReader with the appropriate character encodings. BufferedReader in = [...]

06
June

Benchmarking in Java

Written by cdavaz. No comments Posted in: Java
Tagged with ,

I wrote this class to handle some simple benchmarking I needed to do in Java. It uses the ThreadMXBean to calculate how much CPU time your program is using. To compile: javac Benchmark.java This will generate Benchmark.class. You want to move this file to a subdirectory “com/chrisdavaz/util” under your CLASSPATH. So for example, if the [...]