Saturday, January 31, 2009

Monday, January 19, 2009

DB2 on Mac!!!

Yes, you read it right, finally IBM has released a version of DB2 for the Mac! On December 22nd they released a version of DB2 Express-C for Mac (Leopard on Intel), which is essentially a version for developers who will be able to now use it to work on enterprise solutions on a Mac! I never thought this day would come.!

Antonio Canguiano has an interesting blog post that discusses some first steps, very useful.

You can get DB2 from the IBM Download Page.

I installed it using Admin GUI (as root) install and the tested the Ruby connection as per Antonio's blog. Initially I had a few issues with some libraries, but after downloading the latest version from the website, all is working well now.

This initial version does not have any of the admin tools (Comand Centre, Control Centre, etc.) but I was able to use SQL Workbench/J without any issues. It seems however that some of the tool jar files are there, I will look into that later.

There is a DB2 Express Forum, but feel free to ask any questions through this blog.

Next, Ruby on Rails!!!

Friday, January 9, 2009

Julie Feeney's Pages, coming soon


It has been a while since I wrote a music related blog. Yesterday I came across this blog post from Julie Feeney and I thought I would share it. For those that don't know Julie, she is a athe multitalented musician (add here composer, singer, multi-instrumentalist, etc...) winner of the Choice Music Prize for the Irish album of the year in 2006 for her debut album '13 Songs'.

Julie's blog entry talks about the process she went through to create here new album 'Pages' which will hopefully be out in the next couple of months.

If you haven't heard '13 Songs', look for a copy of it and be prepared for a really good (and different) experience.

Update: I left a comment on the MySpace version of the blog post, and Julie wrote me back a quick e-mail thanking me for it. I thought it was a really nice touch!!

Wednesday, January 7, 2009

Coditional formating for tables in TiddlyWiki

Well, sort off. I have been using TiddlyWiki for a long time to keep notes. TiddlyWiki is essentially a self contained wiki that can be easily transported. Read more on the TiddlyWiki site. One of the really interesting things about TiddlyWiki is that it can be easily extended with plugins and javascript. I use it with a number of plugins to have a ToDo list of sorts.

I use a couple of plugins:

  • The DataTiddlerPlugin, which lets you store structured data on your tiddlers.
  • The ForEachTiddler plugin, which lets you generate customised lists of tiddlers.

One thing I had been struggling with was to come up with a way to have conditional formatting on the tables. The idea is to change the colour based on the priority of the ToDo item, or whether the target date is in the past or not.

I have posted an example in TiddlySpot. You can find it on the followuplist TiddlyWiki.

Here is the script I used for the tiddler:

  1. <<forEachTiddler

  2. where

  3. 'tiddler.tags.contains("FollowUp")
    && tiddler.tags.contains("Name") &&
    !tiddler.data("Completed") == true &&
    !tiddler.tags.contains("TiddlerTemplates")'
    sortBy 'tiddler.data("Priority")'

  4. script

  5. '

  6. // date format DD/MM/YYYY

  7. function dateDifference(tiddler) {

  8. var d1, d2;

  9. var s = tiddler.data("TargetDate");


  10. if (s == undefined) { return 0 }


  11. d1 = new Date();

  12. d2 = new Date();

  13. d2.setMonth(s.substr(3,2)-1);

  14. d2.setDate(s.substr(0,2));

  15. d2.setFullYear(s.substr(6,4));

  16. return d2-d1;

  17. }


  18. function writeRow(index, tiddler)

  19. { var result = ""; if (index == 0) {result = "|!Priority|!Description|!Date Opened|!Target Date|\n";}

  20. if (tiddler.data("Priority") == 1) {result += "|bgcolor(orange):"}

  21. else if (tiddler.data("Priority") == 2) {result += "|bgcolor(yellow):"}

  22. else if (tiddler.data("Priority") == 3) {result += "|bgcolor(lightgreen):"}

  23. else {result += "|"}

  24. // result += dateDifference(tiddler) + "|";

  25. result += tiddler.data("Priority") + "|[[" + tiddler.title + "]]|" + tiddler.data("DateOpened") + "|" ;

  26. if (dateDifference(tiddler) < 0 ) {

  27. result += "bgcolor(orange):";

  28. } else if (dateDifference(tiddler) == 0 ) {

  29. result += "bgcolor(yellow):";

  30. }

  31. result += tiddler.data("TargetDate") + "|\n";

  32. return result;

  33. }

  34. '

  35. write

  36. 'writeRow(index, tiddler)'

  37. >>