Skip to main content.
November 23rd, 2008

Mini Searches with Answers

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.

Windows/DOS - Capture std. out and std. out in a file
SomeCmd > My.log 2>&1

EtherPad: Realtime Collaborative Text Editing

Any pointers/advice to help learn CPython source?
How is Python formed? How interpreter get imported?

ExcelWriter Question - How to Open Password Protected Excel File
If you ever need to open a password protected Excel file, or add a password to one using ExcelWriter in Python, here’s how:

xlapp = wn32com.client.Dispatch('SoftArtisans.ExcelWriter')
xlapp.DecryptPassword = 'MyPassword'
xlapp.Open(f)

mozdev.org - twanno
How to pull a Firefox tab into a new window (tab tearing)

Winpdb - A Platform Independent Python Debugger » About
Winpdb is a platform independent GPL Python debugger with support for multiple threads, namespace modification, embedded debugging, encrypted communication and is up to 20 times faster than pdb.

Tags: , , , , , , , , , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 5:59 AM UTC

No Comments »

November 18th, 2008

Mini Searches with Answers

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.

in Electronics what’s the Difference Between a Resistor and a Heating Element? : AskReddit
Mostly me talking to myself in an empty Reddit thread, coming to terms with Ohm's law.

xkcd • View topic - Superconductor confusion
How Ohm's law applies to superconductors

Thingiverse - Digital Designs for Physical Objects

Pearson correlation coefficient in SQL

Convert pdf to word - Convert pdf to doc - Convert online pdf to word

PiccDrop | Free Image Hosting

Tags: , , , , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 6:00 AM UTC

No Comments »

November 5th, 2008

Mini Searches with Answers

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.

How to access iframe in jQuery
$('#iframeID').contents().find('#someID').html();

Stefano’s Linotype » Blog Archive » Why Programmers Suck at CSS Design
Really useful CSS advice

True or False: Eating at Night Will Make You Gain Weight | ThirdAge Articles

Jim Hefferon’s Linear Algebra: A free textbook with fascinating applications
http://joshua.smcvt.edu/linearalgebra/

How to back up your Gmail on Linux in four easy steps

Most efficient way to search the last x lines of a file in python - Stack Overflow
Good way to read the end of a file, or get the file size.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 5:59 AM UTC

No Comments »

November 1st, 2008

a MySQL Table of Zip Code Latitude/Longitude Coordinates

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 »