Freezer's Palace

las-vegas-snow.gifInspired by Peter Hill, writer of pithy, witty and altogether-too-clever headlines, who is too lazy to update his own blog, so I'm posting them corking headlines here.

Nope, it's not faked, it's actually snowing in Las Vegas (the one in the middle of desert) for the first time since 1979. Check out the photos at designyoutrust.com for the full majesty (Ok, that's a bit much, let's say effect) of the Vegas strip covered in snow.

Doesn't it look romantic. Get thee to an Elvis-themed chapel this instant.

One tip, if you're in Vegas and a red-faced portly gentleman starts shouting "Ho ho ho" at you, the surprise gift you'll pick up will probably clear up with the right ointment. Or so I'm told.

[Pic courtesy of Dmitry at designyoutrust.com]


No comments, why not add one?

Is my Google Analytics code working?

If you're like me, you'll probably spend as much time tinkering with the layout and technical gubbins of your website, as you will writing for the site in the first place. This bad habit isn't help in any way at all by the rather excellent Google Analytics service and worse still the desktop application which even saves the hassle of firing up a web browser.

ga-adobe-air.gifLaunched in November 2005, it's easy to install, easy to use and rather addictive. Start digging into the data and there's all sorts of weird and wonderful information tucked away. Like my friend Billy found when looking at keywords that brought visitors to his website, the results can be disturbing.

Imagine my despair then, when all of a sudden after what could be called an unintentional upgrade (remember kids, always back up your website before tinkering) my Google Analytics stopped recording anything. Surely everyone hadn't deserted the site? Yikes.

sitescan.gifAfter wading through the help text on the Google website, I was pretty certain that the code was in the right place and almost certainly right. But, and it's a big but. there's a delay of about 12 hours between adding in the tracking code and the results showing up.

12 hours! In that time the refresh key would be completely worn out.

Thankfully, after some judicious Googling, Epik One's Sitescan popped up. Whack in the website to test and this tool will scan up to 15,000 pages and send an email with the results. For testing one page only, there's a Sitescan widget for the iGoogle homepage. Ahah. No more waiting.

And that's just the tip of the iceberg, for starters here's a list of dozens of hacks to super-charge Google Analytics even more and a book, Advanced Web Metrics with Google Analytics written by the guy who used to run Google Analytics in Europe.

Get measuring.


177749386_7567187e87.jpg

Trackback URL for this post:

http://www.toodlepip.co.uk/trackback/65
No comments, why not add one?

Using SQLite with Eclipse and DbEdit

[Warning: For those not of a technical bent, what follows will be as dull as the dullest, tepid dishwater you can imagine, so probably better to venture to something more interesting.]

SQLite.gifEvery so often, I'll decide to tinker with a bit of code to extend my knowledge and see if I can still knock up anything that'll work on ye olde Interwebby. Inevitably, this involves spending far more time setting up an environment than actually producing anything.

As I tend not to make notes (v. bad habit, I know) and then forget how it worked, I've resolved to write up little blog posts as an aide memoire for the next time. If they help someone else in the same predicament, marvellous. The steps below worked for me, but it's always a bit of a gamble that the process is actually what you're supposed to do.

So, after much time spent with Mr Google, a number of dead ends and some very useful posts, this is how I managed to get my setup (Mac OSX, Eclipse, DbEdit, SQLite) working. If you've spotted errors, or have any suggestions, please feel free to leave a comment.

Step One - Download JDBC Drivers

Firstly, you'll need to find and install a JDBC driver for SQLite. The one on the Zentus website did the trick:

Save the sqlitejdbc-v053.jar to a memorable directory, I created a jdbc drivers folder in the Eclipse application folder. Just remember where it's saved.

Step Two - Install JDBC Driver in DbEdit

Fire up Eclipse and open the DbEdit perspective using the menu:

Windows > Open Perspective > Other... > DbEdit

DbEdit provides the option to install new JDBC database drivers when you create a new database connection, which is step three:

Step Three - Install Create SQLite Java Database Driver

  1. Select the Connection option from the main menu bar at the top of the page, a dialog box will pop up
  2. Give your new connection a name e.g. SQLite DB
  3. Click on the drop down for JDBC Driver field, if an SQLite driver is available, select it and skip to step four below
  4. OK, so you need to install the SQLite driver downloaded above, click on the Classpath tab in the dialog box
  5. Click on the Add Archive option. Find the driver you saved in that directory and click OK, then click Apply.

Step Four - Create Database Connection

This is where things got painful for me. The format for the JDBC Server was a right little sod. Thanks to the clues on this page, I finally figured it out.

  1. If you're following the step above, switch back to the Common tab in the dialog box by clicking it
  2. Select the SQLite JDBC driver, if you've used the one above, it'll read org.SQLite.JDBC
  3. Now, you'll need to enter the Server URL, which will take one of the formats listed below
  4. Click OK. There might be a prompt for username/password, I'm not using one so could click OK.

Possible format for JDBC SQLite Server URL:

jdbc:sqlite://dirA/dirB/dbfile
jdbc:sqlite:/DRIVE:/dirA/dirB/dbfile
jdbc:sqlite:///COMPUTERNAME/shareA/dirB/dbfile

As an example, on the Mac that I'm using the format of the URL was:

jdbc:sqlite://Users/myuser/Sites/test/test.sqlite

which is the full path to the SQLite file. I haven't tested it, but on a Windows machine, it would most likely be:

jdbc:sqlite:/DRIVE:/dirA/dirB/dbfile

which in a real-world example, might look like this (N.B. I haven't tested this):

jdbc:sqlite:/C:/Documents and Settings/Sam/Sites/Test/test.db

I hope this is useful for anyone else who is sitting at their computer barely the resisting the temptation to throw it out the window.

Tagged with:
No comments, why not add one?