These are various small pieces of code that I created over the years for some purpose or other, mostly in Java. Some of them may be helpful to others, so I've put them here for wider access.

If any of my code snippets and examples has been helpful to you or your company, and you feel like expressing your gratitude beyond saying Thank you, please note that I have an Amazon Wish List containing several inexpensive items, or you can contribute directly via PayPal.

  • ExprJava is a Java class that evaluates a mathematical expression by using a recursive-descent parser. It also handles variable substitution, and is useful for evaluating user-entered expressions.

  • WhoisLookup contains an implementation of a WHOIS lookup, based on the Apache Commons Net library (which has some limitations)

  • WebSockets shows how to use web sockets and server-sent events between a web page and a Java web app

  • JSPWiki plugins
    • These use the pre-2.11 API, so will not run out of the box with the latest JSPWiki releases. I hope to get around to updating these in Q2 2024.
    • HighlightPlugin displays code blocks with syntax-coloring.
    • LanguagePlugin displays content on a web page according to the browser's language setting.
    • JavaDocPlugin links Java class names to their respective javadocs.
    • EvaluatePlugin evaluates numerical expressions and displays the result.

  • AntTask shows how to extend Ant with custom tasks


Some applets from way back when those were still a thing, mostly written by other people, resurrected here so they don't get lost.

  • SimpleMandel is a Java applet for displaying Mandelbrot sets of different exponents. It can also be run as an application via the command line, since applets are obsolete.

  • HexCalc is a simple calculator with binary, octal, decimal and hexdecimal modes

  • Martin Minow's SunSphere applet shows a picture of the rotating earth, complete with sunlight and night shadow

If any of my code snippets and examples has been helpful to you or your company, and you feel like expressing your gratitude beyond saying Thank you, please note that I have an Amazon Wish List containing several inexpensive items, or you can contribute directly via PayPal.


CategoryJava