MYSQL: Convert hex string to integer

Posted on May 7th, 2010 by whinger. Filed under Tech, Web Development.


So there’s a few places on the web asking how to do this; while it’s easy to do

SELECT x'1fb5';

if you have the hex string stored in a field you can’t do that.

The answer is to use CONV()

ie

SELECT CONV(myhexfield, 16, 10);

It’s that simple.

Tags: .



Bargaintastic!!

Posted on May 4th, 2010 by whinger. Filed under Funny.


This is the latest offer from Tesco’s. Looks like a real bargain to me!

Tesco Orange Juice - £1.33 or 3 for £4!
Edit: they’ve since spotted this, and have made the juice more expensive (it’s now £1.35 or 3 for £4). I’m not sure that was quite what I was hinting at when I posted this…

.



linktastic

Posted on March 26th, 2010 by whinger. Filed under Uncategorized.


I don’t tend to post links, but this one just made me lol more than most.

.



come play our oh-so-hard game

Posted on February 12th, 2010 by whinger. Filed under Uncategorized.


So betfair have a £5 free bet game (probably only works if you already have an account, although I’m not sure of that) which at first glance looks like a scratchcard – you have to click on the three hearts from nine which have a £ behind them. Except that if (after clicking start) you do nothing for a few seconds it quietly shows you which ones to click.

I guess it’s intentional but I don’t care: these free bet offers are great – I won £120 on the National this year risk-free and haven’t used my account since except for their free bet offers, and yet they keep on sending them to me 🙂

.



XP BSOD STOP 0x0000007b after a virus scan

Posted on January 3rd, 2010 by whinger. Filed under Tech.


Scenario: heavily infected machine, drive attached to second machine and scanned; infected files deleted but when drive reinserted windows fails to boot with 0x0000007b blue screen STOP message.

Lots of stuff on the internet about this, mostly suggesting hardware changes or faulty hardware. No-one mentions the virus scan. It turns out the reason is one of the files deleted by the virus scan is loaded during early boot.

I went through the list of files loaded by the machine (I was lucky that this page showed the list of files Windows loads on the machine – a Dell Dimension 2400) and checked the file existed on the target – the only one that was on my working install and not on the target was atapi.sys; copying this from the working machine solved the problem instantly.

I guess the sensible thing to do was to keep a track of the files deleted by the virus scan… but if – like me – you were too blasé to do something so sensible, I hope this helps some.

Edit: Note that on vista (unlike XP) you can run sfc /scannow from the recovery console

.



Flat( bat)tery will get you nowhere

Posted on November 9th, 2009 by whinger. Filed under Whinges.


Flat battery today. Some ignorant bitch decided that she would have strop at me because I asked her to go up over the pavement (while I had C’s car next to mine) and it “would damage her wheel”.

Nice bit of understanding for your fellow man, honey, it’s not my fault you can’t drive well enough to go up and down on the dropped kerbs…

.



Interesting juxtaposition…

Posted on October 23rd, 2009 by whinger. Filed under Funny.


In Aldi‘s Sunday offers email…

Reciprocating Saw and My Little Baby Born

Tags: .



your negative aura just zeroes me out

Posted on October 6th, 2009 by whinger. Filed under Tech, Whinges.


So in this post I talked about -COALESCE(null, 0) returning -0 in my legacy 5.0.15 mysql server and moaned that I couldn’t use -COALESCE(null, -0) to get around it.

It occurred to me that this might be because the parser intercepts the “-0” and goes “don’t be silly”. So I tried this:

SELECT -COALESCE(null, -COALESCE(null, 0))

and – genius! – it works!

Tags: .



no order too small…

Posted on October 2nd, 2009 by whinger. Filed under Tech.


I’ve used the components supplier farnell before and found them to be excellent. Up until recently I’ve been able to get around their minimum order value for free delivery because work has an account with them; however work has changed their policy so I can’t order stuff through them any more (grrr).

So anyway, I needed to repair the PSU on a Topfield I got off ebay and the 6 capacitors I need came to £2.69 inc VAT; I figured I’d have to bite the bullet and pay a fiver or so for delivery (although I wasn’t too happy about it). Imagine my surprise, therefore, when the checkout came out at “free same-day-dispatch”.

It turns out that farnell abolished the minimum order requirement for website cash orders at the beginning of the year. So hurrah for them!

Edit: they arrived next-day too. Brilliant!

Reedit: no-minimum-order policy has now been reversed. Booooo!

Tags: .



someone needs a boot somewhere…

Posted on September 28th, 2009 by whinger. Filed under Whinges.


So I placed an order for collection at my local store with boots online on the 16th September (yes, boys and girls, that’s 12 days ago). They told me at the time it would be available to collect by the 23rd, which I thought was a bit slothlike, but hey!, how urgently can you need toothpaste, right?

The despatch note came on the 18th, which gave me hope that I might be experiencing shiny clean teeth and that fresh breath that 3 cups of coffee and a mustard-filled sandwich does its best to destroy (and I’m sorry but the Colgate I can get from everywhere – actually that’s another rant, but I’ll leave that for another day – just doesn’t compete) within a reasonable amount of time; however it’s now the 28th and I’ve still not had the nod from Boots to tell me that I can collect.

I sent them a polite email on Friday and have heard nothing. So today I tried a different tack – this is the text of the email I sent this morning.

Order status is despatched and has been for nearly a week. I dropped into the store on Friday and they suggested that the next delivery date would be Saturday but your status still says “despatched”. Now given that I could probably have attached the package to a tortoise and it could have travelled the 20 miles or so from Nottingham to Alvaston by now, unless you’re shipping from the Outer Hebrides using the pony express I’d say it has either not been despatched at all or it’s been lost on the way.

Can you investigate and let me know when you expect to be able to fulfil my order?

So I guess either I’ll now never receive it or I’ll give them a laugh and they might actually do something. We’ll see 🙂

Edit – the automated bounce email I got back states (about their 0845 number):
You will pay at the local rate and calls may be recorded for training purposes
I thought they weren’t allowed to call 0845 “local” rate any more?

Update (2009-10-01) I received a phone call from a very helpful boots rep today: their courier has admitted mislaying my parcel. Oh well, at least they’re dealing with it!

Tags: , , , , .



Blogroll

Categories