Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

/ [Snippet] Sport bet(s) accumulator function.

The user Nov asked me to help with this "Sport Bet Accumulator Calculator".

I myself have never fucked with anything regarding betting and sports and shit like that, but I gave it a try. After a while, I finally got it.

Here's the function and the other shit you'll need:
http://pastebin.com/yy29KrYx

How to call it:
Code
tbResult.Text = calcBets(Integer.Parse(tbStake.Text), num1.Value / num11.Value, num2.Value / num22.Value, num3.Value / num33.Value, num4.Value / num44.Value)

tbResult is the TextBox that will be the result of the calculations, where we will set it's value to the result of the function.
Integer.Parse is used to get the number equivalent of a String.

Then you supply divisions of the other values.

In this format: # / #, # / #, # / #

and so on.

Here's a screen shot of the little app I made while I was testing this:
Spoiler (Click to View)

Oh and note, while I only supplied 4 odd inputs, it supports any amount.

I'm not too sure if I did this the best way, so any criticism is welcome.

Thank you.
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
Good job, SWG.
I'm gonna use this sometime.
Code could've been better. Property is useless here.
(Mar 11, 2013 07:37 AM)H3x0S Wrote:  Code could've been better. Property is useless here.

That could've just been a privately declared integer probably, I don't really remember what I was thinking when I added the property; but at the time that was the most probable option in my opinion.

Thanks for the comments the both of you.
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro
Code
'Private _val As Integer This is no longer needed, even if it was = Nothing is not necessary.
'If you're using a later version you don't have to use get/set.

Why are you using a While true and the UBound function..? >_>

Code
For i As Integer = 0 To odds.Length
   odds(i) 'Durp.
Next
(Mar 11, 2013 01:47 PM)Smelly Shoes Wrote:  
Code
'Private _val As Integer This is no longer needed, even if it was = Nothing is not necessary.
'If you're using a later version you don't have to use get/set.

Why are you using a While true and the UBound function..? >_>

Code
For i As Integer = 0 To odds.Length
   odds(i) 'Durp.
Next

I always initialize variables.

I probably should've used the Length property in this case, considering I used UBound and then said "add 1" which takes away from the purpose lol.

And this is one of those "releases" where I just tried a bunch of different shit and when I finally got it to work dumped the code on y'all.

Another reason why I said: "I'm not too sure if I did this the best way, so any criticism is welcome."

So, thanks for the criticism. :p
Thread: Backend Web-Dev. - by SomeWhiteGuy

WATCH OUT 'LIL HOE,
MY PARTNA STILL SMOKE ON PAROLE
selling -
megabits.org + freakin.pro


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by еlixirSep 9, 2022 06:31 AM 0 132 Sep 9, 2022 06:31 AM
Last Post: еlixir
[C] by FhackMar 2, 2022 03:52 AM 4 307 Mar 2, 2022 03:52 AM
Last Post: Fhack
[Python] by datguy.devNov 28, 2019 10:37 PM 4 296 Nov 28, 2019 10:37 PM
Last Post: Eternal Darkness