Click here to Skip to main content
15,927,744 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Drop Excel into OLE object (Access/VBA) Pin
john john mackey2-Feb-05 9:26
john john mackey2-Feb-05 9:26 
GeneralRegistry - Qword Pin
Anonymous2-Feb-05 7:31
Anonymous2-Feb-05 7:31 
GeneralRe: Registry - Qword Pin
Dave Kreskowiak2-Feb-05 10:36
mveDave Kreskowiak2-Feb-05 10:36 
GeneralRe: Registry - Qword Pin
Dave Kreskowiak2-Feb-05 15:04
mveDave Kreskowiak2-Feb-05 15:04 
GeneralRe: Registry - Qword Pin
Anonymous3-Feb-05 12:32
Anonymous3-Feb-05 12:32 
GeneralRaiseEvent not triggerd Pin
DSLR2-Feb-05 5:14
DSLR2-Feb-05 5:14 
Questionhow to realice permutations in a VBA Programm Pin
Stephan Wright2-Feb-05 4:19
Stephan Wright2-Feb-05 4:19 
AnswerRe: how to realice permutations in a VBA Programm Pin
Stephan Wright2-Feb-05 21:38
Stephan Wright2-Feb-05 21:38 
Well I realized I do not need every permutation, I do only need any combination of the min max values
lets have alook at the followin example
lets say I do have the intervals "A - B", "C - D" and "E - F"
now I do want to get any min max combination (because I do want to use this for an addfunction there is no different if lets say A is in first, second or third place. Meaning e.g. ACE = CEA = EAC etc.

Therefor I do only need ACE, ACF, ADE, ADF, BCE, BCF, BDE and BDF.
Every other combination is not needed because plus is commutativ (see above)

If you do have a look at this with it's index then you might realice there is every bitcombination in it. Because lets say the minimum is 0 and the maximum is 1 in indexing then you do get 000 up to 111.

And that's what I do want to realize for "length" 2 to 10 (or even higher).
Well I could use 2, 3 ... loops in loops but well in the beginning I do not know how many are needed. Well maybe I should try to think about a bitmap using an array doing something like
if most right position in array is 0 then set it to 1, if it is already 1 then set it to 0 and increase the next position. if this is already 1 then increase the next and set this to 0 etc. Sniff | :^)
meaning 000 +1 => 001 001 + 1=> 010 .... 011 +1 => 100 ...

Does anyone of you know a better solution for this? If so please let me know!
Because in my example I have to check the bitarray and this task gets bigger for every combination, which is not a good idea concerning performance. Smile | :)

Thanks!

Stephan.
Generalmoving between forms Pin
fo0lish2-Feb-05 3:24
fo0lish2-Feb-05 3:24 
GeneralRe: moving between forms Pin
padvit2-Feb-05 18:30
padvit2-Feb-05 18:30 
Generalstringparsing Pin
Stephan Wright2-Feb-05 2:42
Stephan Wright2-Feb-05 2:42 
GeneralRe: stringparsing Pin
Stephan Wright2-Feb-05 3:06
Stephan Wright2-Feb-05 3:06 
GeneralRe: stringparsing Pin
Scott Serl2-Feb-05 10:02
Scott Serl2-Feb-05 10:02 
GeneralRe: stringparsing Pin
Stephan Wright2-Feb-05 21:02
Stephan Wright2-Feb-05 21:02 
GeneralRe: stringparsing Pin
Scott Serl3-Feb-05 9:14
Scott Serl3-Feb-05 9:14 
GeneralRe: stringparsing Pin
Gavin Jeffrey2-Feb-05 3:17
Gavin Jeffrey2-Feb-05 3:17 
GeneralRe: stringparsing Pin
The Man from U.N.C.L.E.2-Feb-05 3:37
The Man from U.N.C.L.E.2-Feb-05 3:37 
GeneralJoining Tables in seperate databases Pin
Just Greeky Creek2-Feb-05 2:27
Just Greeky Creek2-Feb-05 2:27 
GeneralRe: Joining Tables in seperate databases Pin
The Man from U.N.C.L.E.2-Feb-05 3:39
The Man from U.N.C.L.E.2-Feb-05 3:39 
GeneralRe: Joining Tables in seperate databases Pin
Just Greeky Creek2-Feb-05 4:04
Just Greeky Creek2-Feb-05 4:04 
GeneralRTD (real Time Data) problem Pin
aswanee2-Feb-05 2:08
aswanee2-Feb-05 2:08 
GeneralRe: RTD (real Time Data) problem Pin
Dave Kreskowiak2-Feb-05 4:08
mveDave Kreskowiak2-Feb-05 4:08 
GeneralLoading a Windows Forms Usercontrol in VB6 Pin
stensmith2-Feb-05 0:58
stensmith2-Feb-05 0:58 
GeneralOledb provider for foxpro Pin
ssskkk2-Feb-05 0:50
ssskkk2-Feb-05 0:50 
Generalshapes(rect,square,circle) Pin
tendlya1-Feb-05 19:00
tendlya1-Feb-05 19:00 

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.