
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: