Sunday, 24 May 2009
What is Java CAPS?
Please bookmark, your votes are noticed and appreciated:
Thursday, 7 May 2009
Internet Explorer (IE) accelerator for Google Calendar
I was looking for an accelerator for Google Calendar but couldn't seem to find one so I created my own.
It is surprinsingly easy to create an accelerator. All you need is to host an XML file on a publicly accessible website:
<?xml version="1.0" encoding="UTF-8"?>
<os:openServiceDescription
xmlns:os="http://www.microsoft.com/schemas/openservicedescription/1.0">
<os:homepageUrl>http://www.happyads.ch</os:homepageUrl>
<os:display>
<os:name>Google Calendar</os:name>
<os:icon>http://www.google.com/accounts/calendar/favicon.ico</os:icon>
<os:description>Add to Google Calendar</os:description>
</os:display>
<os:activity category="Add">
<os:activityAction context="selection">
<os:execute action="http://www.happyads.ch/googleCalendar" method="get">
<os:parameter name="action" value="TEMPLATE" type="text" />
<os:parameter name="text" value="{documentTitle}" type="text" />
<os:parameter name="dates" value="{selection}/{selection}" type="text" />
</os:execute>
</os:activityAction>
</os:activity>
</os:openServiceDescription>
and create a button linking to the XML file:
<button id="myButton" onclick="window.external.AddService('http://www.happyads.ch/googleCalendar/accelerator.xml')">Add Google Calendar Accelerator</button>
As dates can come in several formats I have used a website I own to do the date parsing: http://www.happyads.ch/ (the parsing is done using the PHP language). Once the date has been parsed and transformed into a Google Calendar compatible date (yyyymmdd e.g. 20091231) it is then automatically forwarded to Google Calendar.
Why not try it out and tell me what you think of it:
Of course you need a Google Calendar account for it to work.
At the moment the following date formats are supported:
- yyyymmdd (e.g. 20091231)
- dd.mm.yyyy (e.g. 31.12.2009)
- dd.mm.yy (e.g. 31.12.09)
- dd/mm/yyyy (e.g. 31/12/2009)
- dd/mm/yy (e.g. 31/12/09)
- dd-mm-yyyy (e.g. 31-12-2009)
- dd-mm-yy (e.g. 31-12-09)
- (d)d month yyyy (e.g. 31 december 2009)
Please bookmark, your votes are noticed and appreciated:
Sunday, 3 May 2009
JavaFX: "Nice features but still needs improvement"
I asked a Software Engineer who has already used JavaFX quite extensively what he thought of it. His answer was that it is already possible to do some nice things with JavaFX (mostly on JavaSE) but that there are still a lot of problems.
JavaFX Problems and Weaknesses:
- Lack of features (widgets, layout managers, codecs)
- Too many bugs
- No hardware available yet for JavaFX Mobile (despite Sun signing deals with Sony Ericsson and LG)
- Performance problems
Please bookmark, your votes are noticed and appreciated:
Monday, 27 April 2009
Optical discs to offer up to 500GB of storage
General Electric (GE) have just unveiled a new disc, the size of a regular DVD, which can store up to 500GB of data (equivalent to 100 DVDs).
That is quite impressive if compared to Blu-ray discs which can "only" store between 25GB and 50GB.
The reason these optical discs offer so much more capacity is that they store the information in three dimensions, unlike traditional DVDs where the data is stored as pits on the surface of the disc.
In fact these micro-holographic discs could theoretically store more than 500GB as the amount of data depends on the amount of light that can be reflected by the holograms. The General Electric team working on these discs is quite optimistic and believes improvements can still be made, thanks to new materials.
Now I have 2 questions:
- Do consumers really need that amount of storage space?
- At how many GB will the îndustry say: Ok that's enough we have reached the ideal storage size?
Please bookmark, your votes are noticed and appreciated:
Wednesday, 15 April 2009
Solving: "Must issue a STARTTLS command first" for PHP's mail function (using Google's SMTP Server)
[mail function]
; For Win32 only.
SMTP = smtp.freesurf.ch
smtp_port = 25
; For Win32 only.
sendmail_from = <e-mail username>@freesurf.ch
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
Unfortunately my ISP switched their e-mail accounts to Google's Gmail. I tried to use a similar configuration:
[mail function]
; For Win32 only.
SMTP = smtp.gmail.com
smtp_port = 25
; For Win32 only.
sendmail_from = <e-mail username>@gmail.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
The problem was that I kept getting the following message from Google's SMTP Server:
"530 5.7.0 Must issue a STARTTLS command first."
The reason for this is that gmail uses secure (TLS) servers to prevent spam.
There are several ways to resolve this problem (one way is by installing a SMTP server on your localhost) but here is the easiest way I found:
As I was using XAMPP I had already installed the "fake sendmail for windows". If you are not using XAMPP you can download it here:
http://glob.com.au/sendmail/sendmail.zip
I then modified the php.ini file to use it (commented out the other lines):
[mail function]
; For Win32 only.
; SMTP = smtp.gmail.com
; smtp_port = 25
; For Win32 only.
; sendmail_from = <e-mail username>@gmail.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
Ignore the "For Unix only" comment, as this version of sendmail works for Windows.
You then have to configure the "sendmail.ini" file in the directory where sendmail was installed:
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=25
error_logfile=error.log
debug_logfile=debug.log
auth_username=<username>
auth_password=<password>
force_sender=<e-mail username>@gmail.com
The configuration is nearly over but not completely, you will still get the message: "Must issue a STARTTLS command first".
To solve this problem you need to download the following zip file:
http://glob.com.au/sendmail/sendmail-SSL.zip
and install its contents in the sendmail directory. That will make sendmail.exe TLS compatible.
That's it. I hope this will be useful to some people.
Please bookmark, your votes are noticed and appreciated:
Tuesday, 14 April 2009
Ant script for renaming Java files to Groovy
It's main advantage (over Java) is its "expressiveness", meaning that the same program can be written using less instructions, hence theoretically increasing productivity. In that regard it is quite similar to Smalltalk.
Groovy is a superset of the Java language. This means that any Java program is by default also a Groovy program (the opposite not being necessarily true). I created a very simple Ant file that enables me to convert all my .java files to .groovy (and back again):
<project name="Groovy" basedir="." default="javaToGroovy">
<target description="Changes Java file names to Groovy" name="javaToGroovy">
<move todir="" file="src">
<mapper type="glob" to="*.groovy" from="*.java">
</move>
</target>
<target description="Changes Groovy file names to Java" name="groovyToJava">
<move todir="" file="src">
<mapper type="glob" to="*.java" from="*.groovy">
</move>
</target>
</project>
Please bookmark, your votes are noticed and appreciated:
Monday, 13 April 2009
Easter Eggs
Easter eggs are hidden bonuses or extras available on commercial products (Software, DVDs, etc.) and usually accessible using a "secret" key combination. Easter eggs are created by a member of the development team trying to escape from the monotony of his usual day to day tasks. It also adds a "fun" part to the product.
The trend is however heading towards a reduction of easter eggs because they add to the overall size of software, which is usually already quite big nowadays.
To see an example of an easter egg go to:
http://www.google.com/
Type "Google easter eggs" in the search field then click on "I'm Feeling Lucky".
You will then be able to play a fun game created by Ken Perlin :-)
Please bookmark, your votes are noticed and appreciated:
Sunday, 12 April 2009
Problem logging into Magento after installation
Try replacing:
http://localhost/<path_to_magento>/index.php/admin/
with:
http://127.0.0.1/<path_to_magento>/index.php/admin/
The reason for this bug seems to be that Magento does not recognise "localhost" as being the equivalent to "127.0.0.1" (the localhost's IP Address) and only "127.0.0.1" seems to work. This seems to be a strange bug that I have never experienced in other applications.
Please bookmark, your votes are noticed and appreciated:
Friday, 10 April 2009
Choosing between PDF Clown and iText
BTW This isn't a detailed comparison but a general impression of the two products (a gut feeling)...Hmm decisions, decisions....
I downloaded both JARs and checked out the documentation. I soon realised that there was a big difference in the quantity of documentation available (iText has a lot more). Which makes sense since Bruno Lowagie (iText creator) has been working on the library since about 1999 while PDF Clown is relatively new.
I started out by installing the Jar files in Eclipse and trying out a simple example. Unfortunately I seemed to have a small problem with the PDF Clown example (SerializationModeEnum.Compact mentioned in the UserGuide didn't seem to exist) while the iText example worked fine.
I also then read the following note about PDF Clown: "This project is young, so that it's to be considered UNSTABLE. Feel free to experiment with it, but DO NOT use it in a production environment (so: beware!)" at: http://www.stefanochizzolini.it/en/projects/clown/downloads.html#License Needless to say it didn't really fill me with confidence for PDF Clown ;-)
On the other hand iText has been used successfully by numerous commercial and open source applications: Macromedia ColdFusion (now belongs to Adobe), Jasper-Reports, Eclipse/BIRT, Google Calendar, etc.
For these reasons I decided to go with iText.
The main inconvenient with iText is that it doesn't properly implement the MVC (Model-View-Controller) pattern, meaning that it doesn't give the possibility to properly separate content and presentation.
The fact that I chose iText does not mean that PDF Clown is without merit: I like the object-oriented approach Stefano Chizzolini has taken. I simply feel that the library needs a bit more time before truly becoming mature.
If following this article people are interested in using iText I would advise to get Bruno Lowagie's book "iText in Action": http://www.1t3xt.com/docs/book.php which is pretty much a definite guide.
Please bookmark, your votes are noticed and appreciated:
Open Source Software to open PSD files
The best option I found was GIMP (GNU Image Manipulation Program):
http://www.gimp.org/
which is not only a nice .psd editor but also a good image manipulation program available under the GPL (GNU General Public Licence).
Please bookmark, your votes are noticed and appreciated:
IT Curious Blog opening
My name is Martin McNulty. I live and work in Zurich (Switzerland). I am a Java Developer/PHP Freelancer and have decided to start this blog in order to address small problems I encounter (or small choices I make) when working on projects.
Hopefully this blog will be useful to other people having the same problems or facing the same decisions.
Please bookmark, your votes are noticed and appreciated: