Sooner or later when dealing with data that contains addresses, you’ll need to
perform distance calculations. Some examples might be “which store is nearest
to location X” or “display all hotels within 20 miles of the customer’s
location sorted by distance”. This post deals with such calculations based on
positions designated by latitude and longitude. The process of determining the
latitude and longitude of an address is called geocoding and is outside the
scope of this article.
Read more…
A join in SQL is an attempt to match up rows in one table with rows in another.
This allows you to treat the joined rows as if they were in one big table. The
differences between the various join types mostly have to do with whether and
how non-matching rows are discarded. Everything discussed below is generic SQL
and not specific to MySQL unless noted. I use “record” and “row” here
interchangeably.
Read more…
Have you ever wondered which version of MySQL supports a particular feature? I certainly have. Here is a table listing various major features and storage engines and which versions of MySQL support them, from 3.23 through 5.1. I have cross linked to the MySQL online manual wherever possible, though there are still some gaps.
Read more…
I have long been interested in creating my own custom playing cards, partly because I like to tinker, but mostly because I would like to be able to recreate out of print board games that contain cards. In particular, I was originally inspired to do some of this research in order to reprint a decent copy of Wiz War which I enjoyed playing with friends in college.
What follows is the notes and resources I have gathered so far in pursuit of this project
Read more…
This came up recently at work, so I thought it would be good to lay down the
basic permission system for MySQL accounts. These apply (except where noted)
to MySQL 3 and higher.
Read more…
Working in a cross-platform environment, I sometimes find it necessary to deal with DMG files (Apple disk images). Instead of finding a coworker with a Mac, I have found it easier to equip my linux machine to be able to read, write, and create these images (uncompressed only) natively.
The key is the fact that a DMG image is merely a HFS+ filesystem in a single file (similar to the way a .iso file is a CDROM filesystem in a single file). While I’m not sure how the extra DMG options (such as encryption, compression, or being “internet enabled”) work under OS X, I have verified that it is easy to create simple, uncompressed DMG images from scratch in linux. Here’s what works for me under Ubuntu Dapper & Feisty.
Read more…