Code Snippets
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.
Some applets from way back when those were still a thing, mostly written by other people, resurrected here so they don't get lost.
CategoryJava
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. |
- WorkingWithPdfFilesInJava has a number of examples of how to create and alter PDFs in Java
- 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
- 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.
- ImageJPlugins collects a number of plugins for the ImageJ image processing app and library.
- 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
- TetrisApplet is an applet version of the game Tetris
- WarpApplet lets you have fun with an image
- Johan van der Hoeven's hilarious MonaPythonNixon applet
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