Lotusphere Comes to You i Sverige

Den 8 mars kommer Lotusphere till Sverige! Närmare bestämt till IBM på Oddegatan i Kista. Ed Brill kommer att medverka som talare. Själv har jag redan anmält mig, det kan du också göra!

Cross browser DynamicSelect JavaScript class

When developing web applications, select-boxes are usually involved in the UI. I’ve put together a custom JavaScript class to handle things like removing, adding and selecting elements. By the way, Matt Kruse has a bunch of nice JavaScript libraries! Example: var e=new DynamicSelect(‘MySelect’); e.removeAll(); e.append(‘Entry 1’,”); e.append(‘Entry 2’,”); e.selectAll(); e.unselectAll(); e.select(‘Entry 2’); e.toggleAll(); if(e.contains(‘Entry 1’)){ […]

Replacing No documents found

This has been done before. Here is my contribution: /** * Replaces \”No Documents Found\” with a custom text. * * @author Johan Känngård, http://johankanngard.net * @param message the text to replace with * */ function replaceNoDocumentsFound(message){ var h2=document.getElementsByTagName(\’h2\’); if(h2!=\’undefined\’&&h2.length>0&&h2[0]!=\’undefined\’) { var oldTextNode=h2[0].firstChild; var newTextNode=document.createTextNode(message); h2[0].replaceChild(newTextNode,oldTextNode); } } Put the function in the HTML Head […]

Echo XML from a file, String or InputStream in Java with SAX

Here is an example how to use the XMLEchoer class, that I have refurbished from Sun’s tutorial Echoing an XML File with the SAX Parser. It is of limited use, but can be a good start learning SAX. import java.io.PrintWriter; import lotus.domino.AgentBase; import net.kanngard.xml.XMLEchoer; public class JavaAgent extends AgentBase { public void NotesMain() { try […]

A long walk at Norrviken

-5 degrees celsius and the sun shining, yesterday was a perfect day for a long walk! This time, we were at Norrviken for the first time. Following the western shore, we looked at the skaters and a ”motor kit” that made the otherwise calm area a bit noisy. I took some pictures as usual.

String to InputStream

Arguments in many methods in the Java APIs are of the type InputStream. This is how to get an InputStream from a String, where argument to getBytes, UTF-8, is the encoding to use: InputStream is = new ByteArrayInputStream(myString.getBytes(”UTF-8”)); [tags]Java[/tags]

Java versions in Lotus Domino and Notes

1.0 to 3.x: N/A 4.5 to 4.6.7a: JRE/JDK 1.1 5.0 to 5.0.13a: JRE/JDK 1.1.8 6.0 to 6.5.6: JRE/JDK 1.3.1 7.0 to 7.0.3: JRE/JDK 1.4.2 8.0 to 8.0.1: JRE/JDK 1.5.0 IBM also has a list of supported JDKs and JREs. Old JDK/SDK/JRE versions can be downloaded at java.sun.com. [tags]Java, Lotus Domino, Lotus Notes[/tags]

Your public IP address

If you want to know what your public IP address is, it’s here: 207.241.229.50 There are several reasons why you would like to know this, but one reason might be that you are using a ISP that has DHCP enabled, and your IP-address changes once in a while. Another might be if you are on […]

User Agent Switching plugin for Mozilla Firefox

After I upgraded to 1.5.0.1, I could not access certain sites. One of them said that my browser was too old, and I had to upgrade to at least Firefox 1.0 or Internet Explorer 6.0. If I only had Opera installed, I could fool the site by switching the User-Agent that is sent with every […]