Monday, November 16, 2009
Ok, so you probably know the power of regular expressions or regex. One of the great things about regex is that with most modern text editors (and even some old classic ones) you can use them to do quick editing over a large file.
My favorite (and this will work in Visual Studio) is for removing lines at a time based on some match.
Let's say we want to select (most likely for removal) any line from a file that has the word Bart in it. Our regex would look like this:
The \n indicates new line. If you left off the \n the line would be selected without the new line character. If you are doing a replacement (such as with nothing to delete the line) and leave off the \n the line is selected but not the return character so for removing the text, a blank line would still exist in the file, whereas including the \n will delete the entire line from the file.
Monday, November 09, 2009
UPDATED: See update below...
Well I wish I had known this before I upgraded to Mac OS X Snow Leopard.
Apparently Epson hasn't released drivers for some of its more expensive "pro" printers such as my Epson Stylus Photo 2200. It appears the same is true for the 1280 and 2100 and probably others as well.
Epson has stated they will release a new printer driver by the end of January 2010 that will be distributed by Apple as a software update.
The current version of Mac OS X Snow Leopard (10.6.2) includes the open source Gutenprint driver for these printers, however, most people report that either they don't work, or the colors are so off that they are useless.
For a list of Epson (and other) printers supported with native drivers in Snow Leopard you can go here. If the driver lists Gutenprint next to the printer name (i.e.
BTW you may find the printer driver on Epson's website here that claims it is compatible with Mac OS X Snow Leopard 10.6. That file is identical to the older printer driver that worked under 10.5 and is not a new one that fixes color issues in 10.6. Epson has stated multiple times that the new version will be available through Apple's software update and not a download from their website.
UPDATED: January 3rd 2010
Well it appears they've released the update. Oddly it doesn't appear during the Apple Software Updates but through the new printer driver update facility that Apple added to Snow Leopard. Now you might be wondering how to get the update to appear? Well, mine showed up automatically when I plugged in the USB cable of the printer to the computer. Immediately I got a dialog saying updated drivers existed and asked if I wanted to download them. Note that I had already uninstalled the non-working Gutenprint drivers, so if you were using those, I have no idea if you would get the update notification. I hope you would.
After downloading it automatically added the printer, and I was able to print. I haven't done any detailed photo printing but printed a few color pages on plain paper the colors looked good. So good luck to you and thank you Epson for living up to your word. It would've been better if you had these drivers available when Snow Leopard shipped but better late then never. You can see several printers have been added here to the list here with a + which indicates the Vendor software was recently added via software update.
Friday, November 06, 2009
I've seen this happen in both Safari and Firefox. This fix is specific to Safari although the Firefox fix is probably similar.