Category Archives: Programming

Neptune’s Pride Battle Calculator v0.3

I’ve upgraded the calculator a little, tinkered a bit with the design with a new header and some minor tweaks for better appearance, and managed to get the javascript to run in IE as well, thanks to a little help from saiboten. What went wrong was as simple as using type=”text/javascript” for javascripts in stead [...]
Also posted in JavaScript, web | Tagged , , | 9 Comments

Neptune’s Pride Battle Calculator

I got introduced to Neptune’s Pride a little while ago by a friend… It is a simple 4X game, with small games for 8 players in each in the free ones. The game uses some simple math to calculate the outcome of battles, and since I am lazy I got tired of doing that math [...]
Also posted in JavaScript, web | Tagged , , , | 11 Comments

Making international characters searchable in LaTeX documents

By default LaTeX generates some international characters in a weird way when building a PDF and so on. For example, the norwegian Å will be represented as ˚A, and thus making any word containing the letter impossible to find when searching for it. This can be solved by using the package fontenc, with the parameter T1 [...]
Also posted in LaTeX | Tagged , , | Leave a comment

Useful BASH-command: !!

When ever you use the terminal in Linux or OS X, and forget to add sudo in front of a command that needs the privileges, you can simply type sudo !! to run the same command with sudo. awesome. “!!” Will repeat the last issued command, and can probably be used for other useful things, [...]
Posted in Programming | Tagged , | 2 Comments

Citing / displaying source code in LaTeX

I am writing my master thesis using LaTeX, a typesetting system most commonly used for scientific documents.  Since my thesis is in computer science, I have the need to display a fair amount of code.  After searching around the net and with some trial and error, I have come up with some settings that does [...]
Also posted in LaTeX | Tagged , , , | Leave a comment

Simple quiz-program in Python

When we were studying for exams, Tobias and Peder1 decided to make some tools to help us study.  This is Tobias’ version, written in Python. “The program is fairly simple. You select a text file containing lines with topics you want to learn, and then you have to type inn all of them. The program [...]
Also posted in Python | Tagged , , | Leave a comment

Simple quiz-program written in Java

This is Peders version of the quiz program for studying.  it takes textfiles with the extention .pugg as input
Also posted in Java | Tagged , , | Leave a comment

Prepared Statements in Java

Her er den fantastisk lærerike videoen til Tobias som jeg lovte å legge ut på siden min, etter at han maste så lenge om det.
Also posted in Java | Tagged , | Leave a comment