Click here to Skip to main content
15,891,905 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Data Structures and Algorithm Pin
Beginner Luck30-Aug-16 17:56
professionalBeginner Luck30-Aug-16 17:56 
QuestionHow to do Ray and Triangle-Edge Intersect/Picking? Pin
Farhad Reza7-Aug-16 3:45
Farhad Reza7-Aug-16 3:45 
AnswerRe: How to do Ray and Triangle-Edge Intersect/Picking? Pin
Kenneth Haugland10-Aug-16 5:55
mvaKenneth Haugland10-Aug-16 5:55 
AnswerRe: How to do Ray and Triangle-Edge Intersect/Picking? Pin
patbob18-Aug-16 11:57
patbob18-Aug-16 11:57 
GeneralRe: How to do Ray and Triangle-Edge Intersect/Picking? Pin
Farhad Reza18-Aug-16 23:38
Farhad Reza18-Aug-16 23:38 
GeneralRe: How to do Ray and Triangle-Edge Intersect/Picking? Pin
patbob19-Aug-16 5:50
patbob19-Aug-16 5:50 
QuestionPackage Calculations for Shipping, do you see room for improvement Pin
jkirkerx4-Aug-16 9:26
professionaljkirkerx4-Aug-16 9:26 
SuggestionRe: Package Calculations for Shipping, do you see room for improvement Pin
Richard Deeming4-Aug-16 10:29
mveRichard Deeming4-Aug-16 10:29 
I've not had a chance to give your question the attention it deserves, but one obvious issue sticks out:
jkirkerx wrote:
For Each p As model_rateItems In pItems _
   .OrderByDescending(Function(m) m.Length) _
   .OrderByDescending(Function(m) m.Width) _
   .OrderByDescending(Function(m) m.Height)

That's only going to sort by the height; each OrderBy method discards any previous ordering.

To sort by all three, you need to use ThenBy on the subsequent sortings:
VB.NET
For Each p As model_rateItems In pItems _
   .OrderByDescending(Function(m) m.Length) _
   .ThenByDescending(Function(m) m.Width) _
   .ThenByDescending(Function(m) m.Height)




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Package Calculations for Shipping, do you see room for improvement Pin
jkirkerx4-Aug-16 12:10
professionaljkirkerx4-Aug-16 12:10 
GeneralRe: Package Calculations for Shipping, do you see room for improvement Pin
Slacker00710-Aug-16 3:35
professionalSlacker00710-Aug-16 3:35 
AnswerRe: Package Calculations for Shipping, do you see room for improvement Pin
Gerry Schmitz5-Aug-16 4:57
mveGerry Schmitz5-Aug-16 4:57 
GeneralRe: Package Calculations for Shipping, do you see room for improvement Pin
jkirkerx5-Aug-16 6:45
professionaljkirkerx5-Aug-16 6:45 
AnswerI created a console app for those that want to play with it Pin
jkirkerx5-Aug-16 8:24
professionaljkirkerx5-Aug-16 8:24 
AnswerRe: Package Calculations for Shipping, do you see room for improvement Pin
ip-address10-Aug-16 2:21
ip-address10-Aug-16 2:21 
GeneralRe: Package Calculations for Shipping, do you see room for improvement Pin
jkirkerx10-Aug-16 6:55
professionaljkirkerx10-Aug-16 6:55 
QuestionCar Engine and Tire heat simulation (for games) Pin
_D4N23-May-17 3:58
_D4N23-May-17 3:58 
AnswerRe: Car Engine and Tire heat simulation (for games) Pin
Gerry Schmitz22-Jul-16 12:25
mveGerry Schmitz22-Jul-16 12:25 
AnswerRe: Car Engine and Tire heat simulation (for games) Pin
jkirkerx4-Aug-16 9:36
professionaljkirkerx4-Aug-16 9:36 
QuestionCan anybody help me with sourse code for quantum key distribution (QKD) written in any general language. Pin
Possible AC4-Jul-16 6:35
Possible AC4-Jul-16 6:35 
AnswerRe: Can anybody help me with sourse code for quantum key distribution (QKD) written in any general language. Pin
Richard MacCutchan4-Jul-16 6:41
mveRichard MacCutchan4-Jul-16 6:41 
AnswerRe: Can anybody help me with sourse code for quantum key distribution (QKD) written in any general language. Pin
Kimberly Weldon5-Jul-16 1:33
Kimberly Weldon5-Jul-16 1:33 
QuestionProtecting PDF File (URGENT) Pin
Member 1261197130-Jun-16 1:12
Member 1261197130-Jun-16 1:12 
AnswerRe: Protecting PDF File (URGENT) Pin
Richard MacCutchan30-Jun-16 1:24
mveRichard MacCutchan30-Jun-16 1:24 
AnswerRe: Protecting PDF File (URGENT) Pin
Eddy Vluggen30-Jun-16 1:42
professionalEddy Vluggen30-Jun-16 1:42 
QuestionMapping Algorithm Pin
Member 1261132829-Jun-16 20:11
Member 1261132829-Jun-16 20:11 

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.