Author Archive
Zimbra – Releasing quarantined emails and attachments
by jeshurun on Dec.15, 2010, under Technology
If you are reading this post, chances are you administer a Zimbra mail server, and you need to recover an email that was blocked by amavisd for one of your users. This might have happened for a variety of reasons, including your spam score being too high, you have blocks based on file types, or if the email contained an attachment that was encrypted. What you would have quickly found out though, is that there is no quick and easy way of recovering a blocked email and forwarding it on to the intended recipient (at least in the community edition, I’m not sure of the network edition).
There presently seem to be at least three ways of doing this, and following is the low down on the easiest way I’ve found so far. If you just need to view the email, please skip to end of this post.
Rebranding Rogers Xperia X10a for Android 2.1 Update
by jeshurun on Nov.14, 2010, under Random Scribblings
For those oblivious to the obvious, the Android 2.1 update for the Sony Ericsson Xperia X10 smartphone has finally hit Canada. If you bought the X10 from Rogers and haven’t debranded it, just connect your phone to the computer via USB and use Sony Ericsson Update Service (SEUS) or Pc Companion for some 2.1 goodness.
This post is for those who are having trouble getting the update, especially those who de-branded the phone to get global updates in the past. Most of this was done with a bug in the SEUS software which allowed a firmware from a different region to be flashed to the phone.
The problem now is that SE have fixed this since then, and re-branding your phone back to Rogers firmware has become somewhat tricky. Re-branding is necessary as presently the generic flash tool for North America isn’t available yet, and the only way you can get the Android 2.1 update, while still keeping your model as X10a is to get the update from Rogers. I spent half a day trying to figure this out, and I thought I might post my findings here, hoping someone else might find it useful.
Modifying a JasperReports chart at run time
by jeshurun on Nov.06, 2010, under Technology
To modify a report at run time, it is imperative to understand the overall process of how a jrxml ends up in its final form as an image / pdf / etc. The following steps briefly outline this process.
1. The .jrxml file is loaded into memory using a variant of JRXmlLoader’s loadXML() methods, passing it the location of the file as an argument. This method returns a JasperDesign object, which is the in-memory representation of the input jrxml, on which all the run-time modifications to the report would be made.
2. After the necessary modifications have been made, the JasperDesign file is validated and compiled using one of JasperCompileManager’ compile methods. Depending on the arguments passed, this method returns a JasperReport object or saves the generated .jasper file to the location specified as the second argument to the method. Note that when dynamic modifications of the report is not required, the jrxml could be directly compiled into a JasperReport object / .jasper file using the appropriate compile method.
3. The application then prepares the data necessary for the report as JRDataSource objects, and then calls a suitable method in the JasperFillManager class, passing it the data source and the previously compiled JasperReport object / .jasper file. The output of this step would be a JasperPrint object, which could be exported to various other user-friendly formats such as PDF and Html or serialized to disk.