Category: Tech

  • Regex to split “){” to two lines, retaining indenting

    I was quite proud to come up with this, so here’s my first blog post for a while: Search: ^([^\S\n]*)(.+))\s*{ Replace: $1$2)\n$1{ and as a bonus: ^([^\S\n]*)}\s*else\s*{ $1}\n$1else\n$1{ NB (2013-09): it seems that the escaping slashes in this post were lost  at some point, I’ve put them back, but not tested!

  • CSS3: Rounded Table Corners (No images)

    You cannot give a whole table (<table>) rounded corners using CSS, browsers will ignore it, you must round the corners of the cells (<td>) inside. The following uses CSS2 selectors (:first-child etc) and CSS3’s corner-rounding border-radius to selectively round the outer corners of the cells in the corners. This will work for any size table.…

  • PHP Bug: json_encode() misleading warning on object with private properties

    I have found a peculiar issue with PHP’s json_encode() function. If you have an instance object with private properties and use json_encode() it will give you a very misleading warning. class ExampleObject { private $privateProperty; … } $obj = new ExampleObject(); json_encode($obj); results in Warning: json_encode() … recursion detected … There are two workarounds in…

  • 10/GUI

    10gui.com This is as much an HCI concept as it is about the GUI. I think a multitouch pad would be great. 5 fingers, i.e. one hand, would be plenty though, and having one hand remaining on the keyboard allows for faster resumption of typing long text. My HTPC keyboard already has a simple multi-touch…

  • Firefox still has memory leak issue?

    I had to kill Firefox earlier today after noticing that it was using around 750MB of memory! It hung when I tried to close it normally, but perhaps I was just impatient. This time I’m going to give it the benefit of doubt and blame some crappy Flash advert or something.

  • BT (Bastards Telepunish) Woes

    My ISP, BT, have got my goat again. They’re punishing me by crippling my (already joke-worthy) download speeds, because I used a lot last week. So they’ll probably charge me for that (fair enough, I suppose). I understand that they need to provide a fair service to all their customers, but why does that have…

  • Firefox 3 to break Zoom (Edit: I’m mistaken)

    Mozilla is about the make a big mistake, the same as that made by IE7. Zooming the whole page is not a good idea. Current Firefox text-only zoom on the left, IE7 on the right. Using the current Fx way you can easily read the text without having to scroll sideways, but the new way…

  • Automatically Added Start Menu / Desktop Icons

    I have just allowed Adobe (Acrobat) Reader to update itself, fair enough, though it is still remarkably slow to load on first use. I keep a clean desktop, with shortcuts only for the things I use on a regular basis (at least daily). I keep my Start Menu under control (am still using XP). I…

  • You get what you pay for…

    PC World, TechGuys (PC Service Call), Parceline – One of them screwed up. The fianceé’s laptop died on a Thursday. It would POST, but it would simply restart itself before Windows started loading. It’s a Vista machine so I tried to use its self-repair options, but to no avail. I took it to work to…

  • NatWest Anti-Fraud Team: Impressive

    Despite my reservations regarding NatWest’s Card Reader, I wish to voice how impressed I was with their Anti-Fraud Team. DreamHost’s incredible billing blunder resulted in some peculiar charges to my card. So when I was trying to pay what I actually owed, it was denied by the issuer. I tried a few times (just in…