为了好玩:二十一点模拟器-程序员宅基地

介绍

您是否想过为房屋边缘指定特定的规则集? 你真的可以数卡打败房子吗? 优势到底有多大? 当发牌者显示7时,将硬16击中真的是最好的策略吗? 所有这些以及更多这些都可以通过此VBScript二十一点模拟器得到解答。 插入您要测试的规则,修改基本策略,计数值,指数,下注坡道等。 看看它们如何影响整个房屋的优势!

如何使用

大多数脚本参数都在注释后面脚本顶部的常量定义中。 其余的位于“初始化”子例程的底部。 在此定义下注坡度,指数,基本策略和计数值。

您可以在这里找到基本的策略计算器:

http://wizardofodds.com/games/blackj...gy/calculator/效果 统计信息

要模拟两层二十一点的一百万场游戏,大约要花费10分钟(或花费一分钟)。

杂项信息

不利的优势意味着它有利于房屋,并且您在模拟过程中损失了金钱。 一套不计其数的标准规则和完善的基本策略可以使房子获利约半数。

模拟的数量可以将其提高到约1.6%,这对您有利。 这是一个非常小的优势,可以在任何一场比赛中产生很大的差异。 这意味着在任何一次会议上,您都可能会亏损。 但是在许多游戏中,您的表现只是一点点。 您可以通过多次运行脚本进行少量模拟(例如大约二十一点二十一点游戏)来查看此情况。 报告的优势将在正面和负面之间来回波动。 但是运行它进行大量的模拟,您会看到真正的优势发挥出来。

关键要点是不要指望将每一场二十一点变成一场胜利。

' real world blackjack simulation
' designed with KO variant (OK qfit.com) indexes in mind
' modify constants, basic strategy, betting ramps, indexes, and count values as needed
' default values are for 2 decks, KO variant count, no double after split, dealer hits soft 17, late surrender allowed
'
' created on 10/31/2014
' version 1.0
'
' possible additions:
' add ability to calculate true count for balanced count systems
' add basic strategy defaults based on rule sets
' add ability to choose counting strategy
' add count values based on counting strategy
' add betting ramp values based on counting strategy
' add indexes based on counting strategy
' add initial count and insurance count based on counting strategy
' modify penetration to use percentage
' add constant for turning on and off surrender
' add rate of error on count as a way to account for human errors or to disguise counting
' add rate of error on basic strategy as a way to account for human errors or to disguise counting
' add sessions: session max loss before stopping, session max win before stopping
' stop playing deck after count gets below a certain number
' test up and pull betting system, streak count
' add other players at table with choice to pick position
'
' strategy key:
' S = stand
' RS = surrender, otherwise stand
' H = hit
' RH = surrender, otherwise hit
' DH = double, otherwise hit
' DS = double, otherwise stand
' P = split
' RP = surrender, otherwise split 
Option Explicit 
Const NumSims = 1000000
Const NumDecks = 2
Const Penetration = 70 ' Number of cards dealt after which the deck is shuffled
Const InitialCount = -4 ' For KO variant count, initial count is (Number of Decks - 1) * -4
Const BurnCards = 1 ' Number of cards burned before first hand is dealt
Const InsuranceCount = 3 ' Set to high number if you never want to take insurance
Const NumMaxSplits = 4 ' Max 4
Const BJPayoutAmount = 1.5 ' Use 1.5 for 3:2 and 1.2 for 6:5
Const AllowDoubleAfterSplit = False
Const CanHitSplitAces = False
Const CanResplitAces = False
Const DealerHitSoft17 = True
Const Auditing = False
Const UseIndexes = True
Const UseBettingRamp = True
Const LetItRide = False ' Modify bet downwards only if last hand was a loss. Usually used as one method of camoflaging counting.
Const UseFibonnaciBetting = False
Const AuditFileLocation = "C:\IBM\results.txt" 
Dim StandardDeck(51, 1), Decks(), BettingRamp(3, 1), CountValues(10)
Dim HardStrategy(21, 10), SoftStrategy(21, 10), SplitStrategy(10, 10), Indexes(8, 4)
Dim runningCount, deckPosition, simCount, bankRoll, betSize, wagers
Dim handCards(4, 9), handData(4, 3), numHands, i, strDecision, lastHandWon, lastBet
Dim lowBankRoll, highBankRoll, numHandsPlayed, j, startTime, endTime
Dim f, x, s 
If Auditing Then Set f = CreateObject("Scripting.FileSystemObject").CreateTextFile(AuditFileLocation) 
' Indexes:
' 0 = runningCount value
' 1 = hand value
' 2 = dealer face up card
' 3 = new strategy 
' BettingRamp:
' 0 = runningCount value
' 1 = betSize at value 
' handData:
' 0 = amount bet
' 1 = hand value
' 2 = soft hand indicator
' 3 = number of cards 
Initialize()
InitializeDecks(NumDecks) 
For simCount = 1 To NumSims
    ShuffleDecks() 
    If Auditing Then 
        f.WriteLine "Shuffle " & simCount
        For x = 0 To UBound(Decks)
            f.WriteLine Decks(x, 0) & Decks(x, 1)
        Next
        f.WriteLine ""
    End If 
    runningCount = InitialCount
    deckPosition = BurnCards
    betSize = 1 
    Do Until deckPosition > Penetration
        Erase handCards
        Erase handData
        numHands = 1 
        betSize = 1
        If UseBettingRamp Then
            For i = 0 To UBound(BettingRamp)
                If runningCount >= BettingRamp(i, 0) Then
                    betSize = BettingRamp(i, 1)
                End If
            Next
        End If 
        If LetItRide Then
            If lastHandWon = True And lastBet > betSize Then
                betSize = lastBet
            End If
            lastBet = betSize
            lastHandWon = False
        End If 
        If Auditing Then f.WriteLine "New Hand, Count = " & runningCount & ", Bet = " & betSize & ", Bankroll = " & bankRoll 
        handData(1, 0) = betSize
        handData(1, 3) = 2
        handData(0, 3) = 2 
        ' Player's first card
        handCards(1, 0) = deckPosition
        If Decks(deckPosition, 0) = 1 Then 
            handData(1, 1) = 11
            handData(1, 2) = 1
        Else
            handData(1, 1) = Decks(deckPosition, 0)
        End If
        runningCount = runningCount + CountValues(Decks(deckPosition, 0))
        deckPosition = deckPosition + 1 
        ' Dealer's first card
        handCards(0, 0) = deckPosition
        If Decks(deckPosition, 0) = 1 Then 
            handData(0, 1) = 11
            handData(0, 2) = 1
        Else
            handData(0, 1) = Decks(deckPosition, 0)
        End If
        deckPosition = deckPosition + 1 
        ' Player's second card
        handCards(1, 1) = deckPosition
        If Decks(deckPosition, 0) = 1 And handData(1, 1) + 11 <= 21 Then 
            handData(1, 1) = handData(1, 1) + 11
            handData(1, 2) = 1
        Else
            handData(1, 1) = handData(1, 1) + Decks(deckPosition, 0)
        End If
        runningCount = runningCount + CountValues(Decks(deckPosition, 0))
        deckPosition = deckPosition + 1 
        ' Dealer's second card
        handCards(0, 1) = deckPosition
        If Decks(deckPosition, 0) = 1 And handData(0, 1) + 11 <= 21 Then 
            handData(0, 1) = handData(0, 1) + 11
            handData(0, 2) = 1
        Else
            handData(0, 1) = handData(0, 1) + Decks(deckPosition, 0)
        End If
        runningCount = runningCount + CountValues(Decks(deckPosition, 0))
        deckPosition = deckPosition + 1 
        If Auditing Then 
            f.WriteLine "Dealer Face Up Card: " & Decks(handCards(0, 1), 0) & Decks(handCards(0, 1), 1)
            f.WriteLine "Player's Cards:      " & Decks(handCards(1, 0), 0) & Decks(handCards(1, 0), 1) & ", " & Decks(handCards(1, 1), 0) & Decks(handCards(1, 1), 1)
            f.WriteLine "New Count: " & runningCount
        End If 
        If runningCount >= InsuranceCount And Decks(handCards(0, 1), 0) = 1 Then
            wagers = wagers + (handData(1, 0) / 2)
            If handData(0, 1) <> 21 Then
                bankRoll = bankRoll - (handData(1, 0) / 2)
                If Auditing Then f.WriteLine "Took Insurance, Dealer did not have 21, Bankroll = " & bankRoll
            Else
                bankRoll = bankRoll + (handData(1, 0) / 2) * 3
                If Auditing Then f.WriteLine "Took Insurance, Dealer had 21, Bankroll = " & bankRoll
            End If
        End If 
        If handData(0, 1) = 21 Then
            If handData(1, 1) <> 21 Then
                bankRoll = bankRoll - handData(1, 0)
                If Auditing Then f.WriteLine "Hand Outcome: Dealer Blackjack, Bankroll = " & bankRoll
            End If
        ElseIf handData(1, 1) = 21 Then
            bankRoll = bankRoll + handData(1, 0) * BJPayoutAmount
            If Auditing Then f.WriteLine "Hand Outcome: Player Blackjack"
            lastHandWon = True
        ElseIf handData(1, 2) = 1 And Left(SoftStrategy(handData(1, 1), Decks(handCards(0, 1), 0)), 1) = "R" Then
            bankRoll = bankRoll - (handData(1, 0) / 2)
            If Auditing Then f.WriteLine "Hand Outcome: Surrender, Bankroll = " & bankRoll
        ElseIf handData(1, 2) <> 1 And Left(HardStrategy(handData(1, 1), Decks(handCards(0, 1), 0)), 1) = "R" Then
            bankRoll = bankRoll - (handData(1, 0) / 2)
            If Auditing Then f.WriteLine "Hand Outcome: Surrender, Bankroll = " & bankRoll
        ElseIf Decks(handCards(1, 0), 0) = Decks(handCards(1, 1), 0) And Left(SplitStrategy(Decks(handCards(1, 0), 0), Decks(handCards(0, 1), 0)), 1) = "R" Then
            bankRoll = bankRoll - (handData(1, 0) / 2)
            If Auditing Then f.WriteLine "Hand Outcome: Surrender, Bankroll = " & bankRoll
        Else
            ' Handle splits
            i = 1
            Do Until i > numHands
                If Decks(handCards(i, 0), 0) = Decks(handCards(i, 1), 0) And Right(SplitStrategy(Decks(handCards(1, 0), 0), Decks(handCards(0, 1), 0)), 1) = "P" And numHands < NumMaxSplits Then
                    numHands = numHands + 1
                    handData(numHands, 0) = handData(i, 0)
                    handData(numHands, 2) = handData(i, 2)
                    handData(numHands, 3) = 2
                    handCards(numHands, 0) = handCards(i, 1) 
                    If Decks(handCards(i, 0), 0) = 1 Then
                        handData(numHands, 1) = 11
                        handData(i, 1) = 11
                    Else
                        handData(numHands, 1) = Decks(handCards(i, 0), 0)
                        handData(i, 1) = Decks(handCards(i, 0), 0)
                    End If 
                    ' Deal a card to each hand
                    handCards(i, 1) = deckPosition
                    If Decks(deckPosition, 0) = 1 And handData(i, 1) + 11 <= 21 Then 
                        handData(i, 1) = handData(i, 1) + 11
                        handData(i, 2) = 1
                    Else
                        handData(i, 1) = handData(i, 1) + Decks(deckPosition, 0)
                    End If
                    runningCount = runningCount + CountValues(Decks(deckPosition, 0))
                    deckPosition = deckPosition + 1 
                    handCards(numHands, 1) = deckPosition
                    If Decks(deckPosition, 0) = 1 And handData(numHands, 1) + 11 <= 21 Then 
                        handData(numHands, 1) = handData(numHands, 1) + 11
                        handData(numHands, 2) = 1
                    Else
                        handData(numHands, 1) = handData(numHands, 1) + Decks(deckPosition, 0)
                    End If
                    runningCount = runningCount + CountValues(Decks(deckPosition, 0))
                    deckPosition = deckPosition + 1 
                    If CanResplitAces = False And Decks(handCards(1, 0), 0) = 1 Then
                        i = 999
                    End If
                Else
                    i = i + 1
                End If
            Loop 
            ' Player decisions
            For i = 1 To numHands
                strDecision = ""
                s = "" 
                If numHands > 1 And CanHitSplitAces = False And Decks(handCards(1, 0), 0) = 1 Then
                    strDecision = "S"
                End If 
                Do Until strDecision = "S"
                    If handData(i, 2) = 1 Then
                        strDecision = SoftStrategy(handData(i, 1), Decks(handCards(0, 1), 0))
                    Else
                        strDecision = HardStrategy(handData(i, 1), Decks(handCards(0, 1), 0))
                    End If 
                    ' Modify decision based on count indexes
                    If UseIndexes Then
                        For j = 0 To UBound(Indexes)
                            If runningCount >= Indexes(j, 0) Then
                                If handData(i, 1) = Indexes(j, 1) And Decks(handCards(0, 1), 0) = Indexes(j, 2) And handData(i, 2) <> 1 Then
                                    strDecision = Indexes(j, 3)
                                End If
                            End If
                        Next
                    End If 
                    s = s & strDecision & ", " 
                    Select Case strDecision
                        Case "S"
                        Case "RS"
                            strDecision = "S"
                        Case "H"
                            ' deal a card
                            handCards(i, handData(i, 3)) = deckPosition
                            If Decks(deckPosition, 0) = 1 And (handData(i, 1) + 11) <= 21 Then 
                                handData(i, 1) = handData(i, 1) + 11
                                handData(i, 2) = 1
                            ElseIf handData(i, 2) = 1 And (handData(i, 1) + Decks(deckPosition, 0)) > 21 Then
                                handData(i, 2) = 0
                                handData(i, 1) = handData(i, 1) - 10 + Decks(deckPosition, 0)
                            Else
                                handData(i, 1) = handData(i, 1) + Decks(deckPosition, 0)
                            End If
                            handData(i, 3) = handData(i, 3) + 1
                            runningCount = runningCount + CountValues(Decks(deckPosition, 0))
                            deckPosition = deckPosition + 1 
                            ' check for bust
                            If handData(i, 1) > 21 Then
                                strDecision = "S"
                            End If
                        Case "RH"
                            ' deal a card
                            handCards(i, handData(i, 3)) = deckPosition
                            If Decks(deckPosition, 0) = 1 And (handData(i, 1) + 11) <= 21 Then 
                                handData(i, 1) = handData(i, 1) + 11
                                handData(i, 2) = 1
                            ElseIf handData(i, 2) = 1 And (handData(i, 1) + Decks(deckPosition, 0)) > 21 Then
                                handData(i, 2) = 0
                                handData(i, 1) = handData(i, 1) - 10 + Decks(deckPosition, 0)
                            Else
                                handData(i, 1) = handData(i, 1) + Decks(deckPosition, 0)
                            End If
                            handData(i, 3) = handData(i, 3) + 1
                            runningCount = runningCount + CountValues(Decks(deckPosition, 0))
                            deckPosition = deckPosition + 1 
                            ' check for bust
                            If handData(i, 1) > 21 Then
                                strDecision = "S"
                            End If
                        Case "DH"
                            If handData(i, 3) = 2 And (numHands = 1 Or AllowDoubleAfterSplit = True) Then
                                handData(i, 0) = handData(i, 0) * 2
                                strDecision = "S"
                                s = s & "Doubled, "
                            End If 
                            ' deal a card
                            handCards(i, handData(i, 3)) = deckPosition
                            If Decks(deckPosition, 0) = 1 And (handData(i, 1) + 11) <= 21 Then 
                                handData(i, 1) = handData(i, 1) + 11
                                handData(i, 2) = 1
                            ElseIf handData(i, 2) = 1 And (handData(i, 1) + Decks(deckPosition, 0)) > 21 Then
                                handData(i, 2) = 0
                                handData(i, 1) = handData(i, 1) - 10 + Decks(deckPosition, 0)
                            Else
                                handData(i, 1) = handData(i, 1) + Decks(deckPosition, 0)
                            End If
                            handData(i, 3) = handData(i, 3) + 1
                            runningCount = runningCount + CountValues(Decks(deckPosition, 0))
                            deckPosition = deckPosition + 1 
                            'check for bust
                            If handData(i, 1) > 21 Then
                                strDecision = "S"
                            End If
                        Case "DS"
                            strDecision = "S" 
                            If handData(i, 3) = 2 And (numHands = 1 Or AllowDoubleAfterSplit = True) Then
                                handData(i, 0) = handData(i, 0) * 2
                                s = s & "Doubled, " 
                                ' deal a card
                                handCards(i, handData(i, 3)) = deckPosition
                                If Decks(deckPosition, 0) = 1 And (handData(i, 1) + 11) <= 21 Then 
                                    handData(i, 1) = handData(i, 1) + 11
                                    handData(i, 2) = 1
                                ElseIf handData(i, 2) = 1 And (handData(i, 1) + Decks(deckPosition, 0)) > 21 Then
                                    handData(i, 2) = 0
                                    handData(i, 1) = handData(i, 1) - 10 + Decks(deckPosition, 0)
                                Else
                                    handData(i, 1) = handData(i, 1) + Decks(deckPosition, 0)
                                End If
                                handData(i, 3) = handData(i, 3) + 1
                                runningCount = runningCount + CountValues(Decks(deckPosition, 0))
                                deckPosition = deckPosition + 1
                            End If
                        Case Else
                            WScript.Echo handData(i, 1) & vbcrlf & Decks(handCards(0, 1), 0) & vbcrlf & handData(i, 2) & vbcrlf & i & _
                            SoftStrategy(handData(i, 1), Decks(handCards(0, 1), 0)) & vbcrlf & HardStrategy(handData(i, 1), Decks(handCards(0, 1), 0)) & vbcrlf & _
                            Decks(handCards(i, 0), 0) & "," & Decks(handCards(i, 1), 0) & vbcrlf & handData(i, 3)
                    End Select
                Loop 
                If Auditing Then f.WriteLine "Hand " & i & " Decisions: " & s
            Next 
            ' dealer decisions
            strDecision = ""
            Do Until strDecision = "S"
                If handData(0, 1) < 17 Or (handData(0, 1) = 17 And handData(0, 2) = 1 And DealerHitSoft17 = True) Then
                    ' deal a card
                    handCards(0, handData(0, 3)) = deckPosition
                    If Decks(deckPosition, 0) = 1 And (handData(0, 1) + 11) <= 21 Then 
                        handData(0, 1) = handData(0, 1) + 11
                        handData(0, 2) = 1
                    ElseIf handData(0, 2) = 1 And (handData(0, 1) + Decks(deckPosition, 0)) > 21 Then
                        handData(0, 2) = 0
                        handData(0, 1) = handData(0, 1) - 10 + Decks(deckPosition, 0)
                    Else
                        handData(0, 1) = handData(0, 1) + Decks(deckPosition, 0)
                    End If
                    handData(0, 3) = handData(0, 3) + 1
                    runningCount = runningCount + CountValues(Decks(deckPosition, 0))
                    deckPosition = deckPosition + 1
                Else
                    strDecision = "S"
                End If
            Loop 
            ' hand outcomes
            For i = 1 To NumHands
                If Auditing Then 
                    f.WriteLine "Hand " & i & " Bet = "  & handData(i, 0) & ", Value = " & handData(i, 1) & ", Soft Hand = " & handData(i, 2) & ", Number of Cards = " & handData(i, 3)
                    s = ""
                    For x = 0 To handData(i, 3) - 1
                        s = s & Decks(handCards(i, x), 0) & Decks(handCards(i, x), 1) & ", "
                    Next
                    f.WriteLine "Hand " & i & " Final Cards: " & s
                End If 
                wagers = wagers + handData(i, 0)
                If handData(i, 1) > 21 Then
                    ' player bust
                    bankRoll = bankRoll - handData(i, 0)
                    If Auditing Then f.WriteLine "Hand Outcome: Player Bust"
                ElseIf handData(0, 1) > 21 Then
                    ' dealer bust
                    bankRoll = bankRoll + handData(i, 0)
                    lastHandWon = True
                    If Auditing Then f.WriteLine "Hand Outcome: Dealer Bust"
                ElseIf handData(i, 1) < handData(0, 1) Then
                    ' dealer wins
                    bankRoll = bankRoll - handData(i, 0)
                    If Auditing Then f.WriteLine "Hand Outcome: Dealer Wins"
                ElseIf handData(i, 1) > handData(0, 1) Then
                    ' player wins
                    bankRoll = bankRoll + handData(i, 0)
                    lastHandWon = True
                    If Auditing Then f.WriteLine "Hand Outcome: Player Wins"
                ElseIf handData(i, 1) = handData(0, 1) Then
                    If Auditing Then f.WriteLine "Hand Outcome: Push"
                Else
                    WScript.Echo "Hand Outcome Error"
                End If
            Next
        End If 
        runningCount = runningCount + CountValues(Decks(handCards(0, 0), 0))
        numHandsPlayed = numHandsPlayed + numHands
        If bankRoll < lowBankRoll Then lowBankRoll = bankRoll
        If bankRoll > highBankRoll Then highBankRoll = bankRoll 
        If Auditing Then 
            f.WriteLine "Dealer's Value = " & handData(0, 1) & ", Soft Hand = " & handData(0, 2) & ", Number of Cards = " & handData(0, 3)
            s = ""
            For i = 0 To handData(0, 3) - 1
                s = s & Decks(handCards(0, i), 0) & Decks(handCards(0, i), 1) & ", "
            Next
            f.WriteLine "Dealer's Final Cards: " & s 
            f.WriteLine "Ending Count = " & runningCount & ", Bankroll = " & bankRoll
            f.WriteLine ""
        End If
    Loop
Next 
endTime = Now()
WScript.Echo _
    "Started: " & startTime & vbcrlf & _
    "Lowest Bank Roll: " & lowBankRoll & vbcrlf & _
    "Highest Bank Roll: " & highBankRoll & vbcrlf & _
    "Ending Bank Roll: " & bankRoll & vbcrlf & _
    "Total Hands Played: " & numHandsPlayed & vbcrlf & _
    "Total Wagers: " & wagers & vbcrlf & _
    "Average Wager: " & Round(wagers / numHandsPlayed, 2) & vbcrlf & _
    "Advantage: " & Round(bankRoll / wagers * 100, 4) & vbcrlf & _
    "Ended: " & endTime & vbcrlf & _
    "Elapsed Time in Minutes: " & DateDiff("n", startTime, endTime)    
Sub InitializeDecks(numOfDecks)
    Dim i, j 
    Redim Decks(52 * numOfDecks - 1, 1) 
    For i = 1 To numOfDecks
        For j = 0 To 51
            Decks((i - 1) * 52 + j, 0) = StandardDeck(j, 0)
            Decks((i - 1) * 52 + j, 1) = StandardDeck(j, 1)
        Next
    Next
End Sub 
Sub ShuffleDecks()
    Dim i, j, value, suit, x 
    Randomize 
    ' Fisher Yates Shuffling Algorithm
    x = UBound(Decks) - 1
    For i = 0 To x
        j = Int(Rnd() * (x - i + 2)) + i
        value = Decks(j, 0)
        suit = Decks(j, 1)
        Decks(j, 0) = Decks(i, 0)
        Decks(j, 1) = Decks(i, 1)
        Decks(i, 0) = value
        Decks(i, 1) = suit
    Next
End Sub 
Sub Initialize()
    startTime = Now()
    bankRoll = 0
    wagers = 0
    lowBankRoll = 0
    highBankRoll = 0
    numHandsPlayed = 0 
    CountValues(2) = 1
    CountValues(3) = 1
    CountValues(4) = 1
    CountValues(5) = 1
    CountValues(6) = 1
    CountValues(7) = 1
    CountValues(8) = 0
    CountValues(9) = 0
    CountValues(10) = -1
    CountValues(1) = -1 
    BettingRamp(0, 0) = 1
    BettingRamp(0, 1) = 2
    BettingRamp(1, 0) = 2
    BettingRamp(1, 1) = 3
    BettingRamp(2, 0) = 3
    BettingRamp(2, 1) = 5
    BettingRamp(3, 0) = 4
    BettingRamp(3, 1) = 6 
    Indexes(0, 0) = 0
    Indexes(0, 1) = 16
    Indexes(0, 2) = 10
    Indexes(0, 3) = "S" 
    Indexes(1, 0) = 4
    Indexes(1, 1) = 15
    Indexes(1, 2) = 10
    Indexes(1, 3) = "S" 
    Indexes(2, 0) = 4
    Indexes(2, 1) = 12
    Indexes(2, 2) = 2
    Indexes(2, 3) = "S" 
    Indexes(3, 0) = 4
    Indexes(3, 1) = 12
    Indexes(3, 2) = 3
    Indexes(3, 3) = "S" 
    Indexes(4, 0) = 4
    Indexes(4, 1) = 9
    Indexes(4, 2) = 7
    Indexes(4, 3) = "DH" 
    Indexes(5, 0) = 4
    Indexes(5, 1) = 8
    Indexes(5, 2) = 6
    Indexes(5, 3) = "DH" 
    Indexes(6, 0) = 4
    Indexes(6, 1) = 8
    Indexes(6, 2) = 5
    Indexes(6, 3) = "DH" 
    Indexes(7, 0) = 4
    Indexes(7, 1) = 10
    Indexes(7, 2) = 10
    Indexes(7, 3) = "DH" 
    Indexes(8, 0) = 4
    Indexes(8, 1) = 10
    Indexes(8, 2) = 1
    Indexes(8, 3) = "DH" 
    StandardDeck(0, 0) = 1
    StandardDeck(0, 1) = "Ace of Diamonds"
    StandardDeck(1, 0) = 2
    StandardDeck(1, 1) = " of Diamonds"
    StandardDeck(2, 0) = 3
    StandardDeck(2, 1) = " of Diamonds"
    StandardDeck(3, 0) = 4
    StandardDeck(3, 1) = " of Diamonds"
    StandardDeck(4, 0) = 5
    StandardDeck(4, 1) = " of Diamonds"
    StandardDeck(5, 0) = 6
    StandardDeck(5, 1) = " of Diamonds"
    StandardDeck(6, 0) = 7
    StandardDeck(6, 1) = " of Diamonds"
    StandardDeck(7, 0) = 8
    StandardDeck(7, 1) = " of Diamonds"
    StandardDeck(8, 0) = 9
    StandardDeck(8, 1) = " of Diamonds"
    StandardDeck(9, 0) = 10
    StandardDeck(9, 1) = "Ten of Diamonds"
    StandardDeck(10, 0) = 10
    StandardDeck(10, 1) = "Jack of Diamonds"
    StandardDeck(11, 0) = 10
    StandardDeck(11, 1) = "Queen of Diamonds"
    StandardDeck(12, 0) = 10
    StandardDeck(12, 1) = "King of Diamonds"
    StandardDeck(13, 0) = 1
    StandardDeck(13, 1) = "Ace of Clubs"
    StandardDeck(14, 0) = 2
    StandardDeck(14, 1) = " of Clubs"
    StandardDeck(15, 0) = 3
    StandardDeck(15, 1) = " of Clubs"
    StandardDeck(16, 0) = 4
    StandardDeck(16, 1) = " of Clubs"
    StandardDeck(17, 0) = 5
    StandardDeck(17, 1) = " of Clubs"
    StandardDeck(18, 0) = 6
    StandardDeck(18, 1) = " of Clubs"
    StandardDeck(19, 0) = 7
    StandardDeck(19, 1) = " of Clubs"
    StandardDeck(20, 0) = 8
    StandardDeck(20, 1) = " of Clubs"
    StandardDeck(21, 0) = 9
    StandardDeck(21, 1) = " of Clubs"
    StandardDeck(22, 0) = 10
    StandardDeck(22, 1) = "Ten of Clubs"
    StandardDeck(23, 0) = 10
    StandardDeck(23, 1) = "Jack of Clubs"
    StandardDeck(24, 0) = 10
    StandardDeck(24, 1) = "Queen of Clubs"
    StandardDeck(25, 0) = 10
    StandardDeck(25, 1) = "King of Clubs"
    StandardDeck(26, 0) = 1
    StandardDeck(26, 1) = "Ace of Hearts"
    StandardDeck(27, 0) = 2
    StandardDeck(27, 1) = " of Hearts"
    StandardDeck(28, 0) = 3
    StandardDeck(28, 1) = " of Hearts"
    StandardDeck(29, 0) = 4
    StandardDeck(29, 1) = " of Hearts"
    StandardDeck(30, 0) = 5
    StandardDeck(30, 1) = " of Hearts"
    StandardDeck(31, 0) = 6
    StandardDeck(31, 1) = " of Hearts"
    StandardDeck(32, 0) = 7
    StandardDeck(32, 1) = " of Hearts"
    StandardDeck(33, 0) = 8
    StandardDeck(33, 1) = " of Hearts"
    StandardDeck(34, 0) = 9
    StandardDeck(34, 1) = " of Hearts"
    StandardDeck(35, 0) = 10
    StandardDeck(35, 1) = "Ten of Hearts"
    StandardDeck(36, 0) = 10
    StandardDeck(36, 1) = "Jack of Hearts"
    StandardDeck(37, 0) = 10
    StandardDeck(37, 1) = "Queen of Hearts"
    StandardDeck(38, 0) = 10
    StandardDeck(38, 1) = "King of Hearts"
    StandardDeck(39, 0) = 1
    StandardDeck(39, 1) = "Ace of Spades"
    StandardDeck(40, 0) = 2
    StandardDeck(40, 1) = " of Spades"
    StandardDeck(41, 0) = 3
    StandardDeck(41, 1) = " of Spades"
    StandardDeck(42, 0) = 4
    StandardDeck(42, 1) = " of Spades"
    StandardDeck(43, 0) = 5
    StandardDeck(43, 1) = " of Spades"
    StandardDeck(44, 0) = 6
    StandardDeck(44, 1) = " of Spades"
    StandardDeck(45, 0) = 7
    StandardDeck(45, 1) = " of Spades"
    StandardDeck(46, 0) = 8
    StandardDeck(46, 1) = " of Spades"
    StandardDeck(47, 0) = 9
    StandardDeck(47, 1) = " of Spades"
    StandardDeck(48, 0) = 10
    StandardDeck(48, 1) = "Ten of Spades"
    StandardDeck(49, 0) = 10
    StandardDeck(49, 1) = "Jack of Spades"
    StandardDeck(50, 0) = 10
    StandardDeck(50, 1) = "Queen of Spades"
    StandardDeck(51, 0) = 10
    StandardDeck(51, 1) = "King of Spades" 
    HardStrategy(2, 2) = "H"
    HardStrategy(2, 3) = "H"
    HardStrategy(2, 4) = "H"
    HardStrategy(2, 5) = "H"
    HardStrategy(2, 6) = "H"
    HardStrategy(2, 7) = "H"
    HardStrategy(2, 8) = "H"
    HardStrategy(2, 9) = "H"
    HardStrategy(2, 10) = "H"
    HardStrategy(2, 1) = "H" 
    HardStrategy(4, 2) = "H"
    HardStrategy(4, 3) = "H"
    HardStrategy(4, 4) = "H"
    HardStrategy(4, 5) = "H"
    HardStrategy(4, 6) = "H"
    HardStrategy(4, 7) = "H"
    HardStrategy(4, 8) = "H"
    HardStrategy(4, 9) = "H"
    HardStrategy(4, 10) = "H"
    HardStrategy(4, 1) = "H" 
    HardStrategy(5, 2) = "H"
    HardStrategy(5, 3) = "H"
    HardStrategy(5, 4) = "H"
    HardStrategy(5, 5) = "H"
    HardStrategy(5, 6) = "H"
    HardStrategy(5, 7) = "H"
    HardStrategy(5, 8) = "H"
    HardStrategy(5, 9) = "H"
    HardStrategy(5, 10) = "H"
    HardStrategy(5, 1) = "H" 
    HardStrategy(6, 2) = "H"
    HardStrategy(6, 3) = "H"
    HardStrategy(6, 4) = "H"
    HardStrategy(6, 5) = "H"
    HardStrategy(6, 6) = "H"
    HardStrategy(6, 7) = "H"
    HardStrategy(6, 8) = "H"
    HardStrategy(6, 9) = "H"
    HardStrategy(6, 10) = "H"
    HardStrategy(6, 1) = "H" 
    HardStrategy(7, 2) = "H"
    HardStrategy(7, 3) = "H"
    HardStrategy(7, 4) = "H"
    HardStrategy(7, 5) = "H"
    HardStrategy(7, 6) = "H"
    HardStrategy(7, 7) = "H"
    HardStrategy(7, 8) = "H"
    HardStrategy(7, 9) = "H"
    HardStrategy(7, 10) = "H"
    HardStrategy(7, 1) = "H" 
    HardStrategy(8, 2) = "H"
    HardStrategy(8, 3) = "H"
    HardStrategy(8, 4) = "H"
    HardStrategy(8, 5) = "H"
    HardStrategy(8, 6) = "H"
    HardStrategy(8, 7) = "H"
    HardStrategy(8, 8) = "H"
    HardStrategy(8, 9) = "H"
    HardStrategy(8, 10) = "H"
    HardStrategy(8, 1) = "H" 
    HardStrategy(9, 2) = "DH"
    HardStrategy(9, 3) = "DH"
    HardStrategy(9, 4) = "DH"
    HardStrategy(9, 5) = "DH"
    HardStrategy(9, 6) = "DH"
    HardStrategy(9, 7) = "H"
    HardStrategy(9, 8) = "H"
    HardStrategy(9, 9) = "H"
    HardStrategy(9, 10) = "H"
    HardStrategy(9, 1) = "H" 
    HardStrategy(10, 2) = "DH"
    HardStrategy(10, 3) = "DH"
    HardStrategy(10, 4) = "DH"
    HardStrategy(10, 5) = "DH"
    HardStrategy(10, 6) = "DH"
    HardStrategy(10, 7) = "DH"
    HardStrategy(10, 8) = "DH"
    HardStrategy(10, 9) = "DH"
    HardStrategy(10, 10) = "H"
    HardStrategy(10, 1) = "H" 
    HardStrategy(11, 2) = "DH"
    HardStrategy(11, 3) = "DH"
    HardStrategy(11, 4) = "DH"
    HardStrategy(11, 5) = "DH"
    HardStrategy(11, 6) = "DH"
    HardStrategy(11, 7) = "DH"
    HardStrategy(11, 8) = "DH"
    HardStrategy(11, 9) = "DH"
    HardStrategy(11, 10) = "DH"
    HardStrategy(11, 1) = "DH" 
    HardStrategy(12, 2) = "H"
    HardStrategy(12, 3) = "H"
    HardStrategy(12, 4) = "S"
    HardStrategy(12, 5) = "S"
    HardStrategy(12, 6) = "S"
    HardStrategy(12, 7) = "H"
    HardStrategy(12, 8) = "H"
    HardStrategy(12, 9) = "H"
    HardStrategy(12, 10) = "H"
    HardStrategy(12, 1) = "H" 
    HardStrategy(13, 2) = "S"
    HardStrategy(13, 3) = "S"
    HardStrategy(13, 4) = "S"
    HardStrategy(13, 5) = "S"
    HardStrategy(13, 6) = "S"
    HardStrategy(13, 7) = "H"
    HardStrategy(13, 8) = "H"
    HardStrategy(13, 9) = "H"
    HardStrategy(13, 10) = "H"
    HardStrategy(13, 1) = "H" 
    HardStrategy(14, 2) = "S"
    HardStrategy(14, 3) = "S"
    HardStrategy(14, 4) = "S"
    HardStrategy(14, 5) = "S"
    HardStrategy(14, 6) = "S"
    HardStrategy(14, 7) = "H"
    HardStrategy(14, 8) = "H"
    HardStrategy(14, 9) = "H"
    HardStrategy(14, 10) = "H"
    HardStrategy(14, 1) = "H" 
    HardStrategy(15, 2) = "S"
    HardStrategy(15, 3) = "S"
    HardStrategy(15, 4) = "S"
    HardStrategy(15, 5) = "S"
    HardStrategy(15, 6) = "S"
    HardStrategy(15, 7) = "H"
    HardStrategy(15, 8) = "H"
    HardStrategy(15, 9) = "H"
    HardStrategy(15, 10) = "RH"
    HardStrategy(15, 1) = "RH" 
    HardStrategy(16, 2) = "S"
    HardStrategy(16, 3) = "S"
    HardStrategy(16, 4) = "S"
    HardStrategy(16, 5) = "S"
    HardStrategy(16, 6) = "S"
    HardStrategy(16, 7) = "H"
    HardStrategy(16, 8) = "H"
    HardStrategy(16, 9) = "H"
    HardStrategy(16, 10) = "RH"
    HardStrategy(16, 1) = "RH" 
    HardStrategy(17, 2) = "S"
    HardStrategy(17, 3) = "S"
    HardStrategy(17, 4) = "S"
    HardStrategy(17, 5) = "S"
    HardStrategy(17, 6) = "S"
    HardStrategy(17, 7) = "S"
    HardStrategy(17, 8) = "S"
    HardStrategy(17, 9) = "S"
    HardStrategy(17, 10) = "S"
    HardStrategy(17, 1) = "RS" 
    HardStrategy(18, 2) = "S"
    HardStrategy(18, 3) = "S"
    HardStrategy(18, 4) = "S"
    HardStrategy(18, 5) = "S"
    HardStrategy(18, 6) = "S"
    HardStrategy(18, 7) = "S"
    HardStrategy(18, 8) = "S"
    HardStrategy(18, 9) = "S"
    HardStrategy(18, 10) = "S"
    HardStrategy(18, 1) = "S" 
    HardStrategy(19, 2) = "S"
    HardStrategy(19, 3) = "S"
    HardStrategy(19, 4) = "S"
    HardStrategy(19, 5) = "S"
    HardStrategy(19, 6) = "S"
    HardStrategy(19, 7) = "S"
    HardStrategy(19, 8) = "S"
    HardStrategy(19, 9) = "S"
    HardStrategy(19, 10) = "S"
    HardStrategy(19, 1) = "S" 
    HardStrategy(20, 2) = "S"
    HardStrategy(20, 3) = "S"
    HardStrategy(20, 4) = "S"
    HardStrategy(20, 5) = "S"
    HardStrategy(20, 6) = "S"
    HardStrategy(20, 7) = "S"
    HardStrategy(20, 8) = "S"
    HardStrategy(20, 9) = "S"
    HardStrategy(20, 10) = "S"
    HardStrategy(20, 1) = "S" 
    HardStrategy(21, 2) = "S"
    HardStrategy(21, 3) = "S"
    HardStrategy(21, 4) = "S"
    HardStrategy(21, 5) = "S"
    HardStrategy(21, 6) = "S"
    HardStrategy(21, 7) = "S"
    HardStrategy(21, 8) = "S"
    HardStrategy(21, 9) = "S"
    HardStrategy(21, 10) = "S"
    HardStrategy(21, 1) = "S" 
    SoftStrategy(12, 2) = "H"
    SoftStrategy(12, 3) = "H"
    SoftStrategy(12, 4) = "H"
    SoftStrategy(12, 5) = "H"
    SoftStrategy(12, 6) = "H"
    SoftStrategy(12, 7) = "H"
    SoftStrategy(12, 8) = "H"
    SoftStrategy(12, 9) = "H"
    SoftStrategy(12, 10) = "H"
    SoftStrategy(12, 1) = "H" 
    SoftStrategy(13, 2) = "H"
    SoftStrategy(13, 3) = "H"
    SoftStrategy(13, 4) = "H"
    SoftStrategy(13, 5) = "DH"
    SoftStrategy(13, 6) = "DH"
    SoftStrategy(13, 7) = "H"
    SoftStrategy(13, 8) = "H"
    SoftStrategy(13, 9) = "H"
    SoftStrategy(13, 10) = "H"
    SoftStrategy(13, 1) = "H" 
    SoftStrategy(14, 2) = "H"
    SoftStrategy(14, 3) = "H"
    SoftStrategy(14, 4) = "DH"
    SoftStrategy(14, 5) = "DH"
    SoftStrategy(14, 6) = "DH"
    SoftStrategy(14, 7) = "H"
    SoftStrategy(14, 8) = "H"
    SoftStrategy(14, 9) = "H"
    SoftStrategy(14, 10) = "H"
    SoftStrategy(14, 1) = "H" 
    SoftStrategy(15, 2) = "H"
    SoftStrategy(15, 3) = "H"
    SoftStrategy(15, 4) = "DH"
    SoftStrategy(15, 5) = "DH"
    SoftStrategy(15, 6) = "DH"
    SoftStrategy(15, 7) = "H"
    SoftStrategy(15, 8) = "H"
    SoftStrategy(15, 9) = "H"
    SoftStrategy(15, 10) = "H"
    SoftStrategy(15, 1) = "H" 
    SoftStrategy(16, 2) = "H"
    SoftStrategy(16, 3) = "H"
    SoftStrategy(16, 4) = "DH"
    SoftStrategy(16, 5) = "DH"
    SoftStrategy(16, 6) = "DH"
    SoftStrategy(16, 7) = "H"
    SoftStrategy(16, 8) = "H"
    SoftStrategy(16, 9) = "H"
    SoftStrategy(16, 10) = "H"
    SoftStrategy(16, 1) = "H" 
    SoftStrategy(17, 2) = "H"
    SoftStrategy(17, 3) = "DH"
    SoftStrategy(17, 4) = "DH"
    SoftStrategy(17, 5) = "DH"
    SoftStrategy(17, 6) = "DH"
    SoftStrategy(17, 7) = "H"
    SoftStrategy(17, 8) = "H"
    SoftStrategy(17, 9) = "H"
    SoftStrategy(17, 10) = "H"
    SoftStrategy(17, 1) = "H" 
    SoftStrategy(18, 2) = "DS"
    SoftStrategy(18, 3) = "DS"
    SoftStrategy(18, 4) = "DS"
    SoftStrategy(18, 5) = "DS"
    SoftStrategy(18, 6) = "DS"
    SoftStrategy(18, 7) = "S"
    SoftStrategy(18, 8) = "S"
    SoftStrategy(18, 9) = "H"
    SoftStrategy(18, 10) = "H"
    SoftStrategy(18, 1) = "H" 
    SoftStrategy(19, 2) = "S"
    SoftStrategy(19, 3) = "S"
    SoftStrategy(19, 4) = "S"
    SoftStrategy(19, 5) = "S"
    SoftStrategy(19, 6) = "DS"
    SoftStrategy(19, 7) = "S"
    SoftStrategy(19, 8) = "S"
    SoftStrategy(19, 9) = "S"
    SoftStrategy(19, 10) = "S"
    SoftStrategy(19, 1) = "S" 
    SoftStrategy(20, 2) = "S"
    SoftStrategy(20, 3) = "S"
    SoftStrategy(20, 4) = "S"
    SoftStrategy(20, 5) = "S"
    SoftStrategy(20, 6) = "S"
    SoftStrategy(20, 7) = "S"
    SoftStrategy(20, 8) = "S"
    SoftStrategy(20, 9) = "S"
    SoftStrategy(20, 10) = "S"
    SoftStrategy(20, 1) = "S" 
    SoftStrategy(21, 2) = "S"
    SoftStrategy(21, 3) = "S"
    SoftStrategy(21, 4) = "S"
    SoftStrategy(21, 5) = "S"
    SoftStrategy(21, 6) = "S"
    SoftStrategy(21, 7) = "S"
    SoftStrategy(21, 8) = "S"
    SoftStrategy(21, 9) = "S"
    SoftStrategy(21, 10) = "S"
    SoftStrategy(21, 1) = "S" 
    SplitStrategy(2, 2) = "H"
    SplitStrategy(2, 3) = "H"
    SplitStrategy(2, 4) = "P"
    SplitStrategy(2, 5) = "P"
    SplitStrategy(2, 6) = "P"
    SplitStrategy(2, 7) = "P"
    SplitStrategy(2, 8) = "H"
    SplitStrategy(2, 9) = "H"
    SplitStrategy(2, 10) = "H"
    SplitStrategy(2, 1) = "H" 
    SplitStrategy(3, 2) = "H"
    SplitStrategy(3, 3) = "H"
    SplitStrategy(3, 4) = "P"
    SplitStrategy(3, 5) = "P"
    SplitStrategy(3, 6) = "P"
    SplitStrategy(3, 7) = "P"
    SplitStrategy(3, 8) = "H"
    SplitStrategy(3, 9) = "H"
    SplitStrategy(3, 10) = "H"
    SplitStrategy(3, 1) = "H" 
    SplitStrategy(4, 2) = "H"
    SplitStrategy(4, 3) = "H"
    SplitStrategy(4, 4) = "H"
    SplitStrategy(4, 5) = "H"
    SplitStrategy(4, 6) = "H"
    SplitStrategy(4, 7) = "H"
    SplitStrategy(4, 8) = "H"
    SplitStrategy(4, 9) = "H"
    SplitStrategy(4, 10) = "H"
    SplitStrategy(4, 1) = "H" 
    SplitStrategy(5, 2) = "DH"
    SplitStrategy(5, 3) = "DH"
    SplitStrategy(5, 4) = "DH"
    SplitStrategy(5, 5) = "DH"
    SplitStrategy(5, 6) = "DH"
    SplitStrategy(5, 7) = "DH"
    SplitStrategy(5, 8) = "DH"
    SplitStrategy(5, 9) = "DH"
    SplitStrategy(5, 10) = "H"
    SplitStrategy(5, 1) = "H" 
    SplitStrategy(6, 2) = "P"
    SplitStrategy(6, 3) = "P"
    SplitStrategy(6, 4) = "P"
    SplitStrategy(6, 5) = "P"
    SplitStrategy(6, 6) = "P"
    SplitStrategy(6, 7) = "H"
    SplitStrategy(6, 8) = "H"
    SplitStrategy(6, 9) = "H"
    SplitStrategy(6, 10) = "H"
    SplitStrategy(6, 1) = "H" 
    SplitStrategy(7, 2) = "P"
    SplitStrategy(7, 3) = "P"
    SplitStrategy(7, 4) = "P"
    SplitStrategy(7, 5) = "P"
    SplitStrategy(7, 6) = "P"
    SplitStrategy(7, 7) = "P"
    SplitStrategy(7, 8) = "H"
    SplitStrategy(7, 9) = "H"
    SplitStrategy(7, 10) = "H"
    SplitStrategy(7, 1) = "H" 
    SplitStrategy(8, 2) = "P"
    SplitStrategy(8, 3) = "P"
    SplitStrategy(8, 4) = "P"
    SplitStrategy(8, 5) = "P"
    SplitStrategy(8, 6) = "P"
    SplitStrategy(8, 7) = "P"
    SplitStrategy(8, 8) = "P"
    SplitStrategy(8, 9) = "P"
    SplitStrategy(8, 10) = "P"
    SplitStrategy(8, 1) = "RP" 
    SplitStrategy(9, 2) = "P"
    SplitStrategy(9, 3) = "P"
    SplitStrategy(9, 4) = "P"
    SplitStrategy(9, 5) = "P"
    SplitStrategy(9, 6) = "P"
    SplitStrategy(9, 7) = "S"
    SplitStrategy(9, 8) = "P"
    SplitStrategy(9, 9) = "P"
    SplitStrategy(9, 10) = "S"
    SplitStrategy(9, 1) = "S" 
    SplitStrategy(10, 2) = "S"
    SplitStrategy(10, 3) = "S"
    SplitStrategy(10, 4) = "S"
    SplitStrategy(10, 5) = "S"
    SplitStrategy(10, 6) = "S"
    SplitStrategy(10, 7) = "S"
    SplitStrategy(10, 8) = "S"
    SplitStrategy(10, 9) = "S"
    SplitStrategy(10, 10) = "S"
    SplitStrategy(10, 1) = "S" 
    SplitStrategy(1, 2) = "P"
    SplitStrategy(1, 3) = "P"
    SplitStrategy(1, 4) = "P"
    SplitStrategy(1, 5) = "P"
    SplitStrategy(1, 6) = "P"
    SplitStrategy(1, 7) = "P"
    SplitStrategy(1, 8) = "P"
    SplitStrategy(1, 9) = "P"
    SplitStrategy(1, 10) = "P"
    SplitStrategy(1, 1) = "P"
End Sub

From: https://bytes.com/topic/access/insights/959297-fun-blackjack-simulator

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/cxygs5788/article/details/107256165

智能推荐

STM32F4 IAP BOOTLOADER YMODEM_stm32f4 iap ymodem-程序员宅基地

文章浏览阅读3.6k次。STM32F4 IAP BOOTLOADER YMODEM XModem、YModem、ZModem_stm32f4 iap ymodem

信息熵_波段信息熵一般多大-程序员宅基地

文章浏览阅读4.2k次,点赞3次,收藏36次。1.简介熵的概念最早起源于物理学,用于度量一个热力学系统的无序程度。在信息论里面,熵是对不确定性的测量。熵越高,信息的不确定性越大,预测的难度越大,则能传输越多的信息;熵越低,信息的不确定性越小,即信息很容易预测到,则意味着传输的信息越少。如:文件压缩,压缩掉冗余内容如果压缩是无损的,即通过解压缩可以百分之百地恢复初始的消息内容,那么压缩后的消息携带的信息和未压缩的原始消息是一样的多。而压缩后的消息可以通过较少的比特传递,因此压缩消息的每个比特能携带更多的信息,也就是说压缩信息的熵更_波段信息熵一般多大

html语言中hr是什么意思,网页制作中的hr是什么意思-程序员宅基地

文章浏览阅读5k次,点赞3次,收藏15次。网页制作中的hr是一个标签,该标签用来在html页面中创建一条水平线,这条水平线可以在视觉上将文档分割成两个部分,使用方法如【】。HR,是网页程序的标签语言, 标签在 HTML 页面中创建一条水平线。 标签在 HTML 页面中创建一条水平线水平分隔线(horizontal rule)可以在视觉上将文档分隔成两个部分。是网页编辑里的一个标签,其表现形式为一条横线。r width="90%" size..._html hr

【MySQL优化查询】MySQL单表过亿条数据,如何优化查询速度?_如果一张表是上亿级如何优化算法-程序员宅基地

文章浏览阅读2.7k次,点赞6次,收藏14次。上面主要从:垂直和水平,两个方向介绍了我们的系统为什么要分库分表。说实话垂直方向(即业务方向)更简单。在水平方向(即数据方向)上,分库和分表的作用,其实是有区别的,不能混为一谈。分库:是为了解决数据库连接资源不足问题,和磁盘IO的性能瓶颈问题。分表:是为了解决单表数据量太大,sql语句查询数据时,即使走了索引也非常耗时问题。此外还可以解决消耗cpu资源问题。分库分表:可以解决 数据库连接资源不足、磁盘IO的性能瓶颈、检索数据耗时 和 消耗cpu资源等问题。_如果一张表是上亿级如何优化算法

recyclerview实现瀑布流item位置错乱问题_安卓开发瀑布流错乱-程序员宅基地

文章浏览阅读637次,点赞12次,收藏8次。在做项目时使用瀑布流时,我们通常会想到使用recyclerview的StaggeredGridLayoutManager来实现瀑布流,并且把item布局的高度设为wrap_content,觉得这样就可以实现瀑布流了。但是等写完代码一看发现item的位置显示错乱了,这是因为我们高度使用了wrap_content,但是如果我们使用固定高度就无法实现瀑布流了,这个时候就需要我们在adapter里动态设置高度就可以解决这个问题。你也可以根据项目实际情况设置不同item的高度。_安卓开发瀑布流错乱

1. SimMechanics/Multibody入门-程序员宅基地

文章浏览阅读9.8k次,点赞43次,收藏167次。这篇博客主要介绍利用Matlab的SimMechanics/Multibody实现简单的单摆运动仿真。_simmechanics

随便推点

WPF DataGrid 单元格实现下拉框选项_wpf datagrid 双击编辑时变下拉列表-程序员宅基地

文章浏览阅读3.1k次,点赞11次,收藏2次。WPF DataGrid 单元格实现下拉框选项提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档文章目录WPF DataGrid 单元格实现下拉框选项前言一、问题二、示例1.实现效果2.描述三、解决方法四、总结前言需要实现DataGrid控件单元格下拉框选项,DataGrid数据来源是数据库中的表第一次写博客,尝试一下一、问题网上有很多关于DataGridComboBoxColumn以及DataGridTemplateColumn模板列的教程,需要在前台XAML中进行添加,这_wpf datagrid 双击编辑时变下拉列表

2023年互联网黑灰产研究年度报告-程序员宅基地

文章浏览阅读54次。下载报告去公众号:硬核刘大后台回复“黑灰产”,即可下载完整PDF文件。更多报告内容,可加微信:chanpin628领取。(ps:加过微信:chanpin628 的不要再加,分享的内容一样,有一个号就行。)申明:报告版权威胁猎人所有,此处仅限分享学习使用,如有侵权,请联系小编做删除处理。..._【威胁猎人】2023年互联网黑灰产研究年度报告.pdf

[C/C++]游戏地图制作_c++ 如何做地图-程序员宅基地

文章浏览阅读705次。利用二维数组实现游戏地图_c++ 如何做地图

Ubuntu 12.04.4 LTS 部署cap-程序员宅基地

文章浏览阅读715次。一.系统环境jim@mode:~$ cat /etc/issueUbuntu 12.04.4 LTS \n \ljim@mode:~$ uname -raLinux mode 3.11.0-15-generic#25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux二..._after this operation, 2,048 b of additional disk space will be used.

我见过最全的剖析QEMU原理的文章[Z]_no qemu-程序员宅基地

文章浏览阅读1.2w次。转自:http://people.cs.nctu.edu.tw/~chenwj/dokuwiki/doku.php?id=qemu How To Become A Hacker 写给新手程序员的一封信目录建置 QEMUUser ModeSPARCPowerP_no qemu

Dart —— 基础数据类型 Number String Boolean List Map Set Rune Symbol_dart number-程序员宅基地

文章浏览阅读714次。内建类型文章目录Dart 语言支持以下内建类型:NumberStringBooleanListSetMapRuneSymbolDart 语言支持以下内建类型:NumberStringBooleanList (也被称为 Array)MapSetRune (用于在字符串中表示 Unicode 字符)Symbol这些类型都可以被初始化为字面量。 例如, 'this is a s..._dart number

推荐文章

热门文章

相关标签