V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
lwch
V2EX  ›  分享创造

世界上最好的语言是 C++呢还是 PHP 呢? http://cxx.party

  •  
  •   lwch · 2015-05-09 17:43:26 +08:00 · 4450 次点击
    这是一个创建于 3274 天前的主题,其中的信息可能已经有所发展或是发生改变。
    作为一个C++程序猿,我也来山寨了一把。。。http://cxx.party

    网页托管在github pages,后端API在coding.net

    代码在https://github.com/lwch/cxx或https://coding.net/u/lwch/p/cxx/git
    39 条回复    2015-05-11 10:05:12 +08:00
    cvmax
        1
    cvmax  
       2015-05-09 18:40:17 +08:00
    PHP
    lhx2008
        2
    lhx2008  
       2015-05-09 19:54:54 +08:00
    无聊真想用按键精灵点一会。。一个IP可以点无数次
    lwch
        3
    lwch  
    OP
       2015-05-09 20:38:10 +08:00 via Android
    @lhx2008 每秒每个IP只能点一次哟
    jsthon
        5
    jsthon  
       2015-05-09 21:15:50 +08:00 via Android
    @lwch 既然每秒每个IP只能点一次哟,那按键精灵两秒一次不就好了~(≧▽≦)
    lwch
        6
    lwch  
    OP
       2015-05-09 21:22:25 +08:00
    @jsthon 其实我还可以限制每个IP每周只能点一次(+﹏+)这就是一个参数的事情
    Dk2014
        7
    Dk2014  
       2015-05-09 21:38:19 +08:00 via Android
    我点了好几下普通话才发现没有跳转= =
    lwch
        8
    lwch  
    OP
       2015-05-09 21:43:51 +08:00
    @Dk2014 全部是ajax的,右上角又加了个刷新按钮
    yangqi
        9
    yangqi  
       2015-05-09 21:54:28 +08:00
    chrome里面就可以刷啊,window.setInterval(function() {window.page.commit(id);},1000);
    yakczh
        10
    yakczh  
       2015-05-09 21:59:30 +08:00
    不同语言适合不同的领域
    c++的领域应该在密集计算
    msxcms
        11
    msxcms  
       2015-05-09 22:16:31 +08:00
    每个语言都有他的应用范围
    lwch
        12
    lwch  
    OP
       2015-05-09 22:17:57 +08:00
    闲着无聊搞的
    powergx
        13
    powergx  
       2015-05-09 22:20:59 +08:00
    清零了
    lwch
        14
    lwch  
    OP
       2015-05-09 22:46:37 +08:00
    @powergx 刚才在部署新的API,明天加个评论
    wind3110991
        15
    wind3110991  
       2015-05-09 22:50:21 +08:00
    = = 世界上最好的语言是c
    PS:此帖已终结
    leebo
        16
    leebo  
       2015-05-09 23:09:40 +08:00
    没有ruby!!!!!!!!
    lwch
        17
    lwch  
    OP
       2015-05-09 23:24:05 +08:00
    又加了一些并且调整了布局
    goodbest
        18
    goodbest  
       2015-05-09 23:30:38 +08:00
    莫非就是因为我的豆腐脑.party,才有现在这种?
    我觉得我起了个坏头...

    坐等vim.party emacs.party
    xmbaozi
        19
    xmbaozi  
       2015-05-09 23:35:29 +08:00 via Android
    撞头像了
    lwch
        20
    lwch  
    OP
       2015-05-09 23:46:43 +08:00
    @goodbest 嗯,前两天看到的豆腐脑,玩着玩着就坏了。。。
    lwch
        21
    lwch  
    OP
       2015-05-09 23:47:04 +08:00
    @xmbaozi 仔细看还真不一样
    lincanbin
        22
    lincanbin  
       2015-05-09 23:53:46 +08:00
    先刷了1000票PHP玩玩儿。
    fullpowers
        23
    fullpowers  
       2015-05-10 00:39:51 +08:00
    php
    powergx
        24
    powergx  
       2015-05-10 01:11:55 +08:00
    def kai_shua():
    for i in range(0, 40):
    threading.Thread(target=shua, args=(), name = 'shua'+str(i)).start()

    def shua():
    while True:
    params = dict(callback='jQuery213007849645290471419_1431190938320',id='php',_=1431190938322)
    r = requests.get('http://cxx.coding.io/api/commit.php', params=params)
    print(r.text)

    if __name__ == "__main__":
    kai_shua()
    powergx
        25
    powergx  
       2015-05-10 01:48:01 +08:00
    找了几百个代理,应该会好些
    def kai_shua():
    file = io.open(file='proxy').read()
    proxy_list = file.split('\n')

    for i in range(0, 100):
    proxy_lst = []
    for j in range(0, 5):
    index = i * 5 + j
    if index < len(proxy_list):
    proxy_lst.append(proxy_list[index])
    threading.Thread(target=shua, args=(proxy_lst, ), name = 'shua'+str(i)).start()


    def shua(proxy_l):
    while True:
    try:
    for proxy in proxy_l:
    p_values = proxy.split('\t')
    proxyDict = dict(http='http://%s:%s'% (p_values[1],p_values[2]))

    params = dict(callback='jQuery213007849645290471419_1431190938320',id='php',_=int(time.time()*1000))
    r = requests.get('http://cxx.coding.io/api/commit.php', params=params, proxies=proxyDict)
    print(r.text)
    except:
    pass
    powergx
        26
    powergx  
       2015-05-10 10:41:31 +08:00 via iPhone
    shell 已经超过php了
    msg7086
        27
    msg7086  
       2015-05-10 10:48:06 +08:00
    @powergx 用python来刷php实在是太……
    wusuopuBUPT
        28
    wusuopuBUPT  
       2015-05-10 12:31:15 +08:00
    用python来刷php实在太。。。
    powergx
        29
    powergx  
       2015-05-10 14:55:55 +08:00 via iPhone
    @msg7086
    @wusuopuBUPT 所以改刷shell了
    lwch
        30
    lwch  
    OP
       2015-05-10 15:38:46 +08:00
    你们这太狠了,挂了这么多代理在这刷。。
    powergx
        31
    powergx  
       2015-05-10 15:46:31 +08:00
    @lwch 对付机器人只有一个办法,神一般的验证码
    lwch
        32
    lwch  
    OP
       2015-05-10 16:12:50 +08:00
    @powergx 我现在已经限制了一个IP一小时只能投一次了,现在正在做按地区的统计报表
    powergx
        33
    powergx  
       2015-05-10 16:14:19 +08:00
    @lwch 哎没办法,我再去爬几千个代理服务器, 每次提交过后time.sleep(3605)
    mingyun
        34
    mingyun  
       2015-05-10 21:58:29 +08:00
    必须php
    lwch
        35
    lwch  
    OP
       2015-05-10 22:48:58 +08:00
    又加了统计报表和统计图大家可以去看下

    目前shell党领先。。。
    yangqi
        36
    yangqi  
       2015-05-11 00:21:04 +08:00
    @powergx php现在又超过shell了
    yangqi
        37
    yangqi  
       2015-05-11 00:30:37 +08:00
    $url = 'http://cxx.coding.io/api/commit.php?id=php';
    while(1)
    {
    $random_ip = long2ip(rand(0, "4294967295"));

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-FORWARDED-FOR:{$random_ip}", "CLIENT-IP:{$random_ip}"));
    curl_setopt($ch, CURLOPT_REFERER, "http://cxx.party/");
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_exec($ch);
    curl_close($ch);
    }
    lwch
        38
    lwch  
    OP
       2015-05-11 09:26:28 +08:00
    @yangqi 你这随出来的为什么都是美国的IP地址
    yangqi
        39
    yangqi  
       2015-05-11 10:05:12 +08:00
    @lwch 查了下美国ip数量在全球最多,占了35%

    http://en.wikipedia.org/wiki/List_of_countries_by_IPv4_address_allocation
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3049 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 15:06 · PVG 23:06 · LAX 08:06 · JFK 11:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.