Click here to Skip to main content
15,916,951 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Can you do this with a convex hull? Pin
Kyudos16-Feb-12 15:31
Kyudos16-Feb-12 15:31 
GeneralRe: Can you do this with a convex hull? Pin
BobJanova17-Feb-12 0:36
BobJanova17-Feb-12 0:36 
Questionwordwrap with minimum raggedness Pin
Member 858607226-Jan-12 10:09
Member 858607226-Jan-12 10:09 
AnswerCrosspost Pin
Peter_in_278026-Jan-12 11:37
professionalPeter_in_278026-Jan-12 11:37 
QuestionA type of balanced 0–1 matrix Pin
Member 858607221-Jan-12 8:01
Member 858607221-Jan-12 8:01 
AnswerRe: A type of balanced 0–1 matrix Pin
Alan Balkany16-Feb-12 4:08
Alan Balkany16-Feb-12 4:08 
Questioninput Pin
AsadRana21-Jan-12 1:27
AsadRana21-Jan-12 1:27 
AnswerRe: input Pin
Richard MacCutchan21-Jan-12 2:34
mveRichard MacCutchan21-Jan-12 2:34 
AnswerRe: input Pin
BillWoodruff29-Jan-12 13:08
professionalBillWoodruff29-Jan-12 13:08 
QuestionnQueens algorithm Pin
PIEBALDconsult31-Dec-11 4:02
mvePIEBALDconsult31-Dec-11 4:02 
AnswerRe: nQueens algorithm Pin
DaveAuld31-Dec-11 4:49
professionalDaveAuld31-Dec-11 4:49 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult31-Dec-11 15:08
mvePIEBALDconsult31-Dec-11 15:08 
GeneralRe: nQueens algorithm Pin
Member 41945931-Jan-12 13:20
Member 41945931-Jan-12 13:20 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult1-Jan-12 16:14
mvePIEBALDconsult1-Jan-12 16:14 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult9-Jan-12 13:15
mvePIEBALDconsult9-Jan-12 13:15 
GeneralRe: nQueens algorithm Pin
Member 419459311-Jan-12 8:25
Member 419459311-Jan-12 8:25 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult11-Jan-12 9:35
mvePIEBALDconsult11-Jan-12 9:35 
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...

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.