Click here to Skip to main content
15,888,351 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Huawei Modem Unlock code Pin
Richard MacCutchan16-Feb-15 7:40
mveRichard MacCutchan16-Feb-15 7:40 
GeneralRe: Huawei Modem Unlock code Pin
F-ES Sitecore12-Mar-15 2:19
professionalF-ES Sitecore12-Mar-15 2:19 
Questionalgorithm needed Pin
arishma6-Feb-15 5:12
arishma6-Feb-15 5:12 
AnswerRe: algorithm needed Pin
Richard MacCutchan6-Feb-15 5:47
mveRichard MacCutchan6-Feb-15 5:47 
QuestionHow Dating Site find your closest match to you? Pin
Member 1140658527-Jan-15 8:42
Member 1140658527-Jan-15 8:42 
AnswerRe: How Dating Site find your closest match to you? Pin
jschell27-Jan-15 10:55
jschell27-Jan-15 10:55 
AnswerRe: How Dating Site find your closest match to you? PinPopular
CHill6027-Jan-15 13:48
mveCHill6027-Jan-15 13:48 
AnswerRe: How Dating Site find your closest match to you? Pin
F-ES Sitecore9-Feb-15 5:01
professionalF-ES Sitecore9-Feb-15 5:01 
You'll need the lat and long of every zip code in the US\Canada\whatever. Where you get that data? I don't know, will it be free? Perhaps not. But that's beside the point.

If a user does a 10 mile search and their zip code is 1234 you find the lat\long of that zip, work out how much extra lat\long you add for 10 miles in all directions (you'll find the maths to convert lat\long to miles on-line if you search) and you search for users where the lat\long falls within this 10 mile "square" (eg if the user is at lat long 0,0 you search for users where the lat is between -10 and +10, and the long is between -10 and +10). That will give you all results in a 10 mile "square" around the user, but you *really* need a circle, not a square. You can leave the results as they are knowing some will be a little long, or you can do another set of processing on the initial results that fell within the "box" to eliminate the ones that are outside the 10 mile circle. You find this out using Pythagoras' theorem (again on-line if you need to search). Loop through every result and for each result calculate the "crow flies" distance between the two users using Pythagoras, and if that distance is > 10 remove it from the result set. If you want to show the exact distance between the user and the found user you'll need Pythagoras' theorem anyway. Doing this search as a two-step process will allow you to quickly eliminate most results using a standard, fast SQL query, and you then fine-tune the results in your code on that reduced result set.
QuestionHow does Tomohiko Sakamoto's Algorithm work? need details explanation Pin
Member 816659419-Jan-15 6:31
Member 816659419-Jan-15 6:31 
AnswerRe: How does Tomohiko Sakamoto's Algorithm work? need details explanation Pin
Richard MacCutchan19-Jan-15 7:09
mveRichard MacCutchan19-Jan-15 7:09 
QuestionAlgorithm - cars crossing the bridge Pin
Member 113453804-Jan-15 6:42
Member 113453804-Jan-15 6:42 
AnswerRe: Algorithm - cars crossing the bridge Pin
jschell5-Jan-15 9:17
jschell5-Jan-15 9:17 
GeneralRe: Algorithm - cars crossing the bridge Pin
Member 113453806-Jan-15 2:37
Member 113453806-Jan-15 2:37 
GeneralRe: Algorithm - cars crossing the bridge Pin
Eddy Vluggen6-Jan-15 5:36
professionalEddy Vluggen6-Jan-15 5:36 
GeneralRe: Algorithm - cars crossing the bridge Pin
jschell7-Jan-15 8:59
jschell7-Jan-15 8:59 
QuestionHamming algorithm. Pin
Member 113468241-Jan-15 10:50
Member 113468241-Jan-15 10:50 
AnswerRe: Hamming algorithm. Pin
PIEBALDconsult1-Jan-15 11:03
mvePIEBALDconsult1-Jan-15 11:03 
QuestionBignum timing Pin
Member 419459312-Dec-14 16:59
Member 419459312-Dec-14 16:59 
GeneralRe: Bignum timing Pin
PIEBALDconsult12-Dec-14 17:12
mvePIEBALDconsult12-Dec-14 17:12 
GeneralRe: Bignum timing Pin
Member 419459313-Dec-14 7:13
Member 419459313-Dec-14 7:13 
GeneralRe: Bignum timing Pin
Member 419459314-Jan-15 11:20
Member 419459314-Jan-15 11:20 
GeneralRe: Bignum timing Pin
PIEBALDconsult14-Jan-15 12:40
mvePIEBALDconsult14-Jan-15 12:40 
GeneralRe: Bignum timing Pin
Member 419459314-Jan-15 14:47
Member 419459314-Jan-15 14:47 
Questionsimple maby for you Pin
Member 1130547811-Dec-14 23:00
Member 1130547811-Dec-14 23:00 
SuggestionRe: simple maby for you Pin
ZurdoDev12-Dec-14 4:14
professionalZurdoDev12-Dec-14 4:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.