Click here to Skip to main content
15,911,646 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: "Sub" is short for...? Pin
Garner T5-Apr-06 16:18
Garner T5-Apr-06 16:18 
AnswerRe: "Sub" is short for...? Pin
Guffa5-Apr-06 20:52
Guffa5-Apr-06 20:52 
QuestionHelp... Visualizations and Summary Pin
FeRtoll5-Apr-06 10:44
FeRtoll5-Apr-06 10:44 
AnswerRe: Help... Visualizations and Summary Pin
J4amieC11-May-06 5:23
J4amieC11-May-06 5:23 
QuestionMoney / QuickBooks type app Pin
mroosa5-Apr-06 8:12
mroosa5-Apr-06 8:12 
Questionhow to read the number printed on an image by Vb6 or .Net Pin
Murtuza Husain Miyan Patel5-Apr-06 7:52
professionalMurtuza Husain Miyan Patel5-Apr-06 7:52 
AnswerRe: how to read the number printed on an image by Vb6 or .Net Pin
Christian Graus5-Apr-06 13:44
protectorChristian Graus5-Apr-06 13:44 
QuestionSum algorithm Pin
Scott Page5-Apr-06 7:31
professionalScott Page5-Apr-06 7:31 
Confused | :confused: Confused | :confused: Confused | :confused:
I have a collection of objects (in this case, the objects are "Gauge Blocks"). Each Block in the Set (collection) has a length (i.e. 0.1009", 0.101"...). There are 81 Blocks in a Set. I need an algorithm that will determine what combination of Blocks are needed to build a stack for a given value of measurement, using the least amount of Blocks to build the stack. Also, I cannot use the same Block twice, because the Set only has one of each Block.

Example:
The inner width of the device being tested is 2.305". To manually build the stack from an 81 Block Set (or whatever size Set), I would normally start from the right most value of the tested dimension. In this case 5 is the right most value. I would locate a Block that has the same precision (2.305" has 3 digits of precision), so I would select a Block that has a 5 in the 3rd decimal place (i.e. 0.105" - The Blocks in each Set are NOT linear from 0.0001" to 4" in 0.0001" steps, which is why this is not as easy as I wish it was). Next I would find the next Block in the Set (2.305" - 0.105" = 2.200"), which is 0.2". That leaves me with 2", I use the 2" Block for a remainder of 0".

The typical Gauge Block Set includes the following values:
0.05,0.10,0.1001,0.1002,0.1003,0.1004,0.1005,0.1006,0.1007,0.1008,0.1009,0.101,0.102,
0.103,0.104,0.105,0.106,0.107,0.108,0.109,0.110,0.111,0.112,0.113,0.114,0.115,0.116,
0.117,0.118,0.119,0.120,0.121,0.122,0.123,0.124,0.125,0.126,0.127,0.128,0.129,0.130,
0.131,0.132,0.133,0.134,0.135,0.136,0.137,0.138,0.139,0.140,0.141,0.142,0.143,0.144,
0.145,0.146,0.147,0.148,0.149,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.55,0.60,0.65,
0.70,0.75,0.80,0.85,0.90,0.95,1,2,3,4

"Some people spend an entire lifetime wondering if they made a difference. The Marines don't have that problem."
( President Ronald Reagan)
AnswerRe: Sum algorithm Pin
Guffa5-Apr-06 8:17
Guffa5-Apr-06 8:17 
GeneralRe: Sum algorithm Pin
Scott Page5-Apr-06 10:04
professionalScott Page5-Apr-06 10:04 
AnswerRe: Sum algorithm Pin
J4amieC5-Apr-06 9:02
J4amieC5-Apr-06 9:02 
GeneralRe: Sum algorithm Pin
Scott Page5-Apr-06 9:58
professionalScott Page5-Apr-06 9:58 
GeneralRe: Sum algorithm Pin
machman15-Apr-06 12:16
machman15-Apr-06 12:16 
AnswerRe: Sum algorithm Pin
Steve Pullan5-Apr-06 15:38
Steve Pullan5-Apr-06 15:38 
GeneralRe: Sum algorithm Pin
Scott Page6-Apr-06 2:10
professionalScott Page6-Apr-06 2:10 
GeneralRe: Sum algorithm Pin
machman16-Apr-06 3:52
machman16-Apr-06 3:52 
AnswerRe: Sum algorithm Pin
Scott Page6-Apr-06 2:39
professionalScott Page6-Apr-06 2:39 
Questionhow i can redefine string Pin
Mr kilany5-Apr-06 7:09
Mr kilany5-Apr-06 7:09 
AnswerRe: how i can redefine string Pin
HaloZa5-Apr-06 7:19
HaloZa5-Apr-06 7:19 
AnswerRe: how i can redefine string Pin
FrankyT5-Apr-06 13:24
FrankyT5-Apr-06 13:24 
Questionhow can i send enter character to anothe applicatoin Pin
Mr kilany5-Apr-06 7:07
Mr kilany5-Apr-06 7:07 
AnswerRe: how can i send enter character to anothe applicatoin Pin
Chatura Dilan5-Apr-06 20:59
Chatura Dilan5-Apr-06 20:59 
QuestionAppDev Suggestions Please Pin
digicd15-Apr-06 6:09
digicd15-Apr-06 6:09 
AnswerRe: AppDev Suggestions Please Pin
J4amieC5-Apr-06 9:04
J4amieC5-Apr-06 9:04 
GeneralRe: AppDev Suggestions Please Pin
digicd15-Apr-06 9:17
digicd15-Apr-06 9:17 

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.