Installing .docx support in OpenOffice.org in Linux

Update: Beginning with OpenOffice.org 3.0, reading and writing Microsoft Office 2007 file formats is now supported out-of-box and this guide is no longer relevant.

Microsoft Office 2007, another member of the crappy Microsoft product family, has graced us with the .docx format. It's the "open xml format" which no one else can seem to use. There's an interesting article here, http://holloway.co.nz/can-other-vendors-implement-ooxml.html, about the difficulty for other vendors to implement Microsoft's "open" standard. I'm no expert at examining document standards, but the article is convincing and we all know Microsoft's history. 

Javascript Date.getFullYear() deprecates Date.getYear()

Apparently this is old news to intelligent developers. I am an idiot. So it was news to me :)

The javascript method Date.getFullYear() depreciates Date.getYear(). Some browsers will simply return the number of years since 1900 if you use Date.getYear(). So use Date.getFullYear() to include dates.

W3Schools Javascript Methods List

Hibernate 3 antlr.jar conflicts with OC4J's TopLink antlr.jar

The Problem

I'll say it here and I'll probably say it again -- I hate Hibernate. Nonetheless, several of the applications in my office implement the technology and we can't take it all out all at once. We deploy to an Oracle Application server and develop locally using Eclipse and OC4J.

One particular feature of Hibernate is HQL (Hibernate Query Language) which is for writing object-oriented SQL queries. One of my applications kept throwing errors with regard to Hibernate HQL-related sections. One error in particular that kept coming up was:

How to convert an Oracle SQL Date to custom string format

Due to the smattering of SQL databases out there, it was a bit frustrating trying to find the appropriate syntax for Oracle SQL when I wanted to do a date conversion to MM-DD-YYYY. I found a great IBM article on the topic which helped me out. Turns out to_date() and to_char() are my friends.

http://www-1.ibm.com/support/docview.wss?uid=swg21134739

How to parse a query string using Javascript

So at my job, our Google Appliance server needed a reboot, and was going to run fsck on its next startup. This would take anywhere from 5 minutes to 6 hours. So I had to write a quick script to live in the Google Appliance server's spot during this outage which would redirect all searches to Google and put in the text 'site:www.example.com'.

There was a great article on how to parse query variables from a URL over at a blog called Idealog.

Hello World

Hello world!

OK... good this thing works :) My name is Reid and I will be your host for your time at this website. This is my first post... by far the least interesting. To get to know a little bit about my blog check out the About section.

Syndicate content