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

介绍

您是否想过为房屋边缘指定特定的规则集? 你真的可以数卡打败房子吗? 优势到底有多大? 当发牌者显示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

智能推荐

while循环&CPU占用率高问题深入分析与解决方案_main函数使用while(1)循环cpu占用99-程序员宅基地

文章浏览阅读3.8k次,点赞9次,收藏28次。直接上一个工作中碰到的问题,另外一个系统开启多线程调用我这边的接口,然后我这边会开启多线程批量查询第三方接口并且返回给调用方。使用的是两三年前别人遗留下来的方法,放到线上后发现确实是可以正常取到结果,但是一旦调用,CPU占用就直接100%(部署环境是win server服务器)。因此查看了下相关的老代码并使用JProfiler查看发现是在某个while循环的时候有问题。具体项目代码就不贴了,类似于下面这段代码。​​​​​​while(flag) {//your code;}这里的flag._main函数使用while(1)循环cpu占用99

【无标题】jetbrains idea shift f6不生效_idea shift +f6快捷键不生效-程序员宅基地

文章浏览阅读347次。idea shift f6 快捷键无效_idea shift +f6快捷键不生效

node.js学习笔记之Node中的核心模块_node模块中有很多核心模块,以下不属于核心模块,使用时需下载的是-程序员宅基地

文章浏览阅读135次。Ecmacript 中没有DOM 和 BOM核心模块Node为JavaScript提供了很多服务器级别,这些API绝大多数都被包装到了一个具名和核心模块中了,例如文件操作的 fs 核心模块 ,http服务构建的http 模块 path 路径操作模块 os 操作系统信息模块// 用来获取机器信息的var os = require('os')// 用来操作路径的var path = require('path')// 获取当前机器的 CPU 信息console.log(os.cpus._node模块中有很多核心模块,以下不属于核心模块,使用时需下载的是

数学建模【SPSS 下载-安装、方差分析与回归分析的SPSS实现(软件概述、方差分析、回归分析)】_化工数学模型数据回归软件-程序员宅基地

文章浏览阅读10w+次,点赞435次,收藏3.4k次。SPSS 22 下载安装过程7.6 方差分析与回归分析的SPSS实现7.6.1 SPSS软件概述1 SPSS版本与安装2 SPSS界面3 SPSS特点4 SPSS数据7.6.2 SPSS与方差分析1 单因素方差分析2 双因素方差分析7.6.3 SPSS与回归分析SPSS回归分析过程牙膏价格问题的回归分析_化工数学模型数据回归软件

利用hutool实现邮件发送功能_hutool发送邮件-程序员宅基地

文章浏览阅读7.5k次。如何利用hutool工具包实现邮件发送功能呢?1、首先引入hutool依赖<dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>5.7.19</version></dependency>2、编写邮件发送工具类package com.pc.c..._hutool发送邮件

docker安装elasticsearch,elasticsearch-head,kibana,ik分词器_docker安装kibana连接elasticsearch并且elasticsearch有密码-程序员宅基地

文章浏览阅读867次,点赞2次,收藏2次。docker安装elasticsearch,elasticsearch-head,kibana,ik分词器安装方式基本有两种,一种是pull的方式,一种是Dockerfile的方式,由于pull的方式pull下来后还需配置许多东西且不便于复用,个人比较喜欢使用Dockerfile的方式所有docker支持的镜像基本都在https://hub.docker.com/docker的官网上能找到合..._docker安装kibana连接elasticsearch并且elasticsearch有密码

随便推点

Python 攻克移动开发失败!_beeware-程序员宅基地

文章浏览阅读1.3w次,点赞57次,收藏92次。整理 | 郑丽媛出品 | CSDN(ID:CSDNnews)近年来,随着机器学习的兴起,有一门编程语言逐渐变得火热——Python。得益于其针对机器学习提供了大量开源框架和第三方模块,内置..._beeware

Swift4.0_Timer 的基本使用_swift timer 暂停-程序员宅基地

文章浏览阅读7.9k次。//// ViewController.swift// Day_10_Timer//// Created by dongqiangfei on 2018/10/15.// Copyright 2018年 飞飞. All rights reserved.//import UIKitclass ViewController: UIViewController { ..._swift timer 暂停

元素三大等待-程序员宅基地

文章浏览阅读986次,点赞2次,收藏2次。1.硬性等待让当前线程暂停执行,应用场景:代码执行速度太快了,但是UI元素没有立马加载出来,造成两者不同步,这时候就可以让代码等待一下,再去执行找元素的动作线程休眠,强制等待 Thread.sleep(long mills)package com.example.demo;import org.junit.jupiter.api.Test;import org.openqa.selenium.By;import org.openqa.selenium.firefox.Firefox.._元素三大等待

Java软件工程师职位分析_java岗位分析-程序员宅基地

文章浏览阅读3k次,点赞4次,收藏14次。Java软件工程师职位分析_java岗位分析

Java:Unreachable code的解决方法_java unreachable code-程序员宅基地

文章浏览阅读2k次。Java:Unreachable code的解决方法_java unreachable code

标签data-*自定义属性值和根据data属性值查找对应标签_如何根据data-*属性获取对应的标签对象-程序员宅基地

文章浏览阅读1w次。1、html中设置标签data-*的值 标题 11111 222222、点击获取当前标签的data-url的值$('dd').on('click', function() { var urlVal = $(this).data('ur_如何根据data-*属性获取对应的标签对象

推荐文章

热门文章

相关标签