codeBlog
Caffeine Addicted Beta 0.9.21


Language: EN | FI

Just got my box and it is HUGE, but without a further ado to the pictures:


Here's some screenshots from this great game:

http://kolkko.net/Publishmatic/user-content/images/thumbs/thumb_Ilgern_picture005.pnghttp://kolkko.net/Publishmatic/user-content/images/thumbs/thumb_Ilgern_picture006.pnghttp://kolkko.net/Publishmatic/user-content/images/thumbs/thumb_Ilgern_picture003.pnghttp://kolkko.net/Publishmatic/user-content/images/thumbs/thumb_Ilgern_picture002.png


I don't know what clicked on my mind when I pressed the 'flash' button tonight but I do know that the consequences were rather catastrophic, at least from bios chips point of view. Stupid really, my mistake, Asus winflash has so far worked ok but that was on x86 side of xp and vista and now that I have switched over to X64 flavor it was bound to fail, why I did not use the ez-flash beats me. Result one dead mobo. Tomorrow I go and buy gigabyte P35 one and so on, but stupid waste of money in either case.

Today we also rearranged the whole flat, much more spacey now, pictures will follow.


I just finished rather tedious bit of work turning my XML to HTML XSLT routine to XML to RTF one. Why? Well I think I made bit of a miscalculation on my part when I thought that HTML files would be good enough for printing invoices. Although they're ok when there's like one invoice to print but printing many is not going to work so easily, for one pagination is rather difficult as are font-sizes and every other crap. So I have this piece of software that outputs invoices as XML and I really didn't want to start tinkering the code, which by the way is done on C#, so the support for XSLT 2.0 was pretty much ruled out. Hate C# but for usability's sake I handed my pinky for the devil.

I wanted to create on A4 per tenant containing years worth of payments, naturally If I'd been able to use XSLT 2.0 this would have been done like 4 hours ago, seeming that XML produced was like:

<invoices>
<invoice>
</invoice>
<tenant>
<amountToPay>
<etc..>
</invoice>


So I'd just used the group-by function to to group same tenant's invoices together and formed the one A4 invoice that way, but no I just had to knife it out, the code I mean. So I refactored the XML to be produced like:

<invoice>
<invoice>
<tenant>
<totalAmountToPay>
<monthlyPayments>
<amount>
<dueDate>
</monthlyPayments>
<monthlyPayments>
<amount>
<dueDate>
</monthlyPayments>
<monthlyPayments>
<amount>
<dueDate>
</monthlyPayments>
</invoice>
</invoices>

So problem solved, Although the XML to RTF conversion proved to be somewhat difficult, I had to look out for how RTF documents are built and then create a XSLT stylesheet to accommodate that. so it ended up looking like this:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform lasku_11-3-2008.xsd">
    <xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/laskut">
        <xsl:text>{\rtf1\UTF-8</xsl:text>
        <xsl:text>{\fonttbl{\f0\fnil Times New Roman;}{\f1\fnil Arial;}{\f2\fnil Symbol;}{\f3\fnil Wingdings;}}</xsl:text>
        <xsl:for-each select="lasku" xml:space="default">
            <xsl:text>{\pard \b Vastikelasku \par}</xsl:text>
            <xsl:text>{\pard AS. OY Koukkukallio \line Tiliyhteys: 207438-1654 \par} \line </xsl:text>
            <xsl:text>{\pard \b Maksaja: \par}</xsl:text>
            <xsl:text>{\pard </xsl:text><xsl:value-of select="nimi1"/><xsl:text> \par}</xsl:text>
            <xsl:text>{\pard </xsl:text><xsl:value-of select="nimi2"/><xsl:text> \par}</xsl:text>
            <xsl:text>{\pard </xsl:text><xsl:value-of select="osoite"/><xsl:text> \par}</xsl:text>
            <xsl:text>{\pard </xsl:text><xsl:value-of select="postinro"/><xsl:text> \par}</xsl:text>
            <xsl:text>{\pard </xsl:text><xsl:value-of select="kaupunki"/><xsl:text> \par} \line</xsl:text>
           
            <xsl:text>{\pard \b Erittely: \par}</xsl:text>
            <xsl:if test="vastike != '0,00'">
            <xsl:text>{\pard \qj Vastikemaksu:        </xsl:text><xsl:value-of select="vastike"/><xsl:text>    EUR \par}</xsl:text>
            </xsl:if>
            <xsl:if test="rahoitusvastike != '0,00'">
            <xsl:text>{\pard \qj Rahoitusvastike:    </xsl:text><xsl:value-of select="rahoitusvastike"/><xsl:text>    EUR \par}</xsl:text>
            </xsl:if>
            <xsl:if test="saunavastike != '0,00'">
            <xsl:text>{\pard \qj Saunavastike:        </xsl:text><xsl:value-of select="saunavastike"/><xsl:text>    EUR \par}</xsl:text>
            </xsl:if>
            <xsl:if test="autotallivastike != '0,00'">
            <xsl:text>{\pard \qj Autotallivastike:        </xsl:text><xsl:value-of select="autotallivastike"/><xsl:text>    EUR \par}</xsl:text>
            </xsl:if>
            <xsl:if test="vesimaksu != '0,00'">           
            <xsl:text>{\pard \qj Vesimaksu:        </xsl:text><xsl:value-of select="vesimaksu"/><xsl:text>    EUR \par}</xsl:text>
            </xsl:if>
            <xsl:if test="saunamaksu != '0,00'">
            <xsl:text>{\pard \qj Saunamaksu:        </xsl:text><xsl:value-of select="saunamaksu"/><xsl:text>    EUR \par}</xsl:text>
            </xsl:if>
            <xsl:if test="autopaikka != '0,00'">
            <xsl:text>{\pard \qj Autopaikkamaksu:    </xsl:text><xsl:value-of select="autopaikka"/><xsl:text>    EUR \par}</xsl:text>
            </xsl:if>
            <xsl:text> \line</xsl:text>
            <xsl:text>{\pard \b Yhteensä: \tab </xsl:text><xsl:value-of select="maksettava"/><xsl:text> EUR /KK \par}\line</xsl:text>
            <xsl:text>{\pard \i Alla seuraavan laskutuskauden maksettavat vastikemaksut, laita rasti ruutuun maksun merkiksi niin voit seurata maksujasi.\par}     \line</xsl:text>
           
            <xsl:for-each select="erapaivat" xml:space="default">
            <xsl:text disable-output-escaping="yes">{\pard Eräpäivä: </xsl:text><xsl:value-of select="erapaiva"/><xsl:text>    Viitenumero: </xsl:text><xsl:value-of select="viite"/><xsl:text>    Määrä: </xsl:text><xsl:value-of select="maksettava"/><xsl:text> EUR</xsl:text><xsl:text>    Maksettu [   ] \par}</xsl:text>
            </xsl:for-each>
            <xsl:text> \page </xsl:text>
        </xsl:for-each>
        <xsl:text>}</xsl:text>
    </xsl:template>

</xsl:stylesheet>

Not so beautiful or efficient but it get's the thing done and that's all this is about.


I acquired the much hyped GTA IV this tuesday around 00:23, after about 35h played I finished the story. How was it? Well... certainly THE best in category of similar games, maybe even in 3D category ever. Although there are couple issues like texture popping (which is not as bad as told by many people), loud noise of the DVD drive. By the way couldn't we get the possibility of installing games, huh? Story was very engaging and once you get by the low-key beginning the game really sucks you in and you really cannot stop until done (like every good game is supposed to do :))

Wishlist for future addons:

  • More clothes (some operational clothes etc..)
  • More weapons, possibly some silenced one's please!
  • More side missions
  • Well more GTA IV please, need moar!

 


View older posts