Click here to Skip to main content
15,887,135 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: nQueens algorithm Pin
Member 419459311-Jan-12 10:01
Member 419459311-Jan-12 10:01 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult11-Jan-12 10:22
mvePIEBALDconsult11-Jan-12 10:22 
GeneralRe: nQueens algorithm Pin
Member 419459311-Jan-12 10:42
Member 419459311-Jan-12 10:42 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult11-Jan-12 11:16
mvePIEBALDconsult11-Jan-12 11:16 
QuestionTuring Machine Simulator witch greedy algorithm Pin
nasser moradbeiki27-Dec-11 2:59
nasser moradbeiki27-Dec-11 2:59 
AnswerRe: Turing Machine Simulator witch greedy algorithm Pin
Richard MacCutchan27-Dec-11 4:49
mveRichard MacCutchan27-Dec-11 4:49 
AnswerRe: Turing Machine Simulator witch greedy algorithm Pin
PIEBALDconsult30-Dec-11 8:33
mvePIEBALDconsult30-Dec-11 8:33 
QuestionIs "Day.Month DayOfWeek" an Unique Date Time? Pin
Henning Dieterichs22-Dec-11 12:02
Henning Dieterichs22-Dec-11 12:02 
Hi out there,

I am writing a component which parses current html-data.
This data contains a list of elements depending on a date time. Unfortunately this date time is given in the following format: "Day.Month DayOfWeek" - e.g. "22.12 Thursday".

Now, in december, the list contains elements with a date time set in the next year, e.g. "5.1 Thursday", so the parser has to decide which year he use to return an unique date time (2011 or 2012 or others).

Since the data could be in the past too (20010), my idea is the following:
The last YPast and the next YFuture years are checked whether the given day in the given month is actually the given day of week (e.g. if the 22.12.2012 actually is a thursday) and the year with the smallest distance to today which meets this condition is used.

Because it is very important, that the parsed date time is correct, the algorithm has to be as good as possible.
So my question: Are there any better ideas than mine or any improvements? In which circumstances it comes to collisions? Which value should be selected for YPast and YFuture?
If you find spelling- or grammer-mistakes, please let me know, so that I can correct them (at least for me) - english is not my first language...

AnswerRe: Is "Day.Month DayOfWeek" an Unique Date Time? Pin
Luc Pattyn22-Dec-11 12:18
sitebuilderLuc Pattyn22-Dec-11 12:18 
GeneralA more effective way to find the number of points with a given distance between them on a line? Pin
Erik Rude19-Dec-11 22:32
Erik Rude19-Dec-11 22:32 
GeneralRe: A more effective way to find the number of points with a given distance between them on a line? Pin
Richard Andrew x6420-Dec-11 6:49
professionalRichard Andrew x6420-Dec-11 6:49 
GeneralRe: A more effective way to find the number of points with a given distance between them on a line? Pin
IdUnknown21-Dec-11 6:39
IdUnknown21-Dec-11 6:39 
AnswerRe: A more effective way to find the number of points with a given distance between them on a line? Pin
Luc Pattyn21-Dec-11 8:23
sitebuilderLuc Pattyn21-Dec-11 8:23 
GeneralWholesale Sources Pin
Andrew Dudley16-Dec-11 19:46
Andrew Dudley16-Dec-11 19:46 
NewsDiscover How FX Brokers Can Earn On Forex Trading Pin
forex platform30-Nov-11 21:09
forex platform30-Nov-11 21:09 
QuestionDirichlet problem for the unit circle code Pin
Chesnokov Yuriy27-Nov-11 17:19
professionalChesnokov Yuriy27-Nov-11 17:19 
AnswerRe: Dirichlet problem for the unit circle code Pin
Roger Wright9-Dec-11 4:03
professionalRoger Wright9-Dec-11 4:03 
QuestionSafely storing passwords Pin
Bernhard Hiller15-Nov-11 20:55
Bernhard Hiller15-Nov-11 20:55 
AnswerRe: Safely storing passwords Pin
Alan Balkany22-Nov-11 4:06
Alan Balkany22-Nov-11 4:06 
AnswerRe: Safely storing passwords Pin
canlel9-Dec-11 0:08
canlel9-Dec-11 0:08 
AnswerRe: Safely storing passwords Pin
OriginalGriff9-Dec-11 1:06
mveOriginalGriff9-Dec-11 1:06 
QuestionLearning software design patterns Pin
Hypermommy9-Nov-11 22:26
Hypermommy9-Nov-11 22:26 
AnswerRe: Learning software design patterns Pin
PIEBALDconsult10-Nov-11 1:54
mvePIEBALDconsult10-Nov-11 1:54 
GeneralRe: Learning software design patterns Pin
Hypermommy10-Nov-11 2:44
Hypermommy10-Nov-11 2:44 
QuestionA small exercise Pin
PIEBALDconsult9-Nov-11 13:25
mvePIEBALDconsult9-Nov-11 13:25 

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.