October 5th, 2009

Hungry snail!

Commentary: The sunflower boy's smile

" (CNN) -- On the morning of last year's annual Sunflower Fair in La Porte, Indiana, a family, appearing a little lost, walked up and down a crowded street, looking in vain for the table to sign up their entry. They carried a large sunflower with them.

If no one noticed the exhausted, grieving look in the family's eyes, that was understandable. The Sunflower Fair is a place of happy noise: rides and music and food booths. It is La Porte's fall festival, and people from across northwest Indiana come to spend a Saturday in the midst of the milling, chattering crowds.

The family silently bearing the large sunflower had never been to the fair before.

But this was important..."


Hungry snail!

Elevator ride to hell - going down.

"Anything's possible, but this seems unlikely. In 1948, U.S. consumers were not still saddled with the massive debts that are stifling consumption today. And consumers still represent 70%+ of spending.

The other interesting point with respect to the 1948 "V" is that we have now gone as many months from the peak as it took employment to recover in full in the 1948 recession. And we're still losing jobs."

Hungry snail!

Useful.... or not...

Imagine this...

A map of the UK....

You set your circular cursor to a diameter you want, and then roam over the map.

Any postcodes in that circle are then listed...

Any use?
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
What's the best Vs easiest method of searching through this list?
There's 1.8 million records.

I thought perhaps uploading them into a database, then sorting on latitude/longitude, and doing a binary search on the resultant co-ordinates for a location inside the boundary set by the user?

What then though? Some kind of sweep away from that record to find neighbouring postcodes? If I did that for the latitude, how would I then scan on the longitude...?

Would sticking the whole dataset in memory, and then doing a search for all the records starting with a (text) section of latitude and longitude work better?
for instance... for each instance of search("53.12"), search on the line... search("-2.12)

I tried this in VBScript with a 230MB file, and found one of the first, then one of the last postcodes in <.2 second!

set objFS = CreateObject("Scripting.FileSystemObject")
set objFile = objFS.GetFile("post.dat")
set objTS = objFile.OpenAsTextStream(ForReading, TristateFalse)
strSearchThis = objTS.Read(objFile.Size)
wscript.echo "Starting search"

if instr(strSearchThis, "AB101JB") > 0 then
wscript.echo "Found 1"
wscript.echo "Not found 1"
end if
if instr(strSearchThis, "ZE2 9TZ") > 0 then
wscript.echo "Found 2"
wscript.echo "Not found 2"
end if

"AB101AA","20070339","39420","80630","00","QA","MH","1","1","179","1","SN9","S00",-2.097472,57.147616,"NJ9420006300","08/07/09 00:00:00"
"AB101AF","19951239","39410","80640","00","QA","MH","1","1","179","1","SN9","S00",-2.099127,57.148513,"NJ9410006400","08/07/09 00:00:00"
"AB101AG","19951239","39420","80630","00","QA","MH","1","1","179","1","SN9","S00",-2.097472,57.147616,"NJ9420006300","08/07/09 00:00:00"
"AB101AH","19951239","39430","80630","00","QA","MH","1","1","179","1","SN9","S00",-2.095819,57.147617,"NJ9430006300","08/07/09 00:00:00"
"AB101AJ","19980739","39410","80630","00","QA","MH","0","1","179","1","SN9","S00",-2.099125,57.147615,"NJ9410006300","08/07/09 00:00:00"
"AB101AL","19951239","39430","80650","00","QA","MH","0","1","179","1","SN9","S00",-2.095824,57.149414,"NJ9430006500","08/07/09 00:00:00"