Archive for July, 2009

ColdFusion Leap Year bug still there

13 July 2009 16:45

So just got ColdFusion 9 Beta 2 up and running and my old leap year bug is still there. I’ve posted a public bug, #78713 now the tracker has been launched. It effects 7, 8 & 9 so hopefully it’ll get fixed!

Filed: Technology // Tagged: , , // 1 Comment

New Releases

13 July 2009 13:17

A few new releases for you to catch up on. Firstly Wordpress 2.8.1 – essentially a bug fix and security release by the look of it but worth doing anyway, quick note that if you get stuck with a maintenance page check in your web root for a file called .maintenance, just rename that and the site will come back.

Next up two public beta’s from Adobe. ColdFusion 9 boasting some new useful and some not so useful/utterly pointless changes and the ColdFusion Builder which can either be standalone or as a plugin to Eclipse.

Filed: Technology // Tagged: , , , // No Comments

List of titles

9 July 2009 20:40

With most forms, on most sites, if asked for your title you’ll normally get the usual; Mr, Mrs, Miss, Ms, Dr. Sometimes you’ll see a few more but not often. Harrods however outdoes themselves with this impressive array of titles, I think we should all start using this as a list on forms… out of curiousity if nothing else!

  • Mrs.
  • Mr
  • Mrs
  • Mr & Mrs
  • Miss
  • Ms
  • Baron
  • Baroness
  • Sheikh
  • Sir
  • The Honourable
  • The Right Honourable
  • Viscount
  • Viscountess
  • Begum
  • Brigadier
  • Captain
  • Commander
  • Colonel
  • Count
  • Countess
  • Dame
  • Doctor
  • Doctor & Mrs
  • Doctors
  • Earl
  • His Royal Highness
  • Her Royal Highness
  • Judge
  • Lady
  • Wing Commander
  • Lord
  • Lieutenant
  • Lieutenant Commander
  • Lieutenant Colonel
  • Madam
  • Mademoiselle
  • Major
  • Monsieur
  • Prince
  • Princess
  • Professor
  • Reverend

Filed: General // 1 Comment

Awesome Idea

8 July 2009 11:11

Are you in an office with RFID door-entry? If not you should be… this idea is awesome! [via @timblair]

Filed: Technology // Tagged: , , // No Comments

Sphinx Multi-Value Attributes

6 July 2009 11:03

Sphinx allows you to create a multi-value attribute index which is great for document tags or categories. By default if you search across these the search is an OR match. If you want to run an AND match you must specify multiple filters rather than passing an array of values.

In ColdFusion using the Java API requires a little tweak as you can’t pass a normal ColdFusion array to sphinx, you have to use a basic java type array. Tim Blair has a good article on how to create them but here’s an example of calling the API.

This example will search for document tagged with either 100 or 200. Note the array creation method.

<cfset variables.sphinx = createobject("java", "org.sphx.api.SphinxClient").init()>
<cfset variables.sphinx.SetLimits(0, 10)>
<cfset variables.arrObj = createobject("java", "java.lang.reflect.Array")>
<cfset variables.jClass = createobject("java", "java.lang.Integer").TYPE>
<cfset variables.jArr = variables.arrObj.newInstance(variables.jClass, 2)>
<cfset variables.arrObj.setInt(variables.jArr, 0, 100)>
<cfset variables.arrObj.setInt(variables.jArr, 1, 200)>
<cfset variables.sphinx.SetFilter("tag", variables.jArr, FALSE)>

If you want to search for 100 AND 200 you’d do it like this:

<cfset variables.sphinx = createobject("java", "org.sphx.api.SphinxClient").init()>
<cfset variables.sphinx.SetLimits(0, 10)>
<cfset variables.sphinx.SetFilter("tag", 100, FALSE)>
<cfset variables.sphinx.SetFilter("tag", 200, FALSE)>

Filed: Technology // Tagged: , , , , // No Comments

More Geocoding

1 July 2009 23:18

More geocoding fun today, this time done with perl. For what I want to do, convert OS Grid easting and northing into latitude and longitude using an API, like Yahoo! was going to take ages due to throttling. Turns out that in perl using the handy Geography-NationalGrid-1.6 CPAN package it’s a lot easier and gives for most cases a result very close together.

Here’s a quick example:

#!/usr/bin/perl
use Geography::NationalGrid;
my $point1 = new Geography::NationalGrid( 'GB',
Easting => '385600',
Northing => '801900'
);
print "Latitude " . $point1->latitude . " Longitude " . $point1->longitude . "\n";

You can also give it a grid reference like TH 1234 1234 or a latitude and longitude.

Filed: Technology // Tagged: , // No Comments

 
Twitter   •   About   •   Contact
©2010 Ian Winter. All Rights Reserved.   •   Powered by WordPress   •   Hosted at Memset