Journal Calendar
<Jan 2009>
SMTWTFS
    123
45678910
11121314151617
18192021222324
25262728293031
       

Latest Journal Entries

Truncating and Shrinking a SQL Server logfile

It's such a pain when a SQL Server log file runs away with it's self on a development machine. I always forget the T-SQL to truncate and shrink the log file, so I thought I'd post it here for future reference.

BACKUP LOG <database name> WITH TRUNCATE_ONLY

DBCC SHRINKFILE ('<datbase file minus extension>',1)

Journal Entry Posted on 19-dec-2005 @ 13:48 GMT


MySQL Replace Function

I never knew this function existed. Well I never!

MySQL Replace(), here's the syntax.

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

I've also successfully used nested Replace() functions, as above, within a select statement to reform field values for output.

What would we do without it!

Some more MySQL snippets

Journal Entry Posted on 29-mar-2005 @ 22:15 GMT


Apple vs Microsoft (iTunes vs Media Player)

I'm no fan of big companies with monopolies that strangle the life out of the IT industry, but Apple and Microsoft do have a knack of producing some fairly good software.

Until recently I had just been ignoring the smug Mac users when their claims that Apple's computers and software are the best things since sliced bread.

I'm not convinced that the DRM (Digital Rights Management) strategy adopted by either Apple or Microsoft is the best way forward, but I am slowing warming to Apple's philosophy.

After buying an iPod and solving the issue of it crashing on me while converting to Windows format, even before I'd even used the thing, I have to admit, they got a lot right with the software. iTunes even though some features that should be there are missing on purpose is the business!

It's a joy to find and update your music. ID3 tags are so easy to edit, even for multiple files. Artwork can be added through the interface, although it would be better if the music library Apple uses to write the ID3 tags in the first place had the said album artwork (Something Microsoft's Media Player does).

As for the iPod, well it's sexy, easy to scratch and heavy, but not as heavy as all those CD's that it's replacing!, oh and it does crash once in a while, no blue screens though :-)

Journal Entry Posted on 27-mar-2005 @ 23:35 GMT


iTunes Album Art Importer

If like me you've recently bought one of Apple's new iPod Photos, or you use iTunes on Windows and wondered why the album artwork for your favourite CDs didn't get imported with the tracks then you may want to read this.

Windows Media Player and iTunes store album art in different ways. Media player stores them as jpg's within the directory where the music is stored. Apple however make use of the tracks ID3 tags and store the album artwork actually in each of the music files.

There are advantages and disadvantages to both methods, however when you import music into iTunes it currently ignores the album artwork Media Player put there.

To get around this you could try the following program. It was created using VB.NET, Apples SDK and uses the Amazon Web Service to query Amazon and retrieve the artwork.

You can set it to run on your whole music collection and specify whether to update tracks with existing artwork. It does however crash on occasions, but it's still much faster than doing it yourself.

iTunes Art Importer

Journal Entry Posted on 23-mar-2005 @ 12:10 GMT


Have Anti-Spyware Utilities Become The Killer App?

In the past few days there seems to have been lots of excitement in the computer industry concerning Anti-Spyware utilities - Programs aimed at ridding peoples machines of troublesome and annoying programs.

Firstly Yahoo have launched a new version of their popular Internet Explorer Toolbar which adds an Anti-Spy utility right on the bar (available from http://toolbar.yahoo.com/). I've installed this on a couple of machines to test it and it seems to be fairly successful, although I know of a few friends machines which would give it much more of a thorough test.

This afternoon, the mighty Microsoft launched a Beta version of their own Windows AntiSpyware software, available to all owners of Genuine Microsoft Windows.

This product has clearly come about from the acquisition of Romanian anti-virus firm GeCAD Software in 2003 and New York-based anti-spyware firm Giant Company Software in December 2004.

After installing an activeX component to validate your version of Windows(TM) you are taken to a download screen, where you can download the test version of their new software.

I'll be testing these anti-spyware tools in the coming weeks and will report my findings in the near future.

Microsoft(R) Windows AntiSpyware (Beta)

Journal Entry Posted on 6-jan-2005 @ 22:01 GMT


MySQL vs TSQL Concatenation CONCAT()

Following on from an entry posted last year concerning converting SQL queries from Microsoft TSQL to MySQL I've come across another function which is treated somewhat differently in MySQL than TSQL.

The following SQL code adds the .jpeg file extension onto the end of the image names from tblImages.

TSQL Concatenation

SELECT ImageName+'.jpeg' FROM tblImages

The above SQL syntax is used on Microsoft SQL Server, Microsoft Access and Sybase

MySQL Concatenation

SELECT CONCAT(ImageName,'.jpeg') FROM tblImages

Oracle Concatenation

SELECT ImageName || '.jpeg' FROM tblImages

The Oracle syntax is the syntax recommended by the SQL specification. It uses 2 pipes || instead of a plus + sign. This avoids the problems of trying to concatenate integer fields which might otherwise result in an unwanted addition.

Previous entry: T-SQL TO MYSQL CONVERSIONS

Journal Entry Posted on 5-jan-2005 @ 13:17 GMT


Symbian OS Bluetooth Security Patch

Since the Cabir virus, which affects various Symbian-based mobile phones, was created as a proof-of-concept earlier this year a Brazilian programmer has decided to publish the source code for two variants of the virus named Cabir-H and Cabir-I. This has caused a stir since it will no doubt cause more malicious variants of the virus when it falls into the wrong hands.

Patches Anyone?

As yet there have not been any reports of the Cabir virus in the wild, however the question I'm asking myself is why haven't the phone companies or anti-virus companies released patches for the virus?

Surely now would be the ideal opportunity to begin to put in place a system to protect the public, the majority of whom will not be aware of any such virus or the potential harm it could do to their phone.

The only advise we seem to be getting is precautionary, but how many people still open email attachments from people they don't know? Precautionary measures don't work, we've obviously forgotten the lessons we learnt from the PC virus epidemics of the not-so-distant past.

I think the lack of any such support by the phone manufacturers, OS software companies and anti-virus firms is due to no one taking ownership of the problem, which if left unresolved could balloon into a major problem in the very near future.

I'll end with the precautionary advise given so far.

All variants of the Cabir virus spread via bluetooth short-range wireless technology. To be completely safe from the virus all you need to do is turn off your bluetooth connection. This however is obviously counter-productive, so when you want to use your bluetooth connection for a headset or to sync with your PC etc, then you should set your handset to 'hidden' mode, this will make your device hidden from any other device in range.

Currently the Cabir virus has to be installed on the phone, which means the user will have to physically intervene allow the software to install by selecting 'yes' to install option upon receiving the virus, the last piece of advise then is to avoid installing software from unknown sources, especially other bluetooth devices, but more-so from future software containing Trojans based on Cabir and it's variants.

Journal Entry Posted on 31-dec-2004 @ 12:29 GMT


Logitech Media Player Remote For Your PC

Gadget of the month has surely got to be the new Logitech Media Play Cordless Mouse.

If like me you've moved your CD collection from your CD's to your PC's hard drive you may find this new mouse/remote control a very useful gadget. It's a cross between a computer mouse and stereo remote control.

It features an extended wireless RF range, (not bluetooth or infra red) so you can control your media player from the comfort of your armchair and use it as a conventional optical wireless mouse when using your PC.

It has all the features you'd expect from a top-of-the range mouse, plus all the usual media player buttons you've come to expect, including:

Play, Pause, Forward, Back, up, down, and a Media Player Launch button (Compatible with Windows Media Player and Win Amp). All of which are illuminated on touch.

Just remember not to lose it down the edge of the sofa! otherwise you'll have to navigate Windows(TM) with your excellent keyboard shortcut knowledge ;-)

Logitech MediaPlay Wireless MouseArticle Image

Journal Entry Posted on 30-dec-2004 @ 16:18 GMT


Converting 3GP Video to AVI

Since my last entry concerning the mobile video format 3GP, I've come across a much more useful and professional program that converts 3GP to AVI.

It even converts 3GP to animated GIF although the picture quality is obviously greatly reduced and you lose sound in this format.

3GSauron

3GSauron is freeware and is a stand-alone EXE, so you don't have to install it. The only downside with the software I can see is that you can only convert files one-at-a-time.

I've added a link to the authors site below where you can download it.

http://www.3gsauron.com/

Journal Entry Posted on 29-dec-2004 @ 16:17 GMT


Is My Google Desktop Search Secure?

After a recent security flaw surrounding Google's Desktop Search Beta discovered by Scientists at Rice University, how do you make sure Googles fix has been applied to your machine?

After reading Google's Blog it seems all you need to do is check for the Beta release version on the 'About' page since the fix should have been applied automatically. You can find a link to this page from the main Desktop Search home page (You can reach this via right-clicking the icon in your taskbar or via the shortcut on your desktop). The version with the applied fix should be 'Beta 121004'.

Google Blog

Journal Entry Posted on 22-dec-2004 @ 12:57 GMT


Journal Index