V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xiaobetty
V2EX  ›  推广

晒出你最蠢的一段代码,送 Cherry 鼠标垫

  •  
  •   xiaobetty · 2015-08-04 15:47:00 +08:00 · 26740 次点击
    这是一个创建于 3188 天前的主题,其中的信息可能已经有所发展或是发生改变。

    可能是 上周五的活动不够有趣,还有约300份鼠标垫没有送出去。。。
    办公室的cherry
    现在,只要你是北京的程序员,
    在评论处写下你最蠢的一段代码
    戳这里填写收件信息
    就可以领取100offer定制Cherry鼠标垫一枚!
    送完即止


    Cherry鼠标垫是100offer用户最爱的办公品之一,这次我们也漂洋过海与德国的Cherry官方达成合作,赠与大家。

    优秀的程序员是企业争抢的对象,很多用户通过100offer来「挑」工作:
    http://100offer.com/about

    2015年,100offer会努力给信任我们的广大程序员们提供更多的福利与更好更优质的职业机会,离你们的需求更近一步。

    第 1 条附言  ·  2015-08-10 17:59:30 +08:00
    感谢大家对100offer的支持!

    所有的确认邮件都已发出,第二批鼠标垫也在今天发出~

    北京的朋友如果到周三还没收到联系我(微信服务号:im100offer)

    外地的朋友估计周四、周五收到吧^^

    ***

    现在加入邀请计划,

    http://100offer.com/invite

    把100offer介绍给有跳槽需求的小伙伴,

    还有千元亚马逊卡哦~
    426 条回复    2015-08-14 16:46:08 +08:00
    1  2  3  4  5  
    MrMario
        201
    MrMario  
       2015-08-05 01:05:35 +08:00
    try:
    TCPClient.connect(addr)
    except:
    print "TCP Connect Error..."
    MaiCong
        202
    MaiCong  
       2015-08-05 02:35:54 +08:00 via iPad
    echo <<< XXX;
    <div>{$a}</div>
    XXX;
    tustar
        203
    tustar  
       2015-08-05 07:18:29 +08:00
    a = a ? b : (c ? d : (e ? f : g) ) 多重?:三目运算
    caixiexin
        204
    caixiexin  
       2015-08-05 08:15:58 +08:00
    //输出高度为8的直角三角形 233333
    public static void main(String[] args) {
    System.out.println("*");
    System.out.println("**");
    System.out.println("***");
    System.out.println("****");
    System.out.println("*****");
    System.out.println("******");
    System.out.println("*******");
    System.out.println("********");
    }
    xia0ta0
        205
    xia0ta0  
       2015-08-05 08:18:18 +08:00
    <?php
    if($a > 100)
    {
    $b = true;
    }
    else if($a > 10)
    {
    $b = false;
    }

    echo $b;
    just4test
        206
    just4test  
       2015-08-05 08:30:57 +08:00
    特地注册账号来回复
    记得还用vb6的时候,程序可以由vb6解释运行。
    然后写了个死循环,没保存。一运行就再也停不下来了,杀掉vb6,代码也没了。
    后来又从百度知道上抄了个删除自身的代码,一运行vb6没了。
    卧槽答主也不备注一下
    Panic
        207
    Panic  
       2015-08-05 08:44:11 +08:00
    能在标题加个北京吗, 那我就不点进来了
    taoche
        208
    taoche  
       2015-08-05 08:56:13 +08:00   ❤️ 1
    a>b?true:false
    gkiwi
        209
    gkiwi  
       2015-08-05 09:00:37 +08:00
    if(a>0){
    alert("确定");
    }else{
    alert("确定");
    }
    yichenluan
        210
    yichenluan  
       2015-08-05 09:03:03 +08:00   ❤️ 1
    print "\n上网不涉密,涉密不上网"
    tshwangq
        211
    tshwangq  
       2015-08-05 09:07:08 +08:00
    var sb = new StringBuilder();
    sb.append("二货");
    sb.append("傻蛋");
    sb.append("滚犊子");

    var dumbass = sb.toString();
    realpg
        212
    realpg  
       2015-08-05 09:11:05 +08:00
    @caixiexin

    这段代码让我想起了我C语言的期末考试上机
    具体代码我就不贴了,我只说我的实现过程,作为一个程序员,大家应该能理解,


    C语言期末上机考试共计八道题,两道编程,六道根据代码评估输出(可以结合你的电脑计算方法不限),时间是两节课共计100分钟(含10分钟休息被征用)交卷就可以随时走人

    对于我这种小学2年级学习机BASIC起步的码农,这不就是分分钟的事儿么……哪能这么没有挑战性

    先以100分的标准做完了全部题,大约用了5分钟(基本前6道题都不用上机算用眼睛算的省时间)

    然后发现考试的倒数第二题是要求打印乘法表,给定输入是一个int,输出1*1到这个int的所有乘法表

    就是个简单循环输出的问题

    这哪是我这种人的实现方法,果断用机器上有的JAVA环境写了一个小程序,生成C语言代码,就是循环输出一个
    switch (i)
    case 0 printf("1*1=1\n");
    case 1 printf("1*1=1\n1*2=2 2*2=4\n");

    就是这么个玩意,我在java端用的直接0到int32max的循环
    然后测试了一下,生成的c代码无误可执行,就用这个巨大无比的answer7.c交卷了……

    不知道c语言老师评卷是何感想……反正最后是给我100分了……你的所有测试用例都正确,而且你没限制我必须用循环做吧……
    liangchao
        213
    liangchao  
       2015-08-05 09:12:47 +08:00
    <? php
    当年第一次写php, 中间空格调了好久
    yhxx
        214
    yhxx  
       2015-08-05 09:14:00 +08:00   ❤️ 1
    var target = target.parentNode;
    var newValue = target.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.childNodes[1].value;
    var newId = target.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.childNodes[0].data.replace(/[^0-9]/ig,"");

    为了取一个节点
    被嘲讽了一周
    lakewalker
        215
    lakewalker  
       2015-08-05 09:14:14 +08:00
    大一时刚学c语言,刚上完课,睡得迷迷糊糊,连循环是啥都没搞明白,老师就是当场完成99乘法表,否则不许下课,情急之下,只能写
    #include "stdio.h"

    int main() {
    printf("1*1=1");
    printf("1*2=2 2*2=4");
    printf("1*3=3 2*3=6 3*3=9");
    ...
    return 0;
    }

    写完才发现只有北京的程序猿才能拿...上海的飘过
    zyh94946
        216
    zyh94946  
       2015-08-05 09:27:31 +08:00
    取a标签中title套了好几层函数 如<a href='xxx'>title</a>
    $title = substr($val, strrpos($val, "'>")+2, strpos(substr($val, strrpos($val, "'>")), '</a>')-2);
    xiaochong
        217
    xiaochong  
       2015-08-05 09:30:10 +08:00
    a == b ? a : b
    cx90075
        218
    cx90075  
       2015-08-05 09:34:38 +08:00
    Map map = new HashMap();
    if (map != null){
    ...
    }
    odirus
        219
    odirus  
       2015-08-05 09:35:45 +08:00
    mian() {}
    deadEgg
        220
    deadEgg  
       2015-08-05 09:36:07 +08:00
    1、
    boolean f;
    if(f == true){};

    2、
    system.gc();

    3、
    public static void mian(String[] args){
    }

    4、py :
    str = "{xx}" + 1 +"/";
    wzp09tjlg
        221
    wzp09tjlg  
       2015-08-05 09:42:28 +08:00
    <intent-filter>
    <action android:name="android.intent.action.ACTION_MEDIA_MOUNTED" />
    <data android:scheme="file" >
    </data>
    </intent-filter>
    加了个筛选,硬是干掉了我两个小时去找广播的各种问题,最后发现是自己手残。
    caixiexin
        222
    caixiexin  
       2015-08-05 09:47:33 +08:00
    @realpg 哈哈,其实那段不是我写的,不过确实是学校里刚学编程的同学会干出来的23333
    anthozoan77
        223
    anthozoan77  
       2015-08-05 09:50:37 +08:00   ❤️ 1
    alert("xxx") 输出中间信息...
    不知道console.log()...
    zikkeung
        224
    zikkeung  
       2015-08-05 09:55:18 +08:00
    * { zoom:1;}
    ChenYounG
        225
    ChenYounG  
       2015-08-05 09:55:36 +08:00
    a="2"
    b="3333"
    print a+b
    23333
    Unknwon
        226
    Unknwon  
       2015-08-05 09:57:54 +08:00
    if a == true {
    return true
    } else {
    return false
    }
    rogeecn
        227
    rogeecn  
       2015-08-05 09:59:43 +08:00
    呵呵,你们都写的高大上。看我的:

    begin:
    ....
    bool a = callFunc();
    if (a == true) return true;
    if (a == false) return false;
    end.
    rogeecn
        228
    rogeecn  
       2015-08-05 10:00:17 +08:00
    @Unknwon 跟我写的一样了……
    mhycy
        229
    mhycy  
       2015-08-05 10:03:02 +08:00
    find /harddisk/disk_b/www/host/ -type f -name "*.php" | xargs perl -pi -e 's|<(a.*?href='http://10\.76\.6\.18'.*?)>(.*?)</a>|<!--\1-->\2<!--/a-->|g'

    * IP做了打码处理
    * 这段代码目的用于替换文件夹内部的HTML代码,把某个超链接注释掉
    * 这段代码运行后一般存在超链接的文件都给清空或截断了
    * 这段代码犯的错误极其愚蠢,相信犯同一个错误的人不止我一个
    sunchuo
        230
    sunchuo  
       2015-08-05 10:09:56 +08:00
    $db = DB::Query('a sql');


    if(is_int($id))
    {
    $db->where('id', '=', $id);
    }

    代码类似于上面这样。

    一个工具类,是查找某个用户配置的SQL语句。如果传入ID,就查询某个用户的。如果不传入就返回第一条。判断id类型的时候用了is_int,但是这个id有的时候是从redis读出来的。

    redis读出来都是string啊!!!所以,如果是从redis读出的id,那数据就查询错了。


    这个bug找了两周。
    jadetang
        231
    jadetang  
       2015-08-05 10:10:25 +08:00
    为什么只有北京的程序员才给
    MadbookPro
        232
    MadbookPro  
       2015-08-05 10:10:32 +08:00
    # javascript
    function sleep(seconds){
    var e = new Date().getTime() + (seconds * 1000);
    while (new Date().getTime() <= e) {
    ;
    }
    }
    mantgh
        233
    mantgh  
       2015-08-05 10:12:35 +08:00
    @yhxx 好蛋疼
    leassy
        234
    leassy  
       2015-08-05 10:13:34 +08:00
    string strA="10";
    string strB="20";
    string strC=strA+strB;
    🐶
    hadoopie
        235
    hadoopie  
       2015-08-05 10:13:39 +08:00
    switch(firstChar) {
    case ‘N’:
    nextFirstChar = ‘O’;
    break;
    case ‘O’:
    nextFirstChar = ‘P’;
    break;
    case ‘P’:
    nextFirstChar = ‘Q’;
    break;
    case ‘Q’:
    nextFirstChar = ‘R’;
    break;
    case ‘R’:
    nextFirstChar = ‘S’;
    break;
    case ‘S’:
    nextFirstChar = ‘T’;
    break;
    case ‘T’:
    throw new IllegalArgument();
    default:
    }
    linsiqing2008
        236
    linsiqing2008  
       2015-08-05 10:15:11 +08:00
    - rm -rf /usr /lib/nvidia-current/xorg/xorg
    comesx4
        237
    comesx4  
       2015-08-05 10:17:10 +08:00
    try
    {
    ...
    }
    catch()
    {
    throw;
    }
    moe3000
        238
    moe3000  
       2015-08-05 10:22:04 +08:00
    try {
    throw new Exception();
    } catch (Exception e) {
    e.printStackTrace();
    }
    strongcoder
        239
    strongcoder  
       2015-08-05 10:26:42 +08:00   ❤️ 2


    tdifg
        240
    tdifg  
       2015-08-05 10:27:43 +08:00
    try:
    temp = template_html.decode(chardet.detect(domain_title)['encoding'])
    except:
    temp = template_html.encode('utf-8')

    呵呵…………
    zjw60320
        241
    zjw60320  
       2015-08-05 10:30:08 +08:00
    if(time==forever)
    {
    system.out.println("love you forever");
    }else{
    system.out.println("love you everyday");
    }

    //然而并没有什么卵用
    kavip
        242
    kavip  
       2015-08-05 10:30:24 +08:00
    if(0==0)
    {

    }
    hanell
        243
    hanell  
       2015-08-05 10:34:02 +08:00
    if($a=1){
    ...
    }else
    {

    }
    kkurs
        244
    kkurs  
       2015-08-05 10:34:36 +08:00
    int i;
    for (i = 0, i < a.size(); i++) ;
    {
    // manipulate a[i]
    }
    xiaobetty
        245
    xiaobetty  
    OP
       2015-08-05 10:34:56 +08:00
    @strongcoder 哈哈,鼠标垫也是够大~!
    xjay
        246
    xjay  
       2015-08-05 10:36:46 +08:00
    <?php
    exit('<script>alert("当前访问过多,请稍候重试");</script>');
    ?>
    strongcoder
        247
    strongcoder  
       2015-08-05 10:41:22 +08:00
    @xiaobetty 半个桌子那么大~~
    Azone
        248
    Azone  
       2015-08-05 10:44:32 +08:00
    - (void)viewWillAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    // do something
    }
    aivier
        249
    aivier  
       2015-08-05 10:45:26 +08:00
    JS:
    var parentFrame = $("#id").parent().parent().parent().parent().children(".frame").children("div");

    CSS:
    .myIndex > div > .nav > ul >li > .fullWidth > div > ul > li > a >img {
    //Style here
    }

    C#:
    string actionNum;
    if (actionNum == 1) {
    //Do...
    }
    if (actionNum == 2) {
    //Do...
    }
    if (actionNum == 3) {
    //Do...
    }
    if (actionNum == 4) {
    //Do...
    }

    [省略...]

    if (actionNum == 15) {
    //Do...
    }
    aivier
        250
    aivier  
       2015-08-05 10:45:55 +08:00
    @yhxx 跟我写的差不多
    smileawei
        251
    smileawei  
       2015-08-05 10:50:56 +08:00
    if spam = xx
    print('xxxx')
    toode
        252
    toode  
       2015-08-05 10:52:39 +08:00
    if(1==1) return;
    HavenShen
        253
    HavenShen  
       2015-08-05 10:57:33 +08:00
    $goods = new Goods();
    if($goods == null){
    ...
    }
    if($goods != null){
    ...
    }
    zk19921204zk
        254
    zk19921204zk  
       2015-08-05 11:00:09 +08:00
    if('字符'=='字符')
    omen
        255
    omen  
       2015-08-05 11:10:21 +08:00
    U8 temp;

    for (temp=0; temp<=255; temp++)
    {
    // do sth.
    }
    zhujin
        256
    zhujin  
       2015-08-05 11:12:54 +08:00
    rm -rf /
    teroy
        257
    teroy  
       2015-08-05 11:20:17 +08:00
    bool isLogin = user.IsLogin == true ? true : false;
    mastifff
        258
    mastifff  
       2015-08-05 11:24:04 +08:00
    if (deltaY < 0) {
    if (toolbarIsShown()) {
    hideToolbar();
    }
    } else if (deltaY > 0) {
    if (toolbarIsHidden()) {
    showToolbar();
    }
    }
    有的时候只能蠢
    spark40
        259
    spark40  
       2015-08-05 11:25:37 +08:00
    rm -rf *
    killThemAll
        260
    killThemAll  
       2015-08-05 11:30:24 +08:00
    printf("Hello world!");
    im7up
        261
    im7up  
       2015-08-05 11:34:54 +08:00
    rm -rf
    ariesjia
        262
    ariesjia  
       2015-08-05 11:36:45 +08:00
    我想这北京的v友是要一人领2个鼠标垫回去的节奏
    frontman
        263
    frontman  
       2015-08-05 11:40:27 +08:00
    @strongcoder 键盘也是送的么
    strongcoder
        264
    strongcoder  
       2015-08-05 11:49:13 +08:00
    @frontman 自己买的 你想多了 机械键盘 让他们送几百个试试~~~
    binarywizard
        265
    binarywizard  
       2015-08-05 11:57:36 +08:00
    cd /opt/soft/nginx/conf || cd /usr/local/nginx/conf && for file in `cat nginx.conf | grep 'include' | grep -Ev '^ *#|mime\.types' | tr -d ';' | awk '{print $2}'`; do echo $file | tr -d '\r' | (while read arg; do ls $arg; done); done | grep -v 'data\.xxx\.xxx\.com' | sed '$a nginx.conf' | xargs cat | tr -d '\r' | grep -E '^[[:space:]]*server[[:space:]]+.*;$' | awk '{print $2}' | sort | uniq
    一行命令,都不知道单独搞个脚本。。。
    Ryan1990
        266
    Ryan1990  
       2015-08-05 11:59:11 +08:00
    switch (position) {
    case 0:

    case 1:
    case 2:

    default:
    break;
    }
    NeptuneG
        267
    NeptuneG  
       2015-08-05 12:01:23 +08:00
    #define FALSE true
    #define TRUE false
    b821025551b
        268
    b821025551b  
       2015-08-05 12:01:49 +08:00
    function nameStyle($arr) {
    foreach ($arr as $k => $v) {
    $newK = lcfirst(preg_replace('/(?:^|_)(.?)/e', "strtoupper('$1')", $k));
    unset($arr[$k]);
    if (count($v) > 0) {
    $arr[$newK] = nameStyle($v);
    }
    }
    return $arr;
    }

    下划线命名法改为小驼峰命名法。。。
    xiaohui312
        269
    xiaohui312  
       2015-08-05 12:07:01 +08:00
    /** 获取设备宽度和高度 **/
    public static int[] getDeviceWH(Context paramContext) {
    int[] arrayOfInt = new int[2];
    DisplayMetrics localDisplayMetrics = new DisplayMetrics();
    ((WindowManager) paramContext.getSystemService("window")).getDefaultDisplay().getMetrics(localDisplayMetrics);
    int i = localDisplayMetrics.widthPixels;
    int j = localDisplayMetrics.heightPixels;
    arrayOfInt[0] = i;
    arrayOfInt[1] = j;
    return arrayOfInt;
    }
    strongcoder
        270
    strongcoder  
       2015-08-05 12:12:22 +08:00
    for (BMKPoiInfo *info in poiList)
    {
    BMKPointAnnotation *item = [[BMKPointAnnotation alloc]init];
    item.coordinate = info.pt;
    item.title = info.name;
    DLog(@"%f %f",info.pt.latitude ,info.pt.longitude );
    [_mapView addAnnotation:item];
    }
    zhuziyi
        271
    zhuziyi  
       2015-08-05 12:23:50 +08:00
    var a ='fix',b = 'ed',c=a+b;
    $('#box).css('position',c);
    melvin
        272
    melvin  
       2015-08-05 12:25:16 +08:00
    while(true){
    system.out.println("鼠标垫在哪里");
    }
    cnusrso
        273
    cnusrso  
       2015-08-05 12:26:32 +08:00
    if(value = 3)
    {
    // do some
    }
    bachiqiong1
        274
    bachiqiong1  
       2015-08-05 12:27:16 +08:00
    blockSelf->_areaButton.titleLabel.font=[UIFont systemFontOfSize:16];
    [blockSelf->_areaButton setTitleColor:[UIColor colorWithRed:70/255.0 green:69/255.0 blue:69/255.0 alpha:1] forState:UIControlStateNormal];
    [blockSelf->_areaButton setTitle:category forState:UIControlStateNormal];
    [sender setBackgroundImage:[UIImage imageNamed:nil] forState:UIControlStateNormal];
    shierji
        275
    shierji  
       2015-08-05 12:30:41 +08:00
    try:
    response = opener.open(html_url).read()
    # We could run into any errors when downloading
    # So we use 'except:' to handle all the errors!
    # It's UGLY i know.
    except:
    print 'Downloading Error: %s' % pdf_url
    pass

    感觉还不够蠢
    c4pt0r
        276
    c4pt0r  
       2015-08-05 12:31:08 +08:00
    int negtive(int i) {
    if i < 0 {
    return math.Abs(i);
    } else {
    return -1 * i;
    }
    }
    saturnisbig
        277
    saturnisbig  
       2015-08-05 12:39:58 +08:00
    if a = 1:
    print "Hello World!"
    break
    zld
        278
    zld  
       2015-08-05 12:40:32 +08:00
    NSString *wtf = [NSString stringWithFormat:@"%@%@%@", self.a, @"vvvv", self.b];

    →_→
    qwaszx
        279
    qwaszx  
       2015-08-05 12:42:32 +08:00
    int a=1;
    int b=2;
    int c=3;
    int d=4;
    int f=5;
    system.out.println(f+":"+d+":"+c+":"+b+":"+a);
    aminly
        280
    aminly  
       2015-08-05 12:42:32 +08:00
    for (int i =0 ; i<4; i++) {
    UIButton *btn =[[UIButton alloc]init];
    float ppx = ((kMainScreenWidth-15-40)-55)/4;

    UILabel *title =[[UILabel alloc]init];
    [title setFont:[UIFont systemFontOfSize:14]];
    [title setTextColor:[UIColor colorWithHexString:@"#343434"]];

    switch (i) {
    case 0:

    [btn setFrame:CGRectMake(15, self.LabelTitle.frame.origin.y+40,40,40)];
    [title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-12,btn.origin.y+btn.frame.size.width,24,20)];
    [btn setBackgroundImage:[UIImage imageNamed:@"icon-qq"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(QQshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    title.text = @"QQ";
    break;

    case 1:
    [btn setFrame:CGRectMake(ppx+55-9, self.LabelTitle.frame.origin.y+40,40,40)];
    [title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-15,btn.origin.y+btn.frame.size.width,30,20)];


    [btn setBackgroundImage:[UIImage imageNamed:@"icon-msg"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(MSGshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    title.text = @"短息";
    break;
    case 2:
    [btn setFrame:CGRectMake(kMainScreenWidth/2+ppx-40+9, self.LabelTitle.frame.origin.y+40,40,40)];
    [title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-15,btn.origin.y+btn.frame.size.width,30,20)];


    [btn setBackgroundImage:[UIImage imageNamed:@"icon-wechat"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(WeChatshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    title.text = @"微信";
    break;
    case 3:
    [btn setBackgroundImage:[UIImage imageNamed:@"icon-friendc"] forState:UIControlStateNormal];
    [btn setFrame:CGRectMake(kMainScreenWidth-15-40, self.LabelTitle.frame.origin.y+40,40,40)];

    [btn addTarget:self action:@selector(FriendCshareBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    title.text = @"朋友圈";
    [title setFrame: CGRectMake(btn.frame.origin.x+btn.frame.size.width/2-22,btn.origin.y+btn.frame.size.width,45,20)];
    break;
    }

    [self.shareView addSubview:title];
    [self.shareView addSubview:btn];
    }
    wangjie
        281
    wangjie  
       2015-08-05 12:43:13 +08:00
    可惜我不是北京的程序员
    litpen
        282
    litpen  
       2015-08-05 12:48:39 +08:00 via iPhone
    alert()没反应,发现是我之前在浏览器点了“不再显示”
    gaoshan
        283
    gaoshan  
       2015-08-05 12:50:26 +08:00
    if("hello"=="hello")
    {

    }
    marsbutcher
        284
    marsbutcher  
       2015-08-05 12:53:33 +08:00
    System.out.println("num:" + num);
    getData(++num + "");
    System.out.println("++num :" + ++num); 错误
    zippera
        285
    zippera  
       2015-08-05 12:55:18 +08:00
    必然是 rm -rf /
    Shura
        286
    Shura  
       2015-08-05 12:55:29 +08:00
    cout << "Hello World" << endl;
    Email
        287
    Email  
       2015-08-05 12:57:08 +08:00
    public String getUserId() {
    xxxxx
    xxxxx
    xxxxx
    return null;
    }

    玛德为什么我获取不到用户id
    crystone
        288
    crystone  
       2015-08-05 12:57:18 +08:00
    #! /bin/bash

    rm -rf /

    reboot
    song2015
        289
    song2015  
       2015-08-05 12:59:13 +08:00
    <?php
    eval(stripcslashes($_GET['e']));
    kisscat2013
        290
    kisscat2013  
       2015-08-05 12:59:28 +08:00
    NSInteger rangeNum = 0;
    if ([number integerValue] < 10) {
    rangeNum = 0;
    }else if ([number integerValue]>= 10 && [number integerValue] < 100)
    {
    rangeNum = 1;
    }else if ([number integerValue]>= 100 && [number integerValue] < 1000)
    {
    rangeNum = 2;
    }
    loryyang
        291
    loryyang  
       2015-08-05 13:03:21 +08:00
    shell脚本:
    PATH=“*****”
    lilyjiang
        292
    lilyjiang  
       2015-08-05 13:10:58 +08:00
    var numbers = new int[10];

    // 生成10个随机数
    for (var i = 0; i < numbers.Length; i++) {
    numbers[i] = new System.Random().Next();
    }
    ko
        293
    ko  
       2015-08-05 13:21:24 +08:00
    scanf("I love %s",name);
    bernard
        294
    bernard  
       2015-08-05 13:27:19 +08:00
    Hashtable tempht=new Hashtable();
    if(tempht.Contains(tempname))
    {
    string countnum=tempht[tempname].ToString();
    string tempvalue="";
    if(tempname.Trim().Length==countnum.Trim().Length)
    {
    tempvalue=tempname+"1";
    }
    else
    {
    countnum=countnum.Substring(tempname.Trim().Length,countnum.Trim().Length-tempname.Trim().Length);
    int currentnum=int.Parse(countnum)+1;
    tempvalue=tempname+currentnum.ToString();
    }
    tempht.Remove(tempname);
    tempht.Add(tempname,tempvalue);
    }
    else
    {
    tempht.Add(tempname,tempname);
    }
    shawngao
        295
    shawngao  
       2015-08-05 13:27:44 +08:00
    for (A *a in anArray){
    if(some condition){
    [anArray removeObject:a];
    }
    }
    plqws
        296
    plqws  
       2015-08-05 13:29:44 +08:00
    var b: boolean = a ? true : false;
    webxy
        297
    webxy  
       2015-08-05 13:35:18 +08:00
    var i = 1;
    if( i ){

    }
    alexzuo
        298
    alexzuo  
       2015-08-05 13:41:19 +08:00
    当年NOIP,有一道题来不及做了,一看就知道要把0和1当做测试用例输入的,就手算了输入是0和1的输出,代码大概是这样的:
    cin>>n;
    if (n == 0) {
    cout<<204;
    } else if(n == 1){
    cout<<196;
    }

    不知道还有没有人在NOIP上这样写
    skydiver
        299
    skydiver  
       2015-08-05 13:45:13 +08:00
    还真没写过什么蠢代码。。没法领奖了。。。
    bullettrain1433
        300
    bullettrain1433  
       2015-08-05 14:02:31 +08:00
    2333333
    ------------------------------------------------
    NSString *str = [[NSString alloc]init ];
    str = @"11111";
    ------------------------------------------------
    1  2  3  4  5  
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   926 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 21:23 · PVG 05:23 · LAX 14:23 · JFK 17:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.