GN90 wrotecollectionIndex = rowIndex/2 + 1
results will be :
rowIndex ===> collectionIndex
1 ===> 1
3 ===> 2
5 ===> 3
7 ===> 4
9 ===> 5
11 ===> 6
13 ===> 7
15 ===> 8
......
mesa177 wroteOhhh, ok, then GN90's solution is the correct one.
Actually, I think it is:
collectionIndex = (rowIndex - 1) / 2 + 1
But I could still be wrong... I'll have to fix a few bugs first and then test it thoroughly to make sure whether it's the correct equation or not.
Georges wroteMan, i want to see you working on some encryption / decryption algorithms. That would be fun.
More fun than you think. I've been through this in my Data Security course. That was the ONLY IT course in which I needed help - I was completely lost! The other two courses in which I needed help during my 3 years of uni were Math 2 and Statistics 2 :)
Georges wroteI seriously wonder how this combination is working for you (A very VERY (Yes VERY) skilled programmer and learner, yet a person who failed the math 101 test)...
Actually, I think that's because I rarely do any UI programming. But currently, I'm working on some drawing + animation framework for Silverlight (outside my work-hours though). I expect my brain to freeze frequently over the next few weeks! :P
But the thing is, when you're working on enterprise applications where it's more about problem solving (technical and business problems), you rarely need to use any math. I just
love designing solutions that involve some fancy architecture (sometimes I fall in the pitfall of over-architecture though). I cannot claim to be a software architect yet but I'm doing my best to be skilled enough to become one. I also found out that I prefer framework/library development over application development. Or at least, I prefer working on laying out the infrastructure of an application so everything would be easily built on top of it.
Georges wroteKassem, do you remember the 1000 vs 500 math problem (few months ago) :P
Have I mentioned that I have a terrible memory? :P But I think it has something to do with some question I've asked you on MSN?