- 1
- 2
$ find . -type f -name '*.asp' -exec grep -nHi 'select \*' {} \; | wc -l
2160
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 202
+125
$ find . -type f -name '*.asp' -exec grep -nHi 'select \*' {} \; | wc -l
2160
teh drama :(
−126
<a href='?PageId=<%= i %>&site_lan=<%= Request("site_lan") %>&rest_id=<%= Request("rest_id") %>' class="w2"><u><%= i %></u></a>
Подчерк мастера.
+152
function fixMootoolsJSON(thing) {
var i, member, pattern = /^"\[.*\]"$/, copy;
if (thing instanceof Array) {
for (i = 0; i < thing.length; i++) {
member = thing[i];
if (typeof member == "string" && pattern.test(member)) {
thing[i] = fixMootoolsJSON(JSON.decode(member));
}
}
} else if (typeof thing == "object") {
copy = { };
for (i in thing) {
if (thing.hasOwnProperty(i)) {
copy[i] = fixMootoolsJSON(JSON.decode(thing[i]));
}
}
for (i in copy) {
if (copy.hasOwnProperty(i)) {
thing[i] = copy[i];
}
}
}
return thing;
}
http://outsourceror.blogspot.co.il/2011/04/mootools-intrudes-on-native-json-and.html
+133
drwxrwxrwx 1 wvxvw None 0 02-17 16:59 .svn
-rw-rw-rw- 1 wvxvw None 22082 02-04 11:03 header.asp
-rw-rw-rw- 1 wvxvw None 14331 02-04 11:02 header.utf.asp
-rw-rw-rw- 1 wvxvw None 10333 02-04 11:01 header2.asp
-rw-rw-rw- 1 wvxvw None 10368 02-04 11:02 header2_test.asp
-rw-rw-rw- 1 wvxvw None 11825 02-04 11:02 header3.asp
-rw-rw-rw- 1 wvxvw None 11734 02-04 11:03 header3_liran.asp
-rw-rw-rw- 1 wvxvw None 11238 02-04 11:01 header3_old.asp
-rw-rw-rw- 1 wvxvw None 7403 02-04 11:02 header3_ssl.asp
-rw-rw-rw- 1 wvxvw None 9045 02-04 11:01 header3del.asp
-rw-rw-rw- 1 wvxvw None 39451 02-04 11:02 header4.asp
-rw-rw-rw- 1 wvxvw None 40224 02-04 11:02 header4_new.asp
-rw-rw-rw- 1 wvxvw None 13348 02-04 11:02 header4rus.asp
-rw-rw-rw- 1 wvxvw None 230 02-04 11:02 headers.asp
-rw-rw-rw- 1 wvxvw None 208 02-06 09:37 headers.php
Наследство.
+157
if (!("" instanceof String)) throw new Error("Empty string is not a string");
Майкрософт. JScript, ASP.
−170
if rest_id<>"" then
if Not Session("login_rest") then
SQL = "UPDATE rest_tbl SET "& sql_1 & sql_2 & sql_3 & sql_4 & sql_5 & sql_6 & " rest_title_sub = '" & rest_title_sub & "', go_search_street_num = '" & go_search_street_num & "', rest_phone_real = '" & rest_phone_real & "', kashrut = '" & kashrut & "', rest_phone = '" & rest_phone & "', rest_line = '" & rest_line & "', rest_delivery_time = '" & rest_delivery_time & "', rest_color = '" & rest_color & "', rest_delivery = " & rest_delivery & ", rest_delivery_min = " & rest_delivery_min & ", go_search_street = '" & go_search_street & "', city = '" & go_search_city & "', area = '" & go_search_area & "', rest_kosher = '" & rest_kosher & "', rest_fax = '" & rest_fax & "', rest_short = '" & rest_short & "', RestDescription='"&RestDescription&"', rest_why = '" & rest_why & "', rest_open_hour = '" & rest_open_hour & "', rest_title = '" & rest_title & "', rest_moretitle = '" & rest_moretitle & "', rest_type ='" & rest_type & "', rest_date = " & date() & ", rest_words = '" & rest_words & "', rest_email = '" & rest_email & "', rest_invoice_email = '" & rest_invoice_email & "', rest_delivery_text = '" & rest_delivery_text & "', rest_zone_in_1 = '" & rest_zone_in_1 & "', rest_zone_in_2 = '" & rest_zone_in_2 & "', rest_zone_in_3 = '" & rest_zone_in_3 & "', rest_zone_in_4 = '" & rest_zone_in_4 & "' , rest_zone_in_33 = '" & rest_zone_in_33 & "', rest_zone_in_44 = '" & rest_zone_in_44 & "', rest_zone_out_1 = '" & rest_zone_out_1 & "', rest_zone_out_2 = '" & rest_zone_out_2 & "' , rest_zone_out_33 = '" & rest_zone_out_33 & "', rest_zone_out_44 = '" & rest_zone_out_44 & "' , rest_zone_out_3 = '" & rest_zone_out_3 & "', rest_zone_out_4 = '" & rest_zone_out_4 & "' , user_password = '" & user_password & "', rest_contact = '" & rest_contact & "', rest_fax_order = '" & rest_fax_order & "', rest_skype = '" & rest_skype & "', rest_sms = '" & rest_sms & "', rest_sms_num = '" & rest_sms_num & "',rest_sms_sendcopy = " & rest_sms_sendcopy & ", rest_com = '" & rest_com & "',rest_invoice_url = '" & rest_invoice_url & "', rest_des_new = '" & rest_des_new & "', text_mini ='"&text_mini&"' , price_visible ="&price_visible&" , min_visible ="&min_visible&", callback ="&callback&", rest_hide_rating ="&rest_hide_rating&", rest_hide_related ="&rest_hide_related&",rest_show_billing='"&rest_show_billing&"', rest_credit_hide ="&credit_hide&", rest_idcard_show ="&idcard_show&",show_cvv = "&show_cvv&",animate_rest_image = " & animate_rest_image & ", HomeLogo ="&HomeLogo&", HomeCupon ="&HomeCupon&", openfield1='"&openfield1&"', openfield2='"&openfield2&"', ForSearch_RestType='"&ForSearch_RestType&"', ForSearch_ShippingCost='"&ForSearch_ShippingCost&"', ForSearch_ShippingTime='"&ForSearch_ShippingTime&"', ForSearch_MinOrder='"&ForSearch_MinOrder&"', Rest_KosherMehadrin="&KosherMehadrin&", CuponsWorth="&CuponsWorth&",delivery_fee_text='" & delivery_fee_text& "',delivery_fee_global = '" & delivery_fee_global & "',aba_menu_rest_id = " & aba_menu_rest_id & ",private_label_id = " & private_label_id & " , " _
& "rest_site_search_link = '" & rest_site_search_link & "'," _
& "rest_title2 = '" & rest_title2 & "'," _
& "private_label_rest_extra_data = '" & private_label_rest_extra_data & "', " _
& "email_msg = '" & email_msg & "'," _
& "text_msg_name1 = '" & text_msg_name1 & "'," _
& "text_msg_phone1 = '" & text_msg_phone1 & "'," _
& "text_msg_position1 = '" & text_msg_position1 & "'," _
& "text_msg_name2 = '" & text_msg_name2 & "'," _
& "text_msg_phone2 = '" & text_msg_phone2 & "'," _
& "text_msg_position2 = '" & text_msg_position2 & "'," _
& "payment_by_delivery_boy = " & payment_by_delivery_boy & "," _
& "rest_discount = " & rest_discount & "," _
& "rest_discount_min = " & rest_discount_min & "," _
& "is_book_food = " & is_book_food & "," _
& "is_frs = " & is_frs & "," _
& "limit_streets_selection = " & limit_streets_selection & "," _
& "is_private_label_close = " & is_private_label_close & "," _
& "sms_user_delivery_boy_left = " & sms_user_delivery_boy_left & "," _
& "is_disable_takeaway = " & is_disable_takeaway & "," _
& "is_disable_delivery = " & is_disable_delivery & "," _
& "company_billing_payment_type = " & company_billing_payment_type & "," _
& "company_billing_comments = '" & company_billing_comments & "'," _
& "takeaway_time = " & takeaway_time & "," _
& "BusinessDishCost="&BusinessDishCost&", AverageCost="&AverageCost&", lang="&lang&" WHERE rest_id = " & rest_id & ";"
Вы не подумайте, сайт относительно новый - этому коду года 3-4 от силы. АСП "классик".
В таблице 162 колонки, из них реально используется наверное не больше половины - что хранится в остальных - тайна покрытая мраком.
+163
type = ~~(Math.random()*5);
if (type == 0) type = 1;
else type = 0;
Кручу-верчу, вобщем, как обычно.
+126
rename-wiki:
$(shell cd ${WIKIDST} && rename 'i-iterate' 'Iterate' *.wiki)
$(shell find ${WIKIDST} -name "*.wiki" -exec \
sed -i 's/\[i-iterate/\[Iterate/g' '{}' \;)
$(shell find ${WIKIDST} -name "*.wiki" -exec \
sed -i 's/\.html\#/\#/g' '{}' \;)
$(shell find ${WIKIDST} -name "*.wiki" -exec \
sed -i 's/</\</g' '{}' \;)
$(shell find ${WIKIDST} -name "*.wiki" -exec \
sed -i 's/>/\>/g' '{}' \;)
Чтоль порадовать вас чем-нибудь?
−106
>>> class Foo():
... pass
...
>>> try:
... raise Foo()
... except ExceptionBase as foo:
... print 'foo %s' % foo
... except:
... print 'not an exception'
... else:
... print 'it\'s all good'
...
not an exception
>>>
Чет я как-то призадумался... Питон 2.7. Что делать-та?
+73
http://javadoc.bugaco.com/com/sun/java/swing/plaf/nimbus/InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter.html
Найдено знакомым, я ток опубликовал.