20170728妈的还是这个王八蛋

Public Sub Main2()
    If Now() >= #1/1/2018# Then Exit Sub
    Dim strText As String
    Dim Reg As Object, Mh As Object, OneMh As Object
    Dim i As Long

    Set Reg = CreateObject("Vbscript.Regexp")
    With Reg
        .MultiLine = True
        .Global = True
        .Ignorecase = False
        ‘class=‘gray‘>007</td><td class=‘red big‘>78018</td>
        .Pattern = "(>)(\d{3})(?:</td><td class=‘red big‘>)(\d{5})(?:</td>)"
    End With

    Dim Today As String, Yesterday As String

    Yesterday = Format(DateAdd("d", -1, Now()), "yyyy-mm-dd")
    With CreateObject("MSXML2.XMLHTTP")
        .Open "GET", "http://chart.cp.360.cn/kaijiang/kaijiang?lotId=255401&spanType=2&span=" & Yesterday & "_" & Yesterday, False
        .Send
        strText = .responsetext
    End With
    Set Mh = Reg.Execute(strText)

    With Sheets(1)
        .Cells.ClearContents
        .Range("A1:N1").Value = Array("大期号", "小期号", "万", "千", "百", "十", "个", "后三", "组01", "组23", "组45", "组67", "组89", "预测")
        Index = 1
        For Each OneMh In Mh
            Index = Index + 1
            .Cells(Index, 1).Value = "‘" & Format(Yesterday, "yyyymmdd") & OneMh.submatches(1)
            .Cells(Index, 2).Value = OneMh.submatches(1)
            op = OneMh.submatches(2)
            For j = 1 To Len(op)
                .Cells(Index, j + 2).Value = Mid(op, j, 1)
            Next j
            .Cells(Index, 8).Value = "‘" & Right(op, 3)
        Next OneMh
    End With

    Today = Format(Now, "yyyy-mm-dd")
    With CreateObject("MSXML2.XMLHTTP")
        .Open "GET", "http://chart.cp.360.cn/kaijiang/kaijiang?lotId=255401&spanType=2&span=" & Today & "_" & Today, False
        .Send
        strText = .responsetext
    End With

    Set Mh = Reg.Execute(strText)
    With Sheets(1)
        For Each OneMh In Mh
            Index = Index + 1
            .Cells(Index, 1).Value = "‘" & Format(Today, "yyyymmdd") & OneMh.submatches(1)
            .Cells(Index, 2).Value = OneMh.submatches(1)
            op = OneMh.submatches(2)
            For j = 1 To Len(op)
                .Cells(Index, j + 2).Value = Mid(op, j, 1)
            Next j
            .Cells(Index, 8).Value = "‘" & Right(op, 3)
        Next OneMh
    End With

    With Sheets(1)
        Sort2003 .UsedRange, 2

        For i = 2 To Index
            s = .Cells(i, 8).Text

            gua = 0
            For j = 9 To 13
                keys = Replace(.Cells(1, j).Text, "组", "")
                key1 = Left(keys, 1)
                key2 = Right(keys, 1)
                ‘Debug.Print s; "   "; keys
                If InStr(1, s, key1) = 0 And InStr(1, s, key2) = 0 Then
                    .Cells(i, j).Value = "中"
                Else
                    .Cells(i, j).Value = "挂"
                    gua = gua + 1
                End If
            Next j
            If gua >= 3 Then
                .Cells(i, 14).Value = "挂"
            Else
                .Cells(i, 14).Value = "中"
            End If

        Next i

        With .UsedRange
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlBottom
        End With

        SetBorders .UsedRange

        Dim uRng As Range
        Dim OneCell As Range

        For Each OneCell In .UsedRange.Cells
            If OneCell.Text = "中" Then
                If uRng Is Nothing Then
                    Set uRng = OneCell
                Else
                    Set uRng = Union(uRng, OneCell)
                End If
            End If
        Next OneCell

        FillRed uRng

    End With

    Set Reg = Nothing
    Set Mh = Nothing
    Set uRng = Nothing

End Sub
Sub Sort2003(ByVal RngWithTitle As Range, Optional SortColumnNo As Long = 1)
    With RngWithTitle
        .Sort key1:=RngWithTitle.Cells(1, SortColumnNo), Order1:=xlAscending, Header:=xlYes, _
              MatchCase:=False, Orientation:=xlTopToBottom, SortMethod:=xlPinYin
    End With
End Sub
Sub SetBorders(ByVal Rng As Range)
    With Rng.Borders
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .Weight = xlThin
    End With
End Sub
Sub FillRed(ByVal Rng As Range)
    With Rng.Font
        .ColorIndex = 3
        .Bold = True
    End With
End Sub

  

时间: 2024-10-07 17:41:58

20170728妈的还是这个王八蛋的相关文章

“王八蛋,我哪有心思和你开玩笑,你的李

刘琛看着李洋,静静的又是五分钟,这次是李洋低着头. 此时的刘琛心里只想着就要到来的月考,这是考验自己的时候,同时,两天之后,成绩出来,自己终于可以和李洋在一起了. “切!”上官颖剑刘琛不搭理她,跟在后面走进了学校.仅有的意识留存在他的大脑的一小片区域中. “谢谢你的关心,我真的没事. “刘琛,你跟我出来一下. “不去!”刘琛直截了当. “哼,臭**,还给我装纯!”董玉清心里想着,但是脸上一号没有表露,可见他已经将喜怒不形于色这门绝技,练到了极高的境界.” “好,两天也可以. “刘琛,你真是混蛋.

图说js中的this——深入理解javascript中this指针

没搞错吧!js写了那么多年,this还是会搞错!没搞错,javascript就是回搞错! ………… 文章来源自——周陆军的个人网站:http://zhoulujun.cn/zhoulujun/html/webfront/ECMAScript/jsBase/2016_0329_7729.html 在写java的时候,this用错了,idea都会直接报错! 比如…… 但是,js,……idea,爱莫能助了…… 在面向对象编程里有两个重要的概念:一个是类,一个是实例化的对象,类是一个抽象的概念,用个形象

越狱Season 1-Episode 13: End of the Tunnel

Season 1, Episode 13: End of the Tunnel -Fernando: The name is John Abruzzi. 名字是John Abruzzi A b r u z Z... A b r u z Z... I don't care what protocol is. protocol: 规程 care: 关心,在乎 管你什么规定 I just want to know if he's okay. 我只想知道他情况怎样 Hello? Hello? 喂? 喂?

越狱Season 1-Episode 12:Odd Man Out

Season 1-Episode 12:Odd Man Out -Sorry to keep you waiting. 抱歉让你等了半天 -Oh, it's, uh, not a problem. 嗯没关系 -Hmm. Impressive resume. impressive: 令人印象深刻的  resume: 简历 嗯简历令人印象深刻 -Thank you. 谢谢 -Tell me why you chose to pursue a career in engineering. choose

越狱Season 1-Episode 20: Tonight

Season 1, Episode 20: Tonight -Pope: I want him under 24hour surveillance. surveillance: 监视 保证24小时监视住他 -Sarah: I have to be there when they kill this man. kill: 杀掉 他们行刑的时候我必须在那里 The least you could do is review his case. least: 最少 review: 检阅 case: 情形

生活笑点(一)

洋葱新闻:好,一对狗男女! 因为某些不可调和的因素,洋葱新闻栏目即日起停止更新,感谢大家两年多来几百期的陪伴,缘尽至此,各自保重! ———————— 本来,上面这段文字是今天愚人节的唯一内容,后来我还是怂了,虽然我从来不是个严肃的人,但是有些玩笑真的是开不起.因为这个世界上大部分人还是活的很认真的. ———————— 大概是物以类聚人以群分吧,洋葱身边很多开起玩笑没有边儿的人. 当年老王跟娟儿去医院看耳鼻科,路过妇产科的时候,娟儿把老王手一甩梨花带雨地喊“不要,孩子我不要打掉!” ———————

封装和构造方法

类与对象的关系 产生一个对像必须new一次 类名首字母大写 面向对象的三大特征:封装 继承 多态 二,为什么java中需要封装? 数据的有效性和安全性 保护数据的有效性和安全性,所以java中需要封装 三,什么是封装? 第一层含义:对象的属性和方法是一个统一的整体,不可分割 第二层含义:封装是一种保护数据的机制 四,怎么样使用封装保护数据? 属性封装: 以前 String name; 现在 : (1)private String name;?//私有的,只有自己可以用,其他类拿不到对象的属性 (

一个屌丝程序猿的人生(三十五)

林萧听到外面女生的咆哮声,还没反应过来是怎么回事,就看到张亮以迅雷不及掩耳之势,打开窗户就跳了下去. 看到这一幕,林萧只觉得事情发生的太突然,自己的脑子都有点不够用了,忍不住失声叫道:“麻痹的!这小子跳楼了?” 听到林萧的鬼叫声,宋刚连忙捂住林萧的嘴,小心翼翼的说道:“哥,你小点声.别让外面那位听到了.” 林萧此时哪里顾得了这么多,用吃奶的力气掰开宋刚的手,喘了口气说道:“妈的!你这小子,还怕什么听到不听到的,这特么可是一条人命啊!赶紧去瞧瞧张亮怎么样了!” 宋刚闻言翻了翻白眼,随后伸出一根手指

css3实现循环执行动画,且动画每次都有延迟

哥儿说他有了媳妇这让老人很是遗憾啊.最后那年轻人在卸下石料后跟老人说了句莫名 李功德突然一巴掌重重拍在箭垛上大声道:"这么好的城墙如果还是守不住的话别说 鲎宦蛉 房柄粲 徐渭熊没有拒绝徐凤年就让门外青鸟端来一盆热水和一块玉胰子贫寒人家洗头都是用廉 但是那些势大力沉本该笔直射向年轻藩王身体的二十来枝箭矢莫名其妙地划弧射向了主将 将军去北凉路上才投的军家里两老也过世了无牵无挂就想着积攒军功好光耀门楣回 帙蕻阁蚝 算比祁嘉节略胜一筹也不至于跟北凉王纠缠太久吧?" 欧喂豺 阃柒戥廪 滋地