Written by adam on Mon, 09/24/2007 - 17:54
Simple way to get MySQL-python working on OS X
Written by adam on Mon, 09/24/2007 - 00:20
PHP5 has a great feature for us lazy OOP people. With __autoload() you can skip over some of the hell of including every class file. But wait. Don't use __autoload()! Instead, so that your script plays nice with others you should use spl_autoload_register('my_overload_function'); This allows multiple autoload functions so that yours doesn't hog __autoload.
Now, onto what tripped me up for a few minutes. I placed a class in the session and then registered the autoload function in my cart include file. Instead of having everything magically work, I got this error:
Written by adam on Fri, 09/21/2007 - 10:57
Removing a item from an array and maintaining a sequential key
Written by adam on Thu, 09/20/2007 - 15:55
Internet Explorer handles a checkbox's onChange improperly
Written by adam on Thu, 05/31/2007 - 13:48
How to test your httpd server for the TRACE option.
Written by adam on Sat, 11/04/2006 - 23:17
With the increased use of RSS, screen scraping is becoming less necessary. However, there's still plenty of times that it can get you out of a bind, at least temporarily. I think it's easiest to do screen scraping with PHP and the curl extension (a typical PHP configuration). This shows how I screen scraped the Michigan Lottery website to retrieve the Keno results I used in the article Michigan Keno Stats Over 16 Years.
Written by adam on Thu, 11/02/2006 - 11:19
I got my MacBook Pro Core 2 Duo Tuesday and I've been moving stuff over from my old PowerBook. But, there's an obvious problem. The wireless card or drivers (or both) are messed up. If I'm moving files over from either ethernet or firewire, the wireless fails to keep a connection. Sites stop loading, Adium loses connection, etc. It just doesn't work.
Written by adam on Sun, 10/29/2006 - 14:56
Make an ANYTHING generator, which, if like other generators, will get your house raided and you possibly arrested.
Written by adam on Sat, 10/28/2006 - 13:45
After hearing a statistics professor told his class that some numbers in Keno have better odds than others, I wanted to check his claim. So, I went to the Michigan Lottery website and wrote a script to take all 16 years worth of Keno winning numbers. That's 83072 numbers drawn 22 at a time for a total of 3776 rounds of Keno.
Written by adam on Fri, 10/27/2006 - 06:27
The problem:
Apache forked processes (PHP, CGI, etc) runs as a different user (usually www or some variant) which doesn't have permission to restart Apache. To further compound the problem, PHP doesn't allow you to sudo to a user that does have the privileges (they call this a "security feature"). Also, if it did have the privileges, it cannot reload httpd directly because that's it's parent process.
Pages