These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
Tags: Ajax, Batch, Collaboration, Debug, Design, Dos, Editor, Excel, Extension, Firefox, Javascript, Pastebin, Pdb, Pfam, Productivity, Python, Realtime, Tab, Utilitymill, Win32
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 5:59 AM UTC
No Comments »
These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
Tags: 3D, Conservation_Of_Energy, Correlation, Electricity, Forum_I_Posted_To, Image, Imageshack, Ohmslaw, Pdf, Physics, Reprap, Sharing, Sql, Superconductor, Word
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 6:00 AM UTC
No Comments »
These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
Tags: Backup, Calories, Css, Debate, Design, Diet, Ebook, Education, File, Getmail, Gmail, Html, Ie, Iframe, Jquery, Learning, Linearalgebra, Linux, Math, Mathematics, Nutrition, Python, Seek, Tail, Ubuntu, Win32
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 5:59 AM UTC
No Comments »
I was working on adding location awareness to GigBayes today and ended up making a table of zip codes and their coordinates. I figured it would be nice to share it with the world:
So here is a pre-made MySQL table containing US zip codes and their latitude and longitude (.zip 820K)
I got the data from here, and then deleted any zip codes which where missing coordinates.
You can also create this MySQL function to use for finding the distance between locations:
CREATE FUNCTION `earth_distance_miles`(p1 point, p2 point) RETURNS int(11)
RETURN
((ACOS(SIN(x(p1) * PI() / 180) * SIN(x(p2) * PI() / 180) + COS(x(p1) *
PI() / 180) * COS(x(p2) * PI() / 180) * COS((y(p1) - y(p2)) * PI() /
180)) * 180 / PI()) * 60 * 1.1515)
The formula comes from here.
You’d use the function like this:
SELECT earth_distance_miles(
(
SELECT location
FROM zip_code
WHERE zip = '06902'
), (
SELECT location
FROM zip_code
WHERE zip = '20905'
)
);
Which gives us 227 miles. A very reasonable answer.
Posted by Greg Pinero (Primary Searcher) as Other, Web Services, SQL at 6:00 PM UTC
No Comments »