npCalc for Android open-sourced

The “Battle Calculator” is now GPL, and hosted at Google Code.

The app is fairly simple and might be a decent starting point for other apps, or as a tutorial for new developers.

If you want to contribute to the npCalc project with either code or graphics, contact me.

Posted in Android, Programming | Tagged , , , | 2 Responses

npCalc for Android

npCalc, the “battle calculator” for Neptune’s Pride has now been implemented as an Android app and published on the market.

It features all the functionality the web-based npCalc offers, is free, and contains no ads.

npCalc screenshot, single battle

npCalc single battle example

npCalc screenshot, battle results

npCalc battle results

You can install it directly with Barcode Scanner here;

qrCode for npCalc

Through AppBrain here: http://www.appbrain.com/app/com.josteinb.npcalc

Or by searching for npCalc in the Android Market on your phone.

As always, feedback is much appreciated

Posted in Android, Programming | Tagged , , , | 22 Responses

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 of type=”application/javascript”. gah.

As allways, feedback is appreciated!

the new version is located here.

The old versions can still be found here if anything stops working for you:

version 0.1

version 0.2

Posted in JavaScript, web | Tagged , , | 26 Responses

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 and started working on a battle calculator.

This is my first attempt on php, and it is a work in progress… so feedback is appreciated.

Try it out here: Neptune’s Pride Battle Calculator

UPDATE:

I have ditched php, and gone for javascript in v0.2 of the calculator… Now the workflow is more streamlined since you don’t have to go between different pages to get to results.  Seems to be some css-problems though. And javascript issues with IE. Working on it.

…And apparently IE doesn’t care about height / min-height unless you add an !important to it.

the old version can still be found here

Posted in JavaScript, web | Tagged , , , | 12 Responses

Safari 4 Top Sites messes with your Google Analytics

I noticed some strange results in my google analytics account recently, getting a very high bounce rate from visits, and since this is a very small blog about very geeky stuff, a fairly high increase in traffic.

After some tweaking around in analytics it turned out that most of the new bouncing traffic came from Safari, from a machine with the same screen resolution as mine, from my city, my broad band provider and so on.

It turns out that this is because my blog had appeared on Safaris “Top Sites”, a grid of often visited web pages on the welcome screen of Safari. And every time you open safari, it contacts the webpage for an updated snapshot of the page.  This is recorded by analytics and regarded as a bounce visit, decreasing your average time on site and increasing your bounce rate.

So far, it doesn’t seem like there is any other solution to this except removing the site from “Top Sites”, until Google or Apple figure something out.  This of course does not solve the, for me not yet existing, problem of bogus traffic from other Safari users.

Posted in IT | Tagged , , | 2 Responses

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 like this:

\usepackage[T1]{fontenc}

Now everything (at least for norwegian documents) should be working as expected.

Posted in LaTeX, Programming | Tagged , , | Leave a comment

Too Geeky….

Found on a bathroom door at “Høyteknologisenteret i Bergen”…

doer_soap

post_it_soap

word on the street has it Saiboten may in fact be geeky enough to have accomplished this feat

Posted in Humor | Tagged , | 1 Response

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, too.

Thanks, Peder 2.

Posted in Programming | Tagged , | 2 Responses

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 this in a nice way.

It is based on the listings package, we define a lstset that handles the code.  This in combination with a nice caption makes for a nice presentation of source code.

Here is the final result:

LaTeX Source Code Screenshot

LaTeX Source Code Screenshot

“Read more” for the rest of the article

Read More »

Posted in LaTeX, Programming | Tagged , , , | Leave a comment

Hiding the Tab-bar in Thunderbird 3

In the new Thunderbird 3, Mozilla included tabbed browsing.  Since you usually don’t have tabs open all the time, it would be nice to be able to hide the tab-bar when no tabs are open.  There is a hidden option to accomplish this.  Thanks to Truben for pointing this out!

Read his article at http://truben.no/journal/auto-hide-tab-bar-in-mozilla-thunderbird-3/

Posted in IT | Tagged , | Leave a comment