Zend_Pdf drawing multi-line text

Posted: 31st oktober 2011 by Paul de Raaij in PHP
Tags: , ,

Here is an easy trick to enter multi-line text with Zend_Pdf which I use in some Magento PDF creators

$this->y = 150;
$description = wordwrap(strip_tags($product->getDescription()), 110, "<br />");
 foreach (explode("<br />", $description) as $i => $line) {
     $page->drawText($line, 65, $this->y - $i * 12, 'UTF-8');
}
Share

I-7: Onderzoek Apple & Geo-Informatie

Posted: 23rd juli 2011 by Paul de Raaij in LOI/Opleiding
Tags: , , ,

Voor het laatste major blok op de HHS moesten we een onderzoek uitvoeren naar een onderwerp naar keuze. Samen met een studiegenoot besloten we om een onderzoek te doen naar de perikelen rond de opslag van geografische informatie op Apple devices.

Dit onderzoek hebben we beoordeeld gekregen met een 8 en daar zijn we dan ook blij mee. We hebben ons best gedaan om zo nauwkeurig mogelijk te werk te gaan, maar kunnen niet garanderen dat het foutloos is.

Lees hier het onderzoeksrapport

Share

Valideren elfproef met jquery.validate

Posted: 10th juni 2011 by Paul de Raaij in Webdevelopment
Tags: ,

Aangezien ik iedere keer weer een custom validatie op bankrekeningnummers moest schrijven, werd het maar eens tijd om het in het digitale archief te plaatsen. Wellicht heeft iemand er nog wat aan…


jQuery.validator.addMethod("elfproef", function(value, element) {
var sum=0;
for (i=1; i<10; i++) {
amount=value.charAt(i-1);
sum+=amount*(10-i);
}

if (sum % 11==0 && value.length==9) {
return true
} else {
return false
}
}, "Vul hier een geldige bankrekeningnummer in.");

Share

Using Doctrine in Joomla

Posted: 5th maart 2011 by Paul de Raaij in PHP, Webdevelopment
Tags: , ,

Joomla is a decent CMS with very nice features. It works great for the end user and has many components ready to use from the online world. What I don’t like personally, as a developer, is the model implementation in Joomla. For me the way ‘ model and table’ classes are implemented, just doesn’t feel right to me. Also it is very difficult to get other models in a controller or an other model class.

Read the rest of this entry »

Share

RTL gemist bekijken op Ubuntu 10.10

Posted: 12th februari 2011 by Paul de Raaij in Algemeen

Als groot liefhebber van Voetbal International vond ik het vrij frustrerend dat ik dit programma niet terug kon kijken via mijn Ubuntu omgeving. Door het hele DRM gebeuren wat Moonlight niet ondersteund was het niet te doen om via rtlgemist.nl de afleveringen te bekijken.

Read the rest of this entry »

Share

A way to implement unit testing in Joomla!

Posted: 31st juli 2010 by Paul de Raaij in PHP, Webdevelopment
Tags: , ,

Since a couple of months I’m not anymore self-employed and am I working for a company who develops for ActiveCollab, Magento and Joomla!. While developing I’m trying to work according the TDD paradigm. So you write your tests first and then you develop the business logic to succeed the failing test. I’d have to admit that Joomla! never will be my first choice to develop on, but it isn’t as bad some are preaching.

Read the rest of this entry »

Share