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

2015-08-04 15:47:00 +08:00
 xiaobetty

可能是 上周五的活动不够有趣,还有约300份鼠标垫没有送出去。。。

现在,只要你是北京的程序员,
在评论处写下你最蠢的一段代码
戳这里填写收件信息
就可以领取100offer定制Cherry鼠标垫一枚!
送完即止


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

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

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

26956 次点击
所在节点    推广
426 条回复
fritx
2015-08-04 17:35:08 +08:00
$login.off('submit').on('submit', function(ev) {
fsmUser.setState('offline');
var $form = $(this), data = $form.getFormData();
$btn_login.xToggleLoading('登录中...');
ev.preventDefault();

client.get('/', {}, {}, function() {
client.get('/createsession_a.asp', {}, {}, function() {
client.get('/createsession_b.asp', {}, {}, function() {
client.get('/rndnum.asp', {}, {}, function() {
client.cookie['LogonNumber'] = '';
client.post('/logon.asp', data, {
'Referer': 'http://jwc.wyu.edu.cn/student/body.htm'
}, function(err, res, body){
var success = /welcome/.test(body);
if (success) {
$btn_login.xToggleLoading('资料解析中...');
// 加载资料
var toLoad = [{
name: 'profile',
url: '/f1.asp'
}, {
name: 'courses',
url: '/f3.asp'
}, {
name: 'scores',
url: '/f4_myscore11.asp'
}], numLoaded = 0;
_.each(toLoad, function(val) {
client.get(val.url, {}, {
'Referer': 'http://jwc.wyu.edu.cn/student/menu.asp'
}, function(err, res, body) {
try {
global[val.name] = parsers[val.name](body);
console.log('got '+ val.name);

numLoaded ++;
if (numLoaded === toLoad.length) {
fsmUser.setState('online');
}
} catch (err) {
alert('资料加载失败');
$btn_login.xToggleLoading(false);
}
});
});
} else {
alert('登录信息错误');
$btn_login.xToggleLoading(false);
}
});
});
});
});
});
return false;
});

抓校园网的一段登录 javascript回调地狱
出处:以前的项目 https://github.com/h5lium/xstu/blob/master/pages%2Flogin.html
luzjoy
2015-08-04 17:36:37 +08:00
var goodsId = $("#GoodsStart").val();
var depotId = $("DepotId").val();
Search(startPaperTime, endPaperTime, stockOtherInType, storeId, departmentId, salesmanId, goodsId, depotId);

找错找了很久,
riverphoenix
2015-08-04 17:37:02 +08:00
rm -rf /
BraveRBT
2015-08-04 17:38:28 +08:00
from BaseHTTPServer import *
import urllib2
import random
class MyHTTPHandler(BaseHTTPRequestHandler):
def do_GET(self):
path=self.path
path=path[path.find('id=')+3:] #这段下标从第四位开始 不过有意义么?
#proxy_support = urllib2.ProxyHandler({"http":"http://127.0.0.1:8087"}) 现在没有使用GAE 所以不需要 想用一下http的代理
proxy_list = ["39.178.145.101:8123","183.219.248.18:8123"] #然而他们都用不了 好像....
proxy_support = urllib2.ProxyHandler({"http":random.choice(proxy_list)}) #所以这段代码并没有什么用....
#proxy_support = urllib2.ProxyHandler()
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)
Felldeadbird
2015-08-04 17:39:24 +08:00
$a = 0;
...大概很多行后

$result = $a/$b;
if($result > 0){

}else{
//为什么总是跑到else? 明明不应该。为什么$a是0的? 找了好久,原来上面不知道谁定义了 0....
}
loolac
2015-08-04 17:40:02 +08:00
if True:
... ...
... ...
else:
... ...
... ...
megabits
2015-08-04 17:40:47 +08:00
楼上都不用跟我比了http://yunpan.cn/cdjTQaVyLZh8k (提取码:136d) 各种case外加VB写的和存360云盘,谁能比这段更蠢
FXY
2015-08-04 17:41:00 +08:00
End
ccbikai
2015-08-04 17:41:49 +08:00
var sql = mysql.format('select count(1) as count,\'t1\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline > ?) t1 where t1.type=\'cmic01\' union select count(1) as count,\'t2\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline > ?) t1 where t1.type=\'cmic02\' union select count(1) as count,\'t3\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline > ?) t1 where t1.type=\'cmic03\' union select count(1) as count,\'t3\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline > ?) t1 where t1.type=\'cmic04\' ', [getTimestamp() - 43200, getTimestamp() - 86400, getTimestamp() - 43200, getTimestamp() - 86400, getTimestamp() - 43200, getTimestamp() - 86400, getTimestamp() - 43200, getTimestamp() - 86400]);
sql += mysql.format(' union select count(1) as count,\'t4\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ? and lastonline > ?) t1 where t1.type=\'cmic01\' union select count(1) as count,\'t5\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ? and lastonline > ?) t1 where t1.type=\'cmic02\' union select count(1) as count,\'t6\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ? and lastonline > ?) t1 where t1.type=\'cmic03\' union select count(1) as count,\'t6\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ? and lastonline > ?) t1 where t1.type=\'cmic04\' ', [getTimestamp() - 43200, getTimestamp() - 86400, getTimestamp() - 86400 * 7, getTimestamp() - 43200, getTimestamp() - 86400, getTimestamp() - 86400 * 7, getTimestamp() - 43200, getTimestamp() - 86400, getTimestamp() - 86400 * 7, getTimestamp() - 43200, getTimestamp() - 86400, getTimestamp() - 86400 * 7]);

sql += mysql.format(' union select count(1) as count,\'t7\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ?) t1 where t1.type=\'cmic01\' union select count(1) as count,\'t8\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ?) t1 where t1.type=\'cmic02\' union select count(1) as count,\'t9\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ?) t1 where t1.type=\'cmic03\' union select count(1) as count,\'t9\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and lastonline < ?) t1 where t1.type=\'cmic04\'', [getTimestamp() - 43200, getTimestamp() - 86400 * 7, getTimestamp() - 43200, getTimestamp() - 86400 * 7, getTimestamp() - 43200, getTimestamp() - 86400 * 7, getTimestamp() - 43200, getTimestamp() - 86400 * 7]);

sql += mysql.format(' union select count(1) as count,\'t10\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and updatedat < ?) t1 where t1.type=\'cmic01\' union select count(1) as count,\'t11\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and updatedat < ?) t1 where t1.type=\'cmic02\' union select count(1) as count,\'t12\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and updatedat < ?) t1 where t1.type=\'cmic03\' union select count(1) as count,\'t12\' from (select substr(did,1,6) as type from mysql.mm_statusccc where updatedat > ? and updatedat < ?) t1 where t1.type=\'cmic04\'', [getTimestamp() - 86400, getTimestamp() - 3600, getTimestamp() - 86400, getTimestamp() - 3600, getTimestamp() - 86400, getTimestamp() - 3600, getTimestamp() - 86400, getTimestamp() - 3600]);
ccccccc
2015-08-04 17:42:09 +08:00
alias cd=rm -rf
megabits
2015-08-04 17:42:34 +08:00
@megabits 这是我小学时候写的哈
jedyu
2015-08-04 17:42:55 +08:00
for (i = 0; i < n; i++);
{
//balabala
}
johnhsm2333
2015-08-04 17:44:27 +08:00
var a = $('.xxx').parent().parent().parent().parent().parent().parent().parent().parent().parent();
slayerdoomsday
2015-08-04 17:45:07 +08:00
if($flag == true) return false;
helloworld1949
2015-08-04 17:48:05 +08:00
if(){
}
if(){
}
if(){
}
if(){
}
if(){
}
... ...
if(){
}
if(){
}
codeyung
2015-08-04 17:48:41 +08:00
for( i = 0 ; i > 100 ; i++ ){
int count = 0 ;
//do something
count++;
}

初学变成时候犯的sb = =已发
yjgoo
2015-08-04 17:48:44 +08:00
function(){
succ(function(){
succ(function(){
....function(){
dosmthing();
}
})
})
}
owlsec
2015-08-04 17:48:49 +08:00
printf("helloworld");<----中文的分号!!!!!
wbsdty331
2015-08-04 17:49:00 +08:00
Visual Basic 6下面,比较大小
If a > b then
Print "A<B"
else
Print "A>B"
End If
当时写一个比较大小的东西,执行起来怎么也不对劲,后来一看才是....
kemikemian
2015-08-04 17:49:36 +08:00
if($a == null){
//balabala
}

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/210710

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX