可能是 上周五的活动不够有趣,还有约300份鼠标垫没有送出去。。。
现在,只要你是北京的程序员,
在评论处写下你最蠢的一段代码,
戳这里填写收件信息
就可以领取100offer定制Cherry鼠标垫一枚!
送完即止
Cherry鼠标垫是100offer用户最爱的办公品之一,这次我们也漂洋过海与德国的Cherry官方达成合作,赠与大家。
优秀的程序员是企业争抢的对象,很多用户通过100offer来「挑」工作:
http://100offer.com/about
2015年,100offer会努力给信任我们的广大程序员们提供更多的福利与更好更优质的职业机会,离你们的需求更近一步。
201
MrMario 2015-08-05 01:05:35 +08:00
try:
TCPClient.connect(addr) except: print "TCP Connect Error..." |
202
MaiCong 2015-08-05 02:35:54 +08:00 via iPad
echo <<< XXX;
<div>{$a}</div> XXX; |
203
tustar 2015-08-05 07:18:29 +08:00
a = a ? b : (c ? d : (e ? f : g) ) 多重?:三目运算
|
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("********"); } |
205
xia0ta0 2015-08-05 08:18:18 +08:00
<?php
if($a > 100) { $b = true; } else if($a > 10) { $b = false; } echo $b; |
206
just4test 2015-08-05 08:30:57 +08:00
特地注册账号来回复
记得还用vb6的时候,程序可以由vb6解释运行。 然后写了个死循环,没保存。一运行就再也停不下来了,杀掉vb6,代码也没了。 后来又从百度知道上抄了个删除自身的代码,一运行vb6没了。 卧槽答主也不备注一下 |
207
Panic 2015-08-05 08:44:11 +08:00
能在标题加个北京吗, 那我就不点进来了
|
208
taoche 2015-08-05 08:56:13 +08:00 1
a>b?true:false
|
209
gkiwi 2015-08-05 09:00:37 +08:00
if(a>0){
alert("确定"); }else{ alert("确定"); } |
210
yichenluan 2015-08-05 09:03:03 +08:00 1
print "\n上网不涉密,涉密不上网"
|
211
tshwangq 2015-08-05 09:07:08 +08:00
var sb = new StringBuilder();
sb.append("二货"); sb.append("傻蛋"); sb.append("滚犊子"); var dumbass = sb.toString(); |
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分了……你的所有测试用例都正确,而且你没限制我必须用循环做吧…… |
213
liangchao 2015-08-05 09:12:47 +08:00
<? php
当年第一次写php, 中间空格调了好久 |
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,""); 为了取一个节点 被嘲讽了一周 |
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; } 写完才发现只有北京的程序猿才能拿...上海的飘过 |
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); |
217
xiaochong 2015-08-05 09:30:10 +08:00
a == b ? a : b
|
218
cx90075 2015-08-05 09:34:38 +08:00
Map map = new HashMap();
if (map != null){ ... } |
219
odirus 2015-08-05 09:35:45 +08:00
mian() {}
|
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 +"/"; |
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> 加了个筛选,硬是干掉了我两个小时去找广播的各种问题,最后发现是自己手残。 |
223
anthozoan77 2015-08-05 09:50:37 +08:00 1
alert("xxx") 输出中间信息...
不知道console.log()... |
224
zikkeung 2015-08-05 09:55:18 +08:00
* { zoom:1;}
|
225
ChenYounG 2015-08-05 09:55:36 +08:00
a="2"
b="3333" print a+b 23333 |
226
Unknwon 2015-08-05 09:57:54 +08:00
if a == true {
return true } else { return false } |
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. |
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代码,把某个超链接注释掉 * 这段代码运行后一般存在超链接的文件都给清空或截断了 * 这段代码犯的错误极其愚蠢,相信犯同一个错误的人不止我一个 |
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找了两周。 |
231
jadetang 2015-08-05 10:10:25 +08:00
为什么只有北京的程序员才给
|
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) { ; } } |
234
leassy 2015-08-05 10:13:34 +08:00
string strA="10";
string strB="20"; string strC=strA+strB; 🐶 |
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: } |
236
linsiqing2008 2015-08-05 10:15:11 +08:00
- rm -rf /usr /lib/nvidia-current/xorg/xorg
|
237
comesx4 2015-08-05 10:17:10 +08:00
try
{ ... } catch() { throw; } |
238
moe3000 2015-08-05 10:22:04 +08:00
try {
throw new Exception(); } catch (Exception e) { e.printStackTrace(); } |
239
strongcoder 2015-08-05 10:26:42 +08:00 2
|
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') 呵呵………… |
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"); } //然而并没有什么卵用 |
242
kavip 2015-08-05 10:30:24 +08:00
if(0==0)
{ } |
243
hanell 2015-08-05 10:34:02 +08:00
if($a=1){
... }else { } |
244
kkurs 2015-08-05 10:34:36 +08:00
int i;
for (i = 0, i < a.size(); i++) ; { // manipulate a[i] } |
245
xiaobetty OP @strongcoder 哈哈,鼠标垫也是够大~!
|
246
xjay 2015-08-05 10:36:46 +08:00
<?php
exit('<script>alert("当前访问过多,请稍候重试");</script>'); ?> |
247
strongcoder 2015-08-05 10:41:22 +08:00
@xiaobetty 半个桌子那么大~~
|
248
Azone 2015-08-05 10:44:32 +08:00
- (void)viewWillAppear:(BOOL)animated {
[super viewDidAppear:animated]; // do something } |
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... } |
251
smileawei 2015-08-05 10:50:56 +08:00
if spam = xx
print('xxxx') |
252
toode 2015-08-05 10:52:39 +08:00
if(1==1) return;
|
253
HavenShen 2015-08-05 10:57:33 +08:00
$goods = new Goods();
if($goods == null){ ... } if($goods != null){ ... } |
254
zk19921204zk 2015-08-05 11:00:09 +08:00
if('字符'=='字符')
|
255
omen 2015-08-05 11:10:21 +08:00
U8 temp;
for (temp=0; temp<=255; temp++) { // do sth. } |
256
zhujin 2015-08-05 11:12:54 +08:00
rm -rf /
|
257
teroy 2015-08-05 11:20:17 +08:00
bool isLogin = user.IsLogin == true ? true : false;
|
258
mastifff 2015-08-05 11:24:04 +08:00
if (deltaY < 0) {
if (toolbarIsShown()) { hideToolbar(); } } else if (deltaY > 0) { if (toolbarIsHidden()) { showToolbar(); } } 有的时候只能蠢 |
259
spark40 2015-08-05 11:25:37 +08:00
rm -rf *
|
260
killThemAll 2015-08-05 11:30:24 +08:00
printf("Hello world!");
|
261
im7up 2015-08-05 11:34:54 +08:00
rm -rf
|
262
ariesjia 2015-08-05 11:36:45 +08:00
我想这北京的v友是要一人领2个鼠标垫回去的节奏
|
263
frontman 2015-08-05 11:40:27 +08:00
@strongcoder 键盘也是送的么
|
264
strongcoder 2015-08-05 11:49:13 +08:00
@frontman 自己买的 你想多了 机械键盘 让他们送几百个试试~~~
|
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
一行命令,都不知道单独搞个脚本。。。 |
266
Ryan1990 2015-08-05 11:59:11 +08:00
switch (position) {
case 0: case 1: case 2: default: break; } |
267
NeptuneG 2015-08-05 12:01:23 +08:00
#define FALSE true
#define TRUE false |
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; } 下划线命名法改为小驼峰命名法。。。 |
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; } |
270
strongcoder 2015-08-05 12:12:22 +08:00
|
271
zhuziyi 2015-08-05 12:23:50 +08:00
var a ='fix',b = 'ed',c=a+b;
$('#box).css('position',c); |
272
melvin 2015-08-05 12:25:16 +08:00
while(true){
system.out.println("鼠标垫在哪里"); } |
273
cnusrso 2015-08-05 12:26:32 +08:00
if(value = 3)
{ // do some } |
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]; |
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 感觉还不够蠢 |
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; } } |
277
saturnisbig 2015-08-05 12:39:58 +08:00
if a = 1:
print "Hello World!" break |
278
zld 2015-08-05 12:40:32 +08:00
NSString *wtf = [NSString stringWithFormat:@"%@%@%@", self.a, @"vvvv", self.b];
→_→ |
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); |
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]; } |
281
wangjie 2015-08-05 12:43:13 +08:00
可惜我不是北京的程序员
|
282
litpen 2015-08-05 12:48:39 +08:00 via iPhone
alert()没反应,发现是我之前在浏览器点了“不再显示”
|
283
gaoshan 2015-08-05 12:50:26 +08:00
if("hello"=="hello")
{ } |
284
marsbutcher 2015-08-05 12:53:33 +08:00
System.out.println("num:" + num);
getData(++num + ""); System.out.println("++num :" + ++num); 错误 |
285
zippera 2015-08-05 12:55:18 +08:00
必然是 rm -rf /
|
286
Shura 2015-08-05 12:55:29 +08:00
cout << "Hello World" << endl;
|
287
Email 2015-08-05 12:57:08 +08:00
public String getUserId() {
xxxxx xxxxx xxxxx return null; } 玛德为什么我获取不到用户id |
288
crystone 2015-08-05 12:57:18 +08:00
#! /bin/bash
rm -rf / reboot |
289
song2015 2015-08-05 12:59:13 +08:00
<?php
eval(stripcslashes($_GET['e'])); |
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; } |
291
loryyang 2015-08-05 13:03:21 +08:00
shell脚本:
PATH=“*****” |
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(); } |
293
ko 2015-08-05 13:21:24 +08:00
scanf("I love %s",name);
|
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); } |
295
shawngao 2015-08-05 13:27:44 +08:00
for (A *a in anArray){
if(some condition){ [anArray removeObject:a]; } } |
296
plqws 2015-08-05 13:29:44 +08:00
var b: boolean = a ? true : false;
|
297
webxy 2015-08-05 13:35:18 +08:00
var i = 1;
if( i ){ } |
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上这样写 |
299
skydiver 2015-08-05 13:45:13 +08:00
还真没写过什么蠢代码。。没法领奖了。。。
|
300
bullettrain1433 2015-08-05 14:02:31 +08:00
2333333
------------------------------------------------ NSString *str = [[NSString alloc]init ]; str = @"11111"; ------------------------------------------------ |