Skip to main content

Posts

Animated PNG in Firefox

For those following the development of the next version of Firefox, they have extended it to include support for ANPG (Animated PNG). This move seems to be in response to Opera 9.5 alread implementing this. Further info can be found at: http://animatedpng.com/

Open Source Project Management Tools

Alright. Here's the deal. Who needs a feature bloated application when you know that you will not need it all and that it's possibly confusing. All hands shot up in my work place when it comes to project management. Yes, there's the frustration with Microsoft Project. MS Project is an excellent tool but far too complicated for my liking. So I had to search around for project management tools and open source was the keyword (especially Windows). Here's a list of notable ones that I found: Achievo ( www.achievo.org ) BORG Calender ( borg-calendar.sourceforge.net ) - More of a PIM but it's got some nice project management features dotProject ( dotproject.net ) - While being ugly it uses a server backend for enterprise delivery making it a selling point for this package eHour ( www.ehour.nl ) - time management and project management with a slick interface, especially handy for consultancy firms OpenWorkbench ( openworkbench.org ) Projectory ( projectory.sourceforge.net ...

Make free videos with Pinnacle

Just when you thought you were stuck with Windows Movie Maker only to make your home videos look good. Pinnacle has joined the foray with VideoSpin. VideoSpin is a brand new tool that allows you to create your own movie clips in minutes using your own videos and pictures. Once you complete your masterpiece you can upload the video to YouTube or any other video sharing sites. Check out http://www.videospin.com/ .

New Ray, Blue Year

Happy New Year! I've had a hectic start to the New Year trying to fulfill my New Year's Resolution. Remembering to keep promises I've made to the family. I never realised I had a long list. What am I using to achieve this? The most underused program in a Smartphone... the To-Do List. Yes, it is underused and it exists on virtually all the current phones in the market. It is such a simple program and I intend on using till my fingers run out of blood. Probably won't happen, but nevertheless. However, the news for the beginning of the year goes to Blue Ray. Previously the HD war was leaning towards HD DVD, with the XBox 360 adding support to it. Only recently did Paramount announce that they intend on dropping support for HD DVD, along with Dreamworks and Disney. So if you're intending on getting the PS3 go ahead. It's still cheaper than buying a separate Blue Ray player.

Alternative row colours in XSL

In the same project as before, my search results are being presented in a table.  The issue here, is that I want to have a different background colour for an alternate for the purpose of easy readability. Luckily, XSL saves the day with the position() function.  This is really handy for obtaining your current index when in a loop.  Just as with using any other server side language you want to mod 2 the position to identify the alternate row: <xsl:if test="position() mod 2 ='1'">     <xsl:attribute name="class">rowA</xsl:attribute> </xsl:if> For a quick reminder of the modulus operation ( mod ): when applying the arithmetic on an even number it, correctly returns 0.  When applying to an uneven number, such as 5, it will return the value 1.  1 denotes that there is a remainder. The purpose of xsl:attribute is to apply XML/XSL to an attribute of a HTML tag.  In this case I want to apply a CSS style to the table row ( tr...

XSL Calculations and Formatting

While using XSL I came across the need to perform a calculation by converting metres to some other units, and then formatting the output. number() takes the value of the selected node and treats it as an actual number.  number() div 1000 is my actual calculation to convert metres to kilometres. Notice that I am using the keyword div and not the / operator as you would with other languages such as Javascript:     <xsl:value-of select="number() div 1000"/> km Being all nice and outputting my desired output, this is flawed. When it comes to outputting in other units such as miles and yards, it shows a large nasty decimal number.  It's far too accurate and long that it's not really user friendly.  A simple presentation would be to limit the output to 2 decimal places.  The answer to this is to use the format-number() function. This was all achieved in this one-liner:     <xsl:value-of select="format-number(number() div 1000,'#0....

Test for spaces in text

When it comes to XSL you have to pay particular attention to the schema of the XML you are trying to make use of.  There are certain cases when you do not have control over the XML being produced that your XSL needs to be generic. I am currently updating a Community Portal, which I developed in the past for my current company and have just discovered a silly human error.  Yes. I made a bad mistake.  The coding for this system assumed that there would be no spaces in a post code when trying to build a list of links. The block was along the lines of: <a target="_blank">   <xsl:attribute name="href">     <xsl:value-of select="@theLink" />     <!-- Check length of string and attach post code with a space -->   </xsl:attribute>   <xsl:attribute name="title">     <!-- Attach the title of the link for accessibility-->   </xsl:attribute>   <xsl:value-of select=...