XOR Media

Coding, Operations, Etc.

Efficiently Querying for Nearby Things

It's a fairly common use case to have a latitude and longitude and want to find the closest objects to a given point. While there are heavyweight solutions: MySQL Spatial Extensions, PostGIS, they can be more trouble than they're worth especially if you're making use of an ...

(more)
In code, tagged: algorithms, db, examples, geo, mysql, performance, and sql.

Seamless iOS Splash Video

As part of a project I'm currently working on we wanted to have a brief splash video that plays the first time our app starts up for branding purposes. The video also kills a little time as some initial processing is happening.

Nothing earth-shattering, but the video only plays ...

(more)
In code, tagged: coding, examples, github, ios, and oss.

Simple Python Iterator to Walk a List in Pairs

I've run in to a couple situations where I've wanted to iterate over a list in pairs lately and decided to create a simple iterator to clean up the code a bit.

In the following code I have a list of dictionaries that I'm going to convert ...

(more)
In code, tagged: python, coding, and examples.