Archive for August, 2008

27 Dresses

Saturday, August 30th, 2008

Adrian’s Rating: 7
WO - Watch once (or women only)

Ok, first things first, this is not the type of film I go out of my way to see. Marriage being what it is, I have little (read no) say in what I get to watch - though Lou is getting better at almost fooling me into thinking I have a choice sometimes… and I am extremely lucky in that she actually loves science fiction, comic adaptation and action movies - but I digress…

The quote on the box ”Entertaining and funny. A really lovely chick flick” Mail on Sunday You - Andrea Wolfmuther pretty much sums it up. Katherine Heigl is a beautiful actress (this is the first thing I have seen her in) and fits the lead role well. This and the obligatory montage of her in 27 bridesmaids dresses (hence the title) are the only memorable moments for me.

Otherwise, one short hand over eyes embarassing moment, one almost tear-jerker moment, and the rest is fairly standard romantic comedy fair - nicely done, but with nothing that makes it stand out or provides incentive to watch again. This is strictly a watch once and forget for me - definately not “this season’s must-have accessory” - though possibly I am not the target audience :)

Lego Indiana Jones: The Original Adventures

Wednesday, August 27th, 2008

XBOX 360
Adrian’s Rating: 7
Achievement Rating: Medium

Completed this the weekend before last (after a couple of weeks of play - I am only a casual gamer!) Fun, addictive, but ultimately repetitive (especially getting the last achievements!) What I do love about these games (the Lego ones) is the comic animations of the Lego characters. With the focus not on graphics (its Lego characters!), the playability and humour get a chance to really shine - and shine they do.

After completing 100% of the game, I was left with 1 “known” achievement (”Oh it breaks the heart”) and 10 secret achievements . Looked up the secret achievements at this point and how to complete the “known” achievement. Ended up having to look up how to complete the “Blow it up!” achievement too.

Removing old RedDot CMS log and temporary files

Tuesday, August 26th, 2008

I had cause to investigate last week why a user defined job in RedDot CMS that had been set up to delete all common log files older than 3 days, once a week, wasn’t. The RQL for the job (below) looked fine. The permissions on the files and folders looked fine. Eventually, I emailed RedDot UK support…

<IODATA loginguid="[!guid_login!]">
  <ADMINISTRATION>
    <LOGDIR action="delete" donotlog="1" guid="Common" days="3" format="1"/>
  </ADMINISTRATION>
</IODATA>

… its a known defect (25320) - caused by the “days” parameter in the user defined job. However, if you do not use this parameter, all logs will be deleted. Apparently due to be fixed in RedDot CMS 7.5 SP2. I had also asked about any functionality to clear out RedDot execute and pre-execute temporary files (they were starting to overwhelm the ASP folder) - but there isn’t any. They did suggest I could write my own however…

So here it is - a VB script file for cleaning up your RedDot CMS log and temporary files. In fact, other than the specific file name matching, this could be used for any log or temporary file cleanup task - assuming you are on a Windows server anyway.

' E:\Program Files\RedDot\cleanupTempFiles.vbs
' This script is meant to run as a scheduled task once per week. It cleans up RedDot files older than 8 days.
' In E:\Program Files\RedDot\CMS\ASP: rdexecutetemp*.php, PreExecute_*_temp.php
' In E:\Program Files\RedDot\CMS\ASP\LOG\Common: *_RDCMS_Async.log, *_RDCMS.log, *_RdMailer.log, *_dberror.log
' 22/08/2008 Adrian Mateljan

cutoff = dateadd("d", -8, date)
cleanup "E:\Program Files\RedDot\CMS\ASP", "^rdexecutetemp.*?\.php$", cutoff
cleanup "E:\Program Files\RedDot\CMS\ASP", "^PreExecute_.*?_temp\.php$", cutoff
cleanup "E:\Program Files\RedDot\CMS\ASP\LOG\Common", "^.*?_(RDCMS|RDCMS_Async|RdMailer|dberror)?\.log$", cutoff

Sub cleanup(folderName, pattern, cutoff)
  Set fso = createobject("scripting.filesystemobject")
  Set folder = fso.getfolder(folderName)
  Set files = folder.files
  Set re = new regexp
  re.Pattern = pattern

  countFiles = 0
  countSize = 0

  For each file in files
    If re.Test(file.name) Then
      If file.datelastmodified < cutoff Then
        'wscript.echo "Deleting " & file.name & " last modified: " & file.datelastmodified
        countFiles = countFiles + 1
        countSize = countSize + file.Size
        On Error Resume Next
        file.delete
      End If
    End If
  Next

  wscript.echo "Deleted " & countFiles & " files from " & folderName & " [" & niceSize(countSize) & "]"

  Set re = Nothing
  Set files = Nothing
  Set folder = Nothing
  Set fso = Nothing
End Sub

Function niceSize(size)
  units = "B"
  If size > 1024 Then
    size = Round(size / 1024, 1)
    units = "kB"
  End If
  If size > 1024 Then
    size = Round(size / 1024, 2)
    units = "MB"
  End If
  If size > 1024 Then
    size = Round(size / 1024, 3)
    units = "GB"
  End If
  niceSize = "" & size & units
End Function

So - line 7 shows you how to set the cutoff date for removing files (in this case, anything older than eight days.) Lines 8, 9 and 10 show various examples of regular expressions used to match the RedDot CMS log and temporary files in question to be removed. Simply modify the cutoff date and filename matching to taste, set up as a scheduled task (possibly commenting out the wscript.echos) and you should be all set!

Note that we are using PHP in RedDot CMS - so the files have PHP extensions, not ASP or ASP.Net. A PHP version of this script next week… Enjoy!

Da Ork Angelz

Monday, August 25th, 2008

Welcome to the first pictures of my new Warhammer 40K Ork army - Da Ork Angelz. Blood Axes through and through, Da Ork Angelz have based their gear and taktiks on those of the ‘umies - but not any ‘umies - the Dark Angels Space Marine Chapter.

Pictured below are a couple of shoota boyz (two boyz with shots from front, side and rear) from a Taktikal Shoota Boyz Mob, currently in progress. Note the dark green armour, red weaponry and details, and bone white markings. The rest of the orginal ten boyz pack are on the way, and are pretty much a tester for the paint scheme and my painting skills. It includes another shoota, two sluggas, two ‘ard boyz sluggas, a big shoota, a rokkit launcha and a nob with slugga and powerklaw. The nob has bone white details and shirt.

The army will eventually sport Da Deff Wingz (Mega-armoured Nobz in bone white armour with red weapons and dark green markings) and Da Rav’nwingz (Warbikers and Deff Koptas in black armour with red weapons and white markings)

Thanks to a parting gift from UCB (an Ork Battleforce), the horde should continue to grow (slowly) over time…

Hellboy II: The Golden Army

Sunday, August 24th, 2008

Adrian’s Rating: 7

Saw Hellboy II on Saturday with Lou (of course), Paul and Helen (friends and ex-workmates from UCB.) Overall - fun, entertaining and visually spectacular. Usual comic book adaptation downsides - predictable plot (what there is of it) and overly long. No particularly memorable moments :(. I am not particularly knowledgeable of the comic (or any comic for that matter) - so I leave comparison in that regard to more qualified people.

As my first movie review entry (and having not a lot to say), I should explain my rating system. Basically its a score out of 10, and works something like this:

  1. Why was this even made? Can I have my life back?
  2. Terrible
  3. Painful
  4. Had potential, but…
  5. Below average. Tedious, boring or both.
  6. Average. No distiguishing features (or drawbacks)
  7. Fun, enjoyable or both. (Lara Croft Tomb Raider, M: i-2)
  8. Great. Meets purchase criteria. (Charlies Angels, Galaxy Quest)
  9. Excellent. Must have. (Batman Begins, The Shawshank Redemption)
  10. Personal favourite. Could watch over again and again and again… (Aladdin, The Fifth Element)

I have a soft spot for comic adaptations, so depending on your personal preferences, subtract one (or more) from my rating for these :). A rating of 8 is usually required before adding to our personal library, though Lou will succumb to 7’s. A rating of 7 is also allowed to complete a set including 8’s or above. At least that is the theory… Haven’t worked out how to apply this system to gifts yet…

RedDot CMS, SmartEdit and Javascript

Monday, August 18th, 2008

If you have Javascript in your website, and have implemented your Javascript files as templates in RedDot CMS (version 7.5), linked in to your HTML page via an anchor placeholder, you will most likely have come across this issue - your Javascript doesn’t work in SmartEdit!

The reason? RedDot CMS in SmartEdit mode does some mucking around with your template which causes Javascript errors. Take the simple Javascript template below:

function helloWorld() {
  alert("Hello World!");
}

In SmartEdit, this becomes:

<HTML><HEAD></HEAD><BODY ONLOAD="CheckAllTargets();" ><SCRIPT language="javascript" src="ioEditElement.js"></SCRIPT><SCRIPT language=javascript src="RDCleanHtml.js"></SCRIPT>
<SCRIPT language="javascript">var sInvertDirectEdit="0";var sRemoveFontSettings="1";var sRemoveStyleSettings="1";var sAllowedStyleAttributes="";</SCRIPT>
function helloWorld() {
  alert("Hello World!");
}

As you might expect - this isn’t valid Javascript, and basically the Javascript processing stops at the top of the file. We can eliminate this with a single line of code to our original Javascript file:

<!IoRangeRedDotMode>/* <body>RedDot decoy</body> */<!/IoRangeRedDotMode>
function helloWorld() {
  alert("Hello World!");
}

Now, when RedDot CMS renders the Javascript in SmartEdit, it will be conveniently fooled by our decoy HTML body tags (as shown below) and all will be well!

<!IoRangeRedDotMode>/* <body ONLOAD="CheckAllTargets();" ><SCRIPT language="javascript" src="ioEditElement.js"></SCRIPT><SCRIPT language=javascript src="RDCleanHtml.js"></SCRIPT>
<SCRIPT language="javascript">var sInvertDirectEdit="0";var sRemoveFontSettings="";var sRemoveStyleSettings="";var sAllowedStyleAttributes="";</SCRIPT>RedDot decoy</body> */<!/IoRangeRedDotMode>
function helloWorld() {
  alert("Hello World!");
}

Battling WordPress: Displaying source code, Part II

Monday, August 18th, 2008

Its amazing what you can achieve when you upgrade - this blog is now on the latest version of WordPress - version 2.6.1. General observations (compared to version 2.0.2):

  • The editor now remembers formatting (line breaks, indenting) within HTML pre tags.
  • The editor now handles HTML entities properly - I can enter code AND modify it later, without screwing everything up.
  • Consequently, HTML body tags and RedDot markup within HTML pre tags is working properly.
  • Upgrade hasn’t affected my Google Syntax Highlighter plugin.
  • The editor is still removing the deprecated name attribute from the HTML pre tags - so my Javascript hack mentioned in the previous post is still required. 
  • The update wasn’t difficult, but I thought the update instructions could have been clearer.

I will post my blog entry with code and you can be the judge!

Warhammer World

Sunday, August 17th, 2008

For my birthday this year, Lou and I made our way up to Nottingham to visit Warhammer World. But first, some history…

My first introduction to Games Workshop, Citadel Miniatures and Warhammer was back in the early 1990s while I was studying software engineering at university. I am pretty certain it was Kevin, Kenny and Sue’s fault - as it was their Warhammer Fantasy Battle, High Elves versus Dwarves, that started it all.

I started a Chaos army (Tzeentch) then, but my true love came later, with the release of Warhammer 40K (second edition). The box set came with plastic Space Marine, Ork and Gretchin miniatures and so my first Waaagh! began…

I played many battles during my four years at university, mostly Warhammer 40K as Orks, but also many other armies and games. A table may be the best way to show how much my friends and I had been gripped by the hobby:

Player/Game Warhammer 40K Warhammer Fantasy Battle Blood Bowl Necromunda
Adrian Orks
Dark Angels
Chaos (Tzeentch) Wood Elves
Chaos
Escher
Delaque
Vincent Eldar
Dark Eldar
Night Goblins
Chaos Dwarves 
Orcs
Dark Elves
Orlocks
Van Saar
Kevin Space Wolves Dwarves Dwarves Goliaths
Rafi Space Marines  N/A Undead N/A
Ara ? N/A Humans
Skaven?
N/A
Brad Chaos Marines
Imperial Guard?
N/A Undead N/A
Kenny and Sue N/A High Elves N/A N/A

These were just my main games and armies. I have also dallied with Tyranids, Eldar, Imperial Guard and most of the original Blood Bowl teams (including the Death Zone expansion.) At one stage we were playing 3000 point Warhammer 40K battles (they took a day!) or two games of Blood Bowl (often two side by side for four games in a day) every weekend. (I can no longer recall small games of Warhammer 40k - we must have at some point…) On the minor side, I bought Epic. I know Vin got into Mordheim and even Battlefleet Gothic at one point.

And I do have some fond memories:

  • My first game of Blood Bowl was for the rules prior to the current revised edition. It was more like a war than a sport. It took us most of the day to get to half time.
  • Having 90% of my Ork horde wiped out in turn one by a virus grenade.
  • Watching my brother Vin’s Eldar wipe out Kevin’s Space Wolves (3000 point no less!) by his turn three.
  • Watching Vin’s Eldar wipe out my Orks (again, 3000 points) without a scratch!
  • Eldar swooping hawk exarchs deep striking and throwing vortex grenades (I’ve used this tactic myself)
  • Watching Rafi take three times as long to deploy and take his turns with his Space Marines than I with my Orks - and I would outnumber him at least three to one!
  • Rolling for and moving dozens of smoke and vortex grenade templates. (Rafi again)
  • Reaching a team rating of over 200 with Wood Elves in our first Blood Bowl league. They were virtually untouchable! Consequently, I could never get another new Wood Elf team to survive past three games…
  • Watching Vin’s Orc team kill or seriously injure two thirds of Kevin’s Dwarf team. Both teams were about team rating 160 from memory (before, anyway. Kevin’s Dwarves never recovered.)
  • The rise of the Undead - Rafi’s Undead Blood Bowl team rises easily to the top of our second league. Assisted by the then 2+ regeneration rule, what does an Undead team spend its crowns on once you have maxxed out Vampire Star Players?
  • The rise of Chaos - My Chaos team has but one goal - to slaughter the Undead and bring them back to size. Unfortunately, with a dirty player that could kill on a 7+ (amongst other atrocities), getting other games was difficult (no one wanted their team taken apart). In the end, the two teams played each other the allowed twice and then were retired due to lack of other opponents… (and I never did manage to bring the Undead down - though thankfully the regeneration rule was revised to 4+ by our next league…)
  • Watching a large Gretchin mob tie up an Eldar Wraithlord in hand-to-hand for an entire game.

Oh, and in case you are thinking Vin must be some exceptional general/player - we had a personal rule for him. NEVER let him know what he needs to roll to be successful. ALWAYS let him roll first, and work out the results later. Vin had a very uncanny ability to roll exactly what he needed if he knew before hand. That being said, he was an exceptional general/player also - and the combination of these two abilities led to many heartbreaks, the worst of which are listed above.

After completing university and joining the work force my time in the hobby slowly deteriorated. The last White Dwarf I bought had the free Necron miniature on the front. I tried to ressurrect my interest with the release of the Lord of the Rings game - but again, time and other interests / commitments were the deciding factors. In 2006, when we sold up (almost) everything to move to the UK, my proud collection of miniatures and games went too (there is some lucky young lad in Perth who landed a mightly windfall!)

However, with the move to the UK, I realised I would be in a position to visit the Games Workshop Headquarters and Warhammer World - the Mecca of Games Workshop hobbyists everywhere. And so, for my birthday this year, Lou and I made our way up to Nottingham to fulfill this goal.

Now, to get the most out of Warhammer World I figure you need to be a hobbyist, not an ex-hobbyist - the events, gaming tables, painting and modelling workshops etc would have been much more engrossing if I had still been in the hobby. But, the journey was worth the effort - we spent just over an hour making our way through the building. The history of the games and the miniature displays were very impressive and nostalgic. I was amused that I could tell which miniatures were painted before and after I left the hobby by the method of basing.

There were a couple of downsides. It has sparked my interest in the hobby once again. I found out that Warhammer 40K fifth edition was due out soon (and has now been released) and a lot more miniatures have been released since last I played… (as well as new armies!)

So I have taken the plunge. I purchased a box of Ork boyz and necessary modelling tools and paints with the birthday money I received from my parents. The Waaagh! has begun again… 

Battling WordPress: Displaying source code

Wednesday, August 13th, 2008

You would think adding source code to a blog would be easy, or maybe I am just getting old… Anyway it all started with trying to make use of the HTML pre tag - except that line breaks and spacing weren’t being preserved. I then moved onto the HTML code tag - same problem. In my travels I came across the following:

The first uses the Google Syntax Highlighter plugin for WordPress - and looks great - except I can’t seem to get the name attribute of the HTML pre tag to stick (I figure because it is deprecated in XHTML), and the alternative HTML textarea method - well I haven’t had much more luck with the line break and spacing preservation and it mucks up the editor having form elements in it. Not only that, but adding HTML form tags seems to have stopped my ability to Save changes…

The second, from WordPress themselves, just rementions the HTML pre and code tag variations I tried first :(.

Further investigation led me to:

Which has been helpful in hacking the HTML pre tags to work - but still hasn’t overcome the issue of entering the code in the first place. Even resorting to constructing it externally and pasting it in (editing it resets all of the escaping), I am still having difficulties with RedDot markup being confused for HTML comments, missing HTML body tags, using HTML br tags for line breaks, non-breaking spaces for indenting and having to re-enter all of the escaping everytime I edit the post.

Conclusion - I think it is the text editor that is the main problem, which is most likely linked to my not using the latest version of WordPress, currently 2.6. (I am using the auto-install version provided by my hosting provider - probably my first mistake - which is 2.0.2) So I will investigate upgrading first. I have noticed in my searching that there are quite a few different code viewing plugins, so regardless of whether an upgrade solves my issue I will probably take a closer look at some of these too.

I will record my final solution when I finally obtain it!

G’day and Welcome!

Thursday, August 7th, 2008

Welcome to my new blog, just one more in the many millions that exist (on the Internet, not mine personally - this is my first…)

In creating this blog, I have three main goals:

  1. To record anything interesting (to me) that I have been doing, thinking or working on - like a personal, available anywhere, diary and notebook.
  2. To keep my family and friends up to date with point one above.
  3. To share my knowledgebase and resources with anyone who is interested.

With that in mind, I expect that my entries will cover, in no particular order or importance:

  • Diary - events of interest in my life, for family and friends (and me!)
  • Journal - my personal online knowledge repository.
  • RedDot CMS and RedDot LiveServer - thoughts, frustrations and lessons learnt (work)
  • WCMS - web content management systems in general (including my long suffering personal project)
  • Warhammer 40K - the Waaagh! has started again…
  • Travel - my adventures across the globe, past, present and future.
  • XNA - the Microsoft games writing framework (including the Arthur project with Iain)
  • Movies - personal reviews and ratings - past and present.
  • Projects - various personal projects I am working on.

It is a little unfocused, but I am hoping that it will leave me no excuse for not updating it. Speaking of updating, I am aiming (initially) to add an entry at least once per week.

So, there you have it. Let the blogging begin!