- 1
{"response": {"status": {"version": "4.2", "code": 5, "message": "The Identifier specified does not exist: bieber"}}}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+145
{"response": {"status": {"version": "4.2", "code": 5, "message": "The Identifier specified does not exist: bieber"}}}
+132
IF ` ` <> ' '.
MESSAGE 'Oh no!' TYPE 'X'.
ENDIF.
ABAP и строковые литералы. Пробел из STRING следует сравнивать именно с ` `, а не ' ' или константой SPACE.
+166
try {
$('#field_9').mask('+7 (999) 999-99-99');
} catch (e) {
$('#field_9').mask('+7 (999) 999-99-99');
}
Не получилось с первого раза? Получится со второго!
+161
$reload_one_by_one = $folder = $datashow = $tagdelete = $ipdatauser = $design = $open_all = $catshow = $main = $daleeshow = $openshow = $number = $add = $size = $papki_numbers = $zagolovokin = $menu = $noli = $show_title = $random = $showlinks = $open_new_window = $shablon = $show_new_pages = $reload_link_show = $reload_link_time = $reload_link_on_start = $show_pages_from = $calendar_future = $calendar_years = $re_menu_type = $must_have_foto_adres = $papki_in_razdel_show = $papki_in_razdel_punkt = $papki_in_papki_show = $papki_in_papki_punkt = $papki_in_pages_show = $papki_in_pages_punkt = $type_menu_item = $razdel_menu_show = $tag_show = $sort_photo = $archive_type = $archive_sort = $another_css_link = $another_css_options = $another_css_font_1 = $another_css_font_2 = $another_css_color_1 = $another_css_color_2 = $another_css_noimages = $author_show = 0;
Кажется найден «брат» говнокода http://govnokod.ru/17836
+57
double g(void) {
int i;
for (i = 0; i < N; i++) {
return (3*psi[i] + 25) * (0.1);
}
}
Попросили посмотреть код. Привожу как есть.
+77
String value = paramValue; //make new instance
+157
(
new CompleteProfileRequest(
new \stdClass,
new \Net_URL2(
$this->uriBuilder
->reset()
->setUseCacheHash(FALSE)
->setCreateAbsoluteUri(TRUE)
->build()
),
array_key_exists('headlineSelect', $settings)
? $settings['headlineSelect']
: 'headline:complete_profile'
)
)->create();
Нельзя просто так взять и наплодить кучу переменных ))
+75
public boolean setTraceColor(String traceName, Color traceColor) {
return true;
}
что бы это значило...
+159
public function getProductAttributes($product_id) {
$product_attribute_data = array();
$product_attribute_query = $this->db->query("SELECT attribute_id FROM " . DB_PREFIX . "product_attribute WHERE product_id = '" . (int)$product_id . "' GROUP BY attribute_id");
foreach ($product_attribute_query->rows as $product_attribute) {
$product_attribute_description_data = array();
$product_attribute_description_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_attribute WHERE product_id = '" . (int)$product_id . "' AND attribute_id = '" . (int)$product_attribute['attribute_id'] . "'");
foreach ($product_attribute_description_query->rows as $product_attribute_description) {
$product_attribute_description_data[$product_attribute_description['language_id']] = array('text' => $product_attribute_description['text']);
}
$product_attribute_data[] = array(
'attribute_id' => $product_attribute['attribute_id'],
'product_attribute_description' => $product_attribute_description_data
);
}
return $product_attribute_data;
}
Opencart -> ModelCatalogProduct -> getProductAttributes
Первым запросом в БД они берут IDы атрибутов, перебирают их циклом, в котором другим запросом берут всё, в том числе и те же IDы, из той же таблицы и снова перебирают строки циклом.
−116
for i in `seq 1 10000`; do echo $i; done | parallel --gnu sh -c ':;echo {}; python getreq.py {} >olymp-{}.html'
(for i in olymp-*.html; do echo `md5sum $i`; done) | sort | awk '{ print $2, $1 }' | uniq -f 1 | awk '{ print $1 }' | xargs -I{} -n 1 sh -c ":;(cat {} | egrep -o 'question__section-name.*?</div>' | sed 's/question__section-name\">//g' | sed 's/<\/div>//g' | tr -d '\n'); echo \ {}" | sort | awk '{ print $(NF)}' | xargs -I{} -n 1 cat {} >>total2.html
Скачал все задачки универсиады и собрал в один файлик.
Смотреть страшно