'Java' Tag

  • Swing-Clojure GUI for the Black-Scholes Option Modeler

    July 15, 2010

    Now that we have implemented Black-Scholes in Clojure, let’s make a Swing GUI for it. The Swing GUI will have text boxes for all the necessary inputs, and calculate prices and Greeks when the button is pressed. It’s a simple and straightforward way to get started in Swing GUI programming in Clojure. Here’s what it [...]

  • Log4J and Clojure Configuration

    May 16, 2010

    Clojure, Log4J, and clojure.contrib.logging can play nicely together. Here’s a reasonable default configuration.

  • XML DTD Validation in Clojure: Turning It Off, Parsing Malformed XML

    April 28, 2010

    I wanted to parse some externally-generated and malformed HTML, so naturally I went to the short and sweet clojure.xml/parse function. I got a nasty error: error: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd It seems that the W3C blocked access to the DTDs two years ago, but Java still tries to load [...]

  • Clojure SQL Dates and Times with Joda

    March 24, 2010

    The date and time classes built into Java are a horrible mess. What are Clojure programmers to do? Use Joda Time instead. Joda Time is coherently designed and easy to use.

  • Setting Clojure’s Log Level

    March 14, 2010

    Clojure.contrib.logging doesn’t have any way to set the log level. This is obviously a problem if you want to make use of various log levels (debug, warn, etc.) to separate different logging depths. Here’s a function to set the logging level.

  • Libcurl bindings for Java on Macintosh

    March 13, 2010

    Libcurl’s Java bindings now compile on Macintosh, with a few minor modifications to the Makefile. Get the code from my Github account.

  • Yahoo Finance in Clojure

    March 13, 2010

    A Clojure version of my Yahoo Finance Ruby gem seemed like an interesting challenge and a good way to learn Clojure better. This version uses Apache HttpClient, which is significantly slower than libcurl. A libcurl version is on the way.

  • JNI, Leiningen, and the :native-path argument

    March 4, 2010

    How to load JNI native libraries via Leiningen’s undocumented :native-path argument, for installation of Rincanter.

 
Copyright © 2009 Paul Legato. All rights reserved. Theme based on Shlomi Noach, openark.org