Category Archives: Code

VCALENDAR file with newlines in DESCRIPTION field

Hopefully if anyone else has this problem, they’ll find this post. If you’re attempting to output some data in a MySQL database as a VCALENDAR file that is viewable in Apple Calendar or Outlook or whatever, an incorrect newline character … Continue reading

Posted in Code, Tech | Tagged , , , , , | Leave a comment

MySQL Transactions

MySQL has the ability to handle what are known as transactions: a series of queries that must be executed in an all-or-none fashion. As a bonus, it’s super easy to use. Using PHP, you can do the following: mysql_query(“START TRANSACTION”); … Continue reading

Posted in Code, Tech | Tagged , | Leave a comment

Use PHP to get all images in a folder

This: $images = glob($directory . “*.{jpg,gif,png}”, GLOB_BRACE); is awesome.

Posted in Code, Tech | Tagged | Leave a comment

iOS Training: Day 2

This is going to be a short one. After spending a ton of time at a computer the last couple days, writing a blog post isn’t the thing I’m dying to do at the moment. [Ed: Nevermind. Got rolling and … Continue reading

Posted in Apple, Code, iOS Bootcamp, Tech | Tagged , , , , | Leave a comment

iOS Training: Day 1

Today was the first real day of class. Over the course of about 12 hours working, I went through the first six chapters of the book we are supposed to make it all the way through this week. Today’s chapters … Continue reading

Posted in Apple, Code, iOS Bootcamp, Tech | Tagged , , , , | Leave a comment

iOS Training: Day 0

I left home in Indianapolis at 1:30 this afternoon and hopped a flight to Atlanta. After that, I took a one hour ride to Historic Banning Mills, Georgia, home of the Big Nerd Ranch. I got checked into my cozy … Continue reading

Posted in Apple, Code, iOS Bootcamp, Tech | Tagged , , , , | Leave a comment

Conflagration of IE6, PHP session_start, and blank pages

Yesterday, I was troubleshooting a problem that (only) showed up in IE6 where anytime I click a link that goes to a page with session_start() in it, I get a blank page with no errors and the address bar shows … Continue reading

Posted in Code, Tech | Tagged , , | Leave a comment

Select the last n rows from a MySQL table

I needed to figure out how to select the last four rows of a database table without reversing the order of the rows. After a little digging, I got to this point: SELECT * FROM ( SELECT * FROM table_name … Continue reading

Posted in Code, Tech | Tagged | Leave a comment