November 27th, 2008 at 3:18pm |
Today I made a simple stack for you. It’s pretty much as basic as it gets. You push elements, you pop elements, you peek at elements, you get the size of the elements.
Here’s the code:
Node.java:
1
2
3
4
5
6
7
8
9
10
public class Node<E> {
private E content;
private Node<E> below;
public Node(E content) { this.content = content; }
public E getContent() { return content; }
public [...]
Read the rest of Java Abstract Data Type Series: SimpleStack
November 26th, 2008 at 11:47pm |
By request, and for fun, I made the game “Joker” (I think that’s what it’s called?), best known for it’s parody “Ekstra Joker Nord” (Extra Joker North) from Team Antonsen:
It’s a simple game where you get five numbers from 1 to 9, and decide if you want to go up or down based on that [...]
Read the rest of Lottery - Norwegian joker game in Groovy
November 26th, 2008 at 11:36pm |
For some crazy reason, I today decided to implement the most simple form for priority queue possible. And since I just got Syntax highlighting on my site, I decided to put it out here.
PS: If you are looking for a PriorityQueue, please use this one, it’s a better solution, based on a heap implementation.
This SimplePriorityQueue [...]
Read the rest of A SimplePriorityQueue in Java.
November 18th, 2008 at 6:14pm |
Today we had trouble with changing the default error messages in JSF, they were pretty confusing. After surfing the net, we found an easy solution:
Make a file called messages.properties and put it somewhere in your source folder (for example in a resource folder).
Go to the faces-context.xml, and add the following inside the faces-context tag:
<application>
<message-bundle>resource.messages</message-bundle>
</application>
Open the [...]
Read the rest of JSF: Make your own error messages.
November 5th, 2008 at 7:32pm |
Java EE:
If your application server crashes, and nothing works: Delete stupid .jar files from domain/lib/ext.
Read the rest of Todays note:
October 27th, 2008 at 11:31pm |
I came over a great talk at youtube the other day, which I really enjoyed. It’s from Joshua Bloch, currently Chief Java Architect at Google, who has worked with Google Web Toolkit (which is like a ajax and javascript written with the Java-language), and also was part of the Java.util.Collection and java.math libraries among others. [...]
Read the rest of GWT, Java and Josh Bloch at Google.
October 25th, 2008 at 1:20am |
Tonight I decided to give Ruby on Rails a try, as I tend to like playing with ruby, and I also like web applications. Therefore I search for “ruby on rails tutorial” on google, and found a wikipage which seemed like a nice tutorial. I already had ruby installed, and I followed the tutorial down [...]
Read the rest of Ruby on Rails - first impressions and a solution to a silly problem
October 8th, 2008 at 10:17pm |
I recently installed this amazing program “CamStudio”, where you can record things happening at your screen, and record sound at the same time. Since it was functioning rather well, I decided to take it a step further, and record a video of me doing something useful (I guess). So I made a video about SQL-injection [...]
Read the rest of I’m on Youtube (again)!
September 22nd, 2008 at 4:18pm |
Så, endelig har jeg tatt steget inn i rubyverdenen på ordentlig, og laget meg et lite script. Jeg fikk mye hjelp fra Bjørn, som også har bearbeidet koden min litt i etterkant (takk for det!).
Det scriptet gjør, er at det henter ut og lagrer alle tegneseriestripene fra den flotte siden Saturday Morning Breakfast Cereal på [...]
Read the rest of Mitt første ruby-program!
September 17th, 2008 at 5:12pm |
If you ever encounter this silly exception, and can’t make any servlet/jsp-page to run, this might be because you have put some .jars (standard.jar og maybe some other jars) in a directory where it shouldn’t have been.
I found this bug really hard to debug, so the best way is to think about where you’ve could [...]
Read the rest of javax/servlet/jsp/tagext/TagLibraryValidator