Tuesday, 23 March 2010

Carriage return in Excel on the Mac

If you are entering text in a cell in Excel in Mac Office 2008 (or other versions), hitting the return key will move the focus to the cell below. To enter a carriage return inside the cell when typing, hit ctrl-option-return instead.

Wednesday, 10 February 2010

Photos appear blank in iPhoto on the Mac

At home I've got an iMac (2009 version). We run iPhoto on it to manage our family photos - the photo library lives in a shared directory - both of us have separate accounts on the computer but we want to share the same photo library. Occasionally we run into a problem where you can see photo thumbnails in iPhoto, but when you double-click to open the photo, it goes blank and you just see a black screen where the photo should be.

After some searching I managed to find a few other people who'd run into the same problem. The solution is to rebuild your photo library in iPhoto. Exit the application, whilst holding down the command and option keys on the keyboard, restart iPhoto. You will see a prompt asking which parts of the library you'd like to rebuild. For me, examining and repairing iPhoto library permissions is what's worked.

If you want to know more you can find an Apple support article here.

Tuesday, 1 December 2009

Using MySQL to retrieve substring from the middle of a string

In MySQL it's hard to grab part of a string out of the middle of a VARCHAR or other text-based field, especially if you don't know exactly how far into the string the text you want begins, and it's of variable length, so you don't know where it ends either. Here's a way to do it.

Tuesday, 17 November 2009

Capturing screenshots on your Blackberry

****UPDATE September 16th 2011 - download link updated****

Ever since I first got a Blackberry I've been looking for a good way to capture screenshots of apps running on the device. Including, of course, our very own GyPSii. Now, thanks to Amit Agarwal's blog entry, I've found it.

Friday, 25 September 2009

Vanishing formula bar in Mac Office Excel 2008

A couple of weeks ago my formula bar in Excel 2008 on my Mac just vanished into thin air - gone. I tried various remedies to get it to reappear, but none worked, including the obvious, turning on "formula bar" in the view menu. Eventually I managed to track down a Macrumors forum thread where someone had fixed the problem. Here's what you do:

- Close Excel and any other running Office apps
- In Finder, go to your home directory and then to /Library/Preferences/Microsoft/Office 2008/
- Delete the file called "Excel Toolbars"
- Restart Excel

This should restore the formula bar for you.

Thursday, 6 August 2009

Getting MySQL running with PHP on a Mac

I've just been trying to get PHP and MySQL running with Apache on a Mac (PHP 5.2.8 and MySQL 5.1.33 running OS X 10.5.7). Somehow I kept running into the following error when trying to get a PHP script to connect to MySQL:

mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'

Here's how I fixed it.

Monday, 3 August 2009

How to configure an Airport on/off shortcut key on a Mac


****Update - 10th February 2010****
This worked well in Leopard, but I haven't got it to work since upgrading to Snow Leopard. Does anyone have a fix?

The Problem
One of the things which has always bugged me about my Mac is the lack of a shortcut key to turn the Airport WiFi on and off. At home I connect using WiFi and in the office I plug into a wired ethernet connection, so I wanted to be able to turn the Airport on or off with a shortcut key instead of having to use my fat fingers and the mouse to click on the fiddly little Airport symbol in the menu bar. Unfortunately, Apple didn't build an Airport shortcut key into OS X. I'd been looking for a solution to this problem for ages, and now I've finally got it worked out.