Calculating the start index of a string
I'm creating a hangman game and I have everything working, but this one issue. What I'm doing is choosing a random word here: vb.net Code: 'Choose a randomword Dim r As New Random Dim int...
View Articlex ^ y Mod z
Hi, I was wondering if there's any general algorithm where you can calculate x^y Mod z assuming they're all positive integers without having to calculate x^y (since extremely large results don't keep...
View ArticleCombinations with different probability
Lets say I have 5 independent events (A-E): Pr(A) = 0,5 Pr(B) = 0,4 Pr(C) = 0,3 Pr(D) = 0,2 Pr(E) = 0,1 One "attempt" per event. I want to calculate the probability of three succesful events. I do it...
View ArticleBattery charge cycle math
According to Apple, an iPhone battery can go through 400 charge cycles before the capacity diminishes to 80%, assuming nothing happens that is known to degrade the battery's life (i.e, the temperature...
View Article[RESOLVED] Magic square, 5x5, even numbers from 2 to 50 totalling 130
My son got an assignment and I am trying to help him solve it but I am also unable to find the solution, can anyone here help me out? Google was not helpful also. He has got to solve a magic square and...
View ArticlePuzzle
1. Show that 30^239 + 239^30 is not prime. 2. Investigate when (p-1)^q + q^(p-1) is divisible by p, for primes p and q. Fermat's Little Theorem may be helpful.
View ArticleHow to Find R in formula??
hi all, am using DAO in VB6 and MS-Access as back hand. now, i have a formula, u can find out EMI for Loan with that formula. formula is as below. EMI = P * R * (1 + R)^N / ((1 + R)^N - 1) ----> Plz...
View Article[RESOLVED] How to Find R in formula??
hi all, am using DAO in VB6 and MS-Access as back hand. now, i have a formula, u can find out EMI for Loan with that formula. formula is as below. EMI = P * R * (1 + R)^N / ((1 + R)^N - 1) ----> Plz...
View ArticleExponential Moving Average
Does anyone having a function to calculate EMA that they would be willing to share? Would like to input an array of values & a period & get back the EMA value. Thanks if you can help...
View ArticleHolt-Winters Triple Exponential smoothing
I am trying to code Holt-Winters Triple Exponential smoothing in VB.NET. http://www.itl.nist.gov/div898/handb...on4/pmc435.htm The part I am struggling with is "alpha, beta and gamma are constants that...
View ArticleHow things add up
I got this wrong when it was said as a sentence: What is forty plus forty times zero plus one? I said one. The person that asked me said no it is forty one. I plugged that into a program as: Dim X as...
View ArticleTechniques on oral/mental math
My 9 year old son will compete on a mental/oral math competition next week, anyone here who can provide tips or provide a link for some tip and tricks? TIA
View Articleintersection point slightly off
the code i've posted is supposed to find the intersection point of 2 lines, but it's slightly wrong. i make the point of intersection 122,42, but i think getnode (i found this function on msdn) finds...
View Article[RESOLVED] calculate points on line
how can i calculate points 5 pixels from both ends on the 2 black lines in the attached image? Attachment 98299 the lines are parallel + spaced approximately 24 pixels apart. this is the code i used to...
View ArticlePinochle Probability (again)
Okay, so I was reviewing this thread from before: http://www.vbforums.com/showthread.p...light=pinochle and was trying to apply it to a new situation (and also the question asked there). If I use...
View Articlemy linear algebra questions
hi, im studyin lin. algebra and i have 3 questions that i couldn't understand and solved. im studying with different resources, video lectures etc. i would be grateful if you solve/prove my questions...
View ArticleBeat The Banker / Deal or No Deal Odds Calculation Help...
Hello. I'm trying to work out how the banker on the UK T.V. show "Deal or No Deal" Works out the Math of what Prize to offer a contestant If you haven't seen the show General description follows...
View ArticleANGLE OF INCIDENCE IS EQUAL TO THE ANGLE OF Reflection
hey is this true even when two balls meet? is this the right way to get the answer? To get the final angle: AngleIncidence = AngleReflection AngleIncidence = (180° + InitialAngle) - (NormalAngle)...
View ArticleSimple multiplication progran help needed
Hi I just started playing around with Visual Basics and I tried to make a simple program to work out a price on a square item of steel, but I'm stuck. The program has to multiply the length, width,...
View Article[RESOLVED] ANGLE OF INCIDENCE IS EQUAL TO THE ANGLE OF Reflection
hey is this true even when two balls meet? is this the right way to get the answer? To get the final angle: AngleIncidence = AngleReflection AngleIncidence = (180° + InitialAngle) - (NormalAngle)...
View Article
More Pages to Explore .....