Click here to Skip to main content
15,898,884 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: question about cycle reduction problem Pin
Chris Losinger6-Oct-16 3:59
professionalChris Losinger6-Oct-16 3:59 
Questionbooth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
EZCodeProject27-Sep-16 13:45
EZCodeProject27-Sep-16 13:45 
AnswerRe: booth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
harold aptroot28-Sep-16 3:11
harold aptroot28-Sep-16 3:11 
GeneralRe: booth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
EZCodeProject28-Sep-16 7:08
EZCodeProject28-Sep-16 7:08 
QuestionTrying to get additions, deletions and changes between 2 file versions Pin
Christopher Cote26-Sep-16 2:56
Christopher Cote26-Sep-16 2:56 
AnswerRe: Trying to get additions, deletions and changes between 2 file versions Pin
Peter_in_278026-Sep-16 17:41
professionalPeter_in_278026-Sep-16 17:41 
GeneralRe: Trying to get additions, deletions and changes between 2 file versions Pin
Christopher Cote5-Dec-16 3:12
Christopher Cote5-Dec-16 3:12 
QuestionCompress items of size based on width and height Pin
jkirkerx20-Sep-16 13:59
professionaljkirkerx20-Sep-16 13:59 
This is part of my last post here, but I made it much smaller in question.
I'm trying to write a function that will compress items measured by inches.

So say; I have 10 of these
Length = 72
Width = 4
Height = 3

And I package 6 of them into this, leaving the next 4 to be in another package.
Length = 72
Width = 24
Height = 3

I want to further compress them by decreasing the width and increasing the height such as this. I took 2 of them and stacked them taller increasing the height.
Length = 72
Width = 12
Height = 6

I have this, which works in 1 pass, but I'm trying to figure out a way to make multiple passes until there are no more passes to make. But I can't seem to figure out a method in which to do this.
If (item.Width > item.Height) Then
  //You have to have at least 3 units to do this
  If (item.Qty > 2) Then
      item.Width -= p.Width * 3
      item.Height += p.Height
  End If
End If

SuggestionRe: Compress items of size based on width and height Pin
Maciej Los26-Sep-16 4:44
mveMaciej Los26-Sep-16 4:44 
AnswerRe: Compress items of size based on width and height Pin
Maciej Los26-Sep-16 12:01
mveMaciej Los26-Sep-16 12:01 
GeneralRe: Compress items of size based on width and height Pin
jkirkerx27-Sep-16 7:46
professionaljkirkerx27-Sep-16 7:46 
QuestionRe: Compress items of size based on width and height [Modified] Pin
Maciej Los27-Sep-16 8:39
mveMaciej Los27-Sep-16 8:39 
AnswerRe: Compress items of size based on width and height [Modified] Pin
jkirkerx27-Sep-16 10:42
professionaljkirkerx27-Sep-16 10:42 
GeneralRe: Compress items of size based on width and height [Modified] Pin
Maciej Los27-Sep-16 21:41
mveMaciej Los27-Sep-16 21:41 
GeneralRe: Compress items of size based on width and height [Modified] Pin
jkirkerx28-Sep-16 6:36
professionaljkirkerx28-Sep-16 6:36 
GeneralThis is what I released today for production testing Pin
jkirkerx30-Sep-16 7:26
professionaljkirkerx30-Sep-16 7:26 
GeneralRe: This is what I released today for production testing Pin
Maciej Los4-Oct-16 9:22
mveMaciej Los4-Oct-16 9:22 
GeneralRe: This is what I released today for production testing Pin
jkirkerx4-Oct-16 9:30
professionaljkirkerx4-Oct-16 9:30 
GeneralRe: This is what I released today for production testing Pin
Maciej Los4-Oct-16 9:34
mveMaciej Los4-Oct-16 9:34 
GeneralRe: This is what I released today for production testing Pin
jkirkerx4-Oct-16 9:37
professionaljkirkerx4-Oct-16 9:37 
QuestionJoin lines text file using binary difference Pin
muttleychess1-Sep-16 5:34
muttleychess1-Sep-16 5:34 
AnswerRe: Join lines text file using binary difference Pin
Gerry Schmitz1-Sep-16 6:13
mveGerry Schmitz1-Sep-16 6:13 
GeneralRe: Join lines text file using binary difference Pin
muttleychess1-Sep-16 6:38
muttleychess1-Sep-16 6:38 
GeneralRe: Join lines text file using binary difference Pin
Gerry Schmitz1-Sep-16 6:50
mveGerry Schmitz1-Sep-16 6:50 
GeneralRe: Join lines text file using binary difference Pin
muttleychess1-Sep-16 7:49
muttleychess1-Sep-16 7:49 

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.