![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
yeah MySQL, you are my BITCH
well, she was winning for a while, but she can be tamed...
SELECT *, AsText(geometry) FROM geo_data WHERE Intersects( GeomFromText('POLYGON((43.3723651907 5.4,43.2999559362 5.49943509666,43.2276328093 5.40000000532,43.2999559284 5.30056490336,43.3723651907 5.4))'),geometry ) ORDER BY SQRT(POW( ABS( X(geometry) - X( GeomFromText('POINT(43.3723651907 5.4)') )), 2) + POW( ABS(Y(geometry) - Y( GeomFromText('POINT(43.3723651907 5.4)') )), 2 )) OK, sorry you had to read this, but sometimes when you fight for so long, winning is sooooo sweeeet. ![]() . As you were
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
I make pixels work
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
|
Sweet! Fight the Machine!
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
I tried that statement on my server and it melted
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Too lazy to set a custom title
Industry Role:
Join Date: Dec 2004
Location: Happy in the dark.
Posts: 93,082
|
Yeah, baibiiiiiiiiiii!
__________________
FLASH SALE INSANITY! deal with a 100% Trusted Seller Buy Traffic Spots on a High-Quality Network 1 Year or Lifetime — That’s Right, Until the Internet Explodes! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Posts: 8,170
|
Your sig is looking good. By far the closest GeoIP locations then I've seen. Very good work.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
yaar,
6668045 rows in total the sql query: Showing rows 0 - 13 (14 total, Query took 0.0042 sec) mysql spatial indices kick frikken ass! Sad think is, I'm just amusing myself, trying to tweak 'nearby' searches to be faster and more accurate. This did it but some more coding before it goes live. Sad geeks ![]()
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
and those paying attention would point out to me my error:
SQRT(POW( ABS( X(geometry) - X( GeomFromText('POINT(43.3723651907 5.4)') )), 2) + POW( ABS(Y(geometry) - Y( GeomFromText('POINT(43.3723651907 5.4)') )), 2 )) those POINT() values should be the center of the polygon, not the top left corner, as shown there ![]()
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
http://www.geoplugin.net/extras/near...xml&radius=100
All the nearest populated places to you within a 100 mile radius XML output ![]() Mission accomplished .
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
Nice job man! keep it up and I may replace using my own geo database from maxmind with your solution in my products :D
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
The real question is, how long does it take to run.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2002
Posts: 34,431
|
borked are you freelancing these days?
__________________
I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
I was more impressed with your sig when it gave me my location in Cyrillic (which is what we use), now it's all Latin
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Quote:
That way I can search the database for your example and find out what changed during he modificaitons. Cheers
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Table info:
geo_data 6,668,045 INNODB latin1_swedish_ci 1.5 GiB On a query with a polygon covering 100 miles around my location query: SELECT name, country, region, latitude, longitude FROM geo_data WHERE place_type = 'P' AND place_code = 'PPL' AND alternate_names != '' AND INTERSECTS( GEOMFROMTEXT( 'POLYGON((44.7473228148 5.4,43.2827760916 7.38832741803,41.8526751852 5.40000010412,43.2827759366 3.41167258704,44.7473228148 5.4))' ) , GEOMETRY ) ORDER BY SQRT( POW( ABS( X( GEOMETRY ) - X( GEOMFROMTEXT( 'POINT(43.299999 5.400000)' ) ) ) , 2 ) + POW( ABS( Y( GEOMETRY ) - Y( GEOMFROMTEXT( 'POINT(43.299999 5.400000)' ) ) ) , 2 ) ) LIMIT 0 , 30 Run time: Showing rows 0 - 29 (2,468 total, Query took 0.0826 sec) ooooh yeah ![]()
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
Quote:
here's one ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 | |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Quote:
Now that the code lookup/replace works on the nearby stuff, I'll be swapping them out in the geoip lookups next. And fixing this cyrillic/latin swap that happened. That's the problem with these databases - if you aren't in that locality, it's a bitch to try and squash bugs cos you never see them!
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,021
|
I'm sure it'll run great when you toss it on a site doing 300k/day...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
grrr damn - ok I see it
eg: Sarafovo Sarafovo Antim I,Paparos,Papure,Sarafovo,Sarefovo,Сарафово Saraevo Saraevo 3333,Saraevo,Saraewo,Сараево Sanur Dere Sanur Dere Sanur Dere,Санър Дере the names got moved over to alternate names column. Damn damn - not easy to reverse, but I'll try
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Quote:
top - 23:29:53 up 12 days, 10:55, 1 user, load average: 0.24, 0.30, 0.27 have a look at the bottom of the html source on any of evilangel's sites if you don't believe it is getting hammered. load-balanced server with a powerful beast running mysql
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 | |
235 Pound Gorilla
Industry Role:
Join Date: Apr 2003
Location: Valhalla
Posts: 3,467
|
Quote:
only one million? ![]() ![]() ![]() jk - your hamster style is impressive ![]() ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,392
|
I fucked her in her arse.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
How's it working for you now Antonio? Should be back to Cyrillic...
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
aliasx
Join Date: Apr 2001
Posts: 19,010
|
borked is a hacker
__________________
https://porncorporation.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
Too lazy to set a custom title
Join Date: Dec 2004
Posts: 17,513
|
i love mysql
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#29 |
Too lazy to set a custom title
Join Date: Jul 2003
Location: Netherlands
Posts: 10,127
|
job well done
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#30 |
aliasx
Join Date: Apr 2001
Posts: 19,010
|
Used as a term of endearment.
__________________
https://porncorporation.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#31 |
Confirmed User
Join Date: May 2007
Location: Austin
Posts: 1,793
|
Your sig is damn impressive! Some of the smallest no people having places around on there
__________________
![]() Writing mainstream and adult since 2003 Hit me up ICQ 375089597 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#32 |
ICQ: 197-556-237
Join Date: Jun 2003
Location: BRASIL !!!
Posts: 57,559
|
Looks like Query analyzer error.
__________________
I'm just a newbie. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#33 | |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Quote:
![]() Follow the link in the sig - the script is available for free. GPL license.
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#34 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
The thing is throwing some error? or you mean the statemtnt looks like an error?!!
I'm interested in knowing how the nearby stuff works for you, from brazil... Thanks for the feedback
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |