Search

just show me the code

Tuesday, March 3, 2009

Odds

Bet Actual Odds Odds Paid House Edge
Pass / Come 251:244 1:1 1.41%
Don’t Pass / Don’t Come (Bar 12) 1031:949 1:1 1.36%
Pass Odds / Come Odds Same as paid 2:1 on 4 or 10
3:2 on 5 or 9
6:5 on 6 or 8
0%
Don’t Pass Odds / Don’t Come Odds Same as paid 1:2 against 4 or 10
2:3 against 5 or 9
5:6 against 6 or 8
0%
Yo (11) 17:1 15:1 11.11%
Yo (11) 17:1 16:1 5.55%
Field 5:4 1:1 on 3,4,9,10 or 11
2:1 on 2 and 12
5.56%
Field 5:4 1:1 on 3,4,9,10 or 11
2:1 on 2, 3:1 on 12
2.78%
Hard way 4 / Hard way 10 8:1 7:1 11.11%
Hard way 6 / Hard way 8 10:1 9:1 9.09%
Place 4 / Place 10 2:1 9:5 6.67%
Place 5 / Place 9 3:2 7:5 4%
Place 6 / Place 8 6:5 7:6 1.52%

House edge for the 2 different Yo bets 15:1 and 16:1

-1*34/36 + 15 * 2/36
    -0.11111111111111111111111111111111  = 11.11% House Edge
-1*34/36 + 16 * 2/36
    -0.055555555555555555555555555555556 = 5.55% House Edge

 

-1 * 34/36 + 16 * 2/36   = 5.55% House Edge
34/36 times you will loose $1 
2/36 times you will win $16 


ref http://en.wikipedia.org/wiki/Craps
ref http://en.wikipedia.org/wiki/Roulette

Pass / Come ----- calculation ------------
-1 * 251/(251+244) + 1 * 244/(251+244)
    -0.01414

Monday, March 2, 2009

RadioButtonList jQuery get and set


    8     <script src="http://www.google.com/jsapi"></script>  
    9     <script type="text/javascript">  
   10
   11         // Load jQuery
   12         google.load("jquery", "1.3.2");
   13         google.load("jqueryui", "1.7.1");
   14         google.load("yui", "2.7.0");
   15
   16         google.setOnLoadCallback(function() {  
   17             // Your code goes here.  
   18         });  
   19     </script> 


here is the page aspx

  
    4 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
    5     <script language="javascript">
    6         $(document).ready(function() {
    7             $('#rblDiv input').click(function() {
    8                 var selected = $("#rblDiv input:radio:checked").val();
    9                 $("#output").text(selected);
   10             });
   11             $("#btnChangeValue").click(function() {
   12                 $('#<%=RadioButtonList1.ClientID %>').find("input[value='Three']").attr("checked", "checked");
   13                 $('#rblDiv input:radio:checked').trigger('click');
   14             });
   15
   16         });  
   17     </script> 
   18 </asp:Content>
   19 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   20     <div id="rblDiv">
   21         <asp:RadioButtonList ID="RadioButtonList1" runat="server">
   22             <asp:ListItem Value="One">1</asp:ListItem>
   23             <asp:ListItem Value="Two">2</asp:ListItem>
   24             <asp:ListItem Value="Three">3</asp:ListItem>
   25         </asp:RadioButtonList>
   26     </div>
   27     <input id="btnChangeValue" type="button" value="Change to Three" />
   28     <div id="output"></div>
   29 </asp:Content>






for the checkboxlist check out this and this post

Contributors