大兔的神密世界
  • search
  • apps
  • Jun 07, 2021
    ·
    1 min read
    程式
    確診數直條圖程式 for BBS
    5月11日起逐日確診人數 [本土] (公布+校正回歸)
                          473例                                                    
          ▅ ▄   ▁▂▁▅▄ 415例       476例                      
          █▅█▇▃█████▁▂  █▁                            
          ████████████▇▁██▁▁                         
         ▄██████████████████                         
      185例▂███████████████████▆                       
        ████████████████████                       
     ▁▁▃████████████████████                       
    111213141516171819202122232425262728293031 1 2 3 4 5 6 7


    Source Code:
    <%
    '20210606 By Rica TuoHuan Chen
    '20210522 473, 20210529 415, 20210605 476
    '20210607 +221 例本土

    strNumber = 221
    'strNumber =
    "7,16,13,30,185,284,535,456,527,474,432,473,490,502,499,532,529,415,415,425,394,332,488,415,339,476,335"
    strBlock = " ,▁,▂,▃,▄,▅,▆,▇,█"
    NumberArr = Split(strNumber, ",")
    BlockArr = Split(strBlock, ",")
    'Response.Write NumberArr(0)
    intNumberArr = UBound(NumberArr)
    Response.Write "<br>"
    'Response.Write intNumberArr

    Response.Write "<br>"
    For IntI = 0 to intNumberArr
       NumberArr(IntI) = Fix(NumberArr(IntI)/10)
       ' Response.Write NumberArr(IntI) & ","
    Next
    Response.Write "<br>"

    For IntJ = 6 to 0 Step -1
       For IntI = 0 to intNumberArr
          If NumberArr(IntI) - 8*IntJ >= 8 then
             intBlockType = 8
           ElseIf NumberArr(IntI) - 8*IntJ <=0 then
             intBlockType = 0
           Else
             intBlockType = NumberArr(IntI) - 8*IntJ
          End If
         ' Response.Write intBlockType & ","
          Response.Write BlockArr(intBlockType)
       Next
    Response.Write "<br>"
    Next

    For IntK = 11 to 31
       Response.Write IntK
    Next
    For IntL = 1 to 6
       If Len(IntL) = 1 then
          Response.Write " " & IntL
       Else
          Response.Write IntL
       End If
    Next

    %>

    陣列
    https://dotblogs.com.tw/erichuang223/2011/11/24/59374

    陣列的長度
    https://bit.ly/34WS0Yk

    --
    ※ 發信站: 大兔的神密世界(BunnyBBS.tw), 來自: 219.85.234.183
    ※ 文章網址: https://www.bunnybbs.tw/article/M.1623078277.A.BF6