Tools of work

Tuesday, 20 December 2011 – 19:15

I decided to give away my trusted HTC Desire, a phone that has a very nice blend of performance and size. I’ve always liked small phones (Ericsson T68 and SE X10 Mini being favourites) but as the current crop of smartphones are growing more and more there is not that much to choose from if you want features and performance… As I’m doing development on Android the choice became easier. Last week I got hold of the new Google Nexus and now I’m trying to get used to the size…

Findings this far is that ICS is still young and that many apps need new releases to be stable or run at all. Otherwise it’s working as expected and I’m waiting for Samsung to release the scandinavian dictionary…

Nokia J

Thursday, 29 September 2011 – 22:15

I’ve applied to Smartson to become a testpilot for the Nokia J bluetooth headset (http://smartsontestpilot.se/nokia-j/bli-testpilot/)  - this is going to be interesting as I’ve used numerously headset for my phones over the years. So far the best sound quality has been from traditional headsets with a cord (always tangled) and the best mobility paired with sound quality I’ve found this far is the Jabra JX10. So let’s see if the Nokia is matching those (providing I get to test it of course…)!

Javascript function of the day (JFOTD)

Wednesday, 15 June 2011 – 10:10

Doing some manipulation of selectboxes with the help of http://www.texotela.co.uk/code/jquery/select/. Using it to add a massive amount of options with the use of ajax.

$("#QueryResp").ajaxAddOption("./persons.xsp", {}, false, setOptionValue, [{"value":strResp}]);

Yes, I’m using xPages to feed the JSON to the function. Works very well with the added performance and cache possibilities of xpage “agents”.

To be able to set a default selected option I wrote a small function that is called when loading of options is complete.

function setOptionValue(arg) {
var $this = $(this);
$this.selectOptions(arg.value, true);
}

Very handy function to read url parameters as well;

function getURLParameter(name) {
return unescape(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]);
}

All with the help of jQuery of course.

Randomize a list in formula language

Wednesday, 23 February 2011 – 13:17

Today I was faced with a small problem – I needed to randomize a list in Lotus Domino formula language. After looking through the available commands I ended up with the following code;

REM {Original list that should be randomized};
_list := "A" : "B" : "C" : "D";

REM {Append random value to each element in list, then sort it};
_sortedlist := @Sort(@Transform(_list; "x"; @Text(@Random) + "|" + x));

REM {Extract the original value from element and return};
@Implode(@RightBack(_sortedlist; "|"); @NewLine)

The trick is to add a random value to each of the original elements and then sort the new list. After the sorting the random value can be removed.

Problem solved!

Upgrading. How it should be done.

Friday, 14 January 2011 – 15:00

Upgrading your current wordpress installation is possible the quickest upgrade you can do. Login to your administration dashboard, click upgrade and one more confirmation click. Wait 5 seconds. You’re installation has been upgraded!