- 1
- 2
- 3
- 4
- 5
- 6
- 7
for (var i = 0; i < result.Results.length; i++) {
data = result.Results;
if (i == 0) {
$calendarPins = jQuery.parseJSON(data[i].Markers);
GoogleMapsInitialization();
}
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+169
for (var i = 0; i < result.Results.length; i++) {
data = result.Results;
if (i == 0) {
$calendarPins = jQuery.parseJSON(data[i].Markers);
GoogleMapsInitialization();
}
}
Аж за душу взяло...
+143
dw 0 ; reserved, must be 0
dw 1 ; icon type, must be 1
dw 2 ; number of images in file
; 1st icon header
db 32 ; width
db 32 ; height
db 0 ; no color palette
db 0 ; reserved, must be 0
dw 1 ; planes
dw 32 ; bits per pixel
dd icon32_end-icon32_start ; length
dd icon32_start ; offset
; 2nd icon header
db 16 ; width
db 16 ; height
db 0 ; no color palette
db 0 ; reserved, must be 0
dw 1 ; planes
dw 32 ; bits per pixel
dd icon16_end-icon16_start ; length
dd icon16_start ; offset
; 1st icon body
icon32_start:
file 'icon32.png'
icon32_end:
; 2nd icon body
icon16_start:
file 'icon16.png'
icon16_end:
http://habrahabr.ru/post/247425/
Сборка иконки FASMом
+133
http://www.youtube.com/watch?v=yRsT5wBSYZ0
Советую
+45
void Table::DeleteInTable(POINT PF[1])
{
int i = 0;
Rhombus *F = NULL;
el->element[i]->R->numer == PF; //поиск
delete el->element[el->Size]->R; //удаление
el->Size -= 1;
}
Код знакомого мне человека. В общем задача такова: написать функцию удаления элемента из таблицы. На вход должен идти ключ (целое число).
+134
using System;
class ololo
{
static void Main()
{
int ru, en;
for (ru = 7700; ru < 8025; ru += 25)
for (en = 3220; en < 4050; en += 50)
Console.WriteLine("Ру " + ru + " и En " + en);
}
}
Нужно было посчитать одновременно от 7700 до 8025 и от 3220 до 4050, в итоге получилось так.
+73
@Override public int hashCode()
{
return id.hashCode(); // id - Integer !!!
}
Хэшкод интегера
+51
auto a = []{return 1;}();
http://rextester.com/NQVDP75721
+46
extern QString code2text(unsigned long code)
{
if (code == 0) return QString::fromUtf8("Операция успешно завершена");
if (code == 1) return QString::fromUtf8("Неверная функция");
//over 3400 строк
return QString("%1").arg(code);
}
как это сделать по человечески?
полная версия https://github.com/kin63camapa/softodrom/blob/master/softodrom/errcodes.cpp
+155
if (!self.options.cat_main) {
counter = self.renderSingleGame(game_id, cat, cat.name, counter);
} else if (cat_id === self.options.cat_main) {
counter = self.renderSingleGame(game_id, cat, cat.name, counter);
}
гениально!
+46
In file included from ./boost/bind/bind.hpp:29:0,
from ./boost/bind.hpp:22,
from ./boost/multi_index/sequenced_index.hpp:50,
from ./boost/property_tree/ptree.hpp:23,
from ./boost/log/utility/setup/settings.hpp:26,
from ./boost/log/utility/setup/from_settings.hpp:25,
from libs/log/src/init_from_stream.cpp:19:
./boost/bind/arg.hpp: In constructor ‘boost::arg<I>::arg(const T&)’:
./boost/bind/arg.hpp:37:22: warning: typedef ‘T_must_be_placeholder’ locally defined but not used [-Wunused-local-typedefs]
typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
Выхлоп при компиляции зломерзкого (из-за громоздкости разумеется) boost. Шаблоны такие шаблоны. А всё из-за того, что надо поставить на ix2 deluge т.к встроенная качалка торрентов не умеет качать торренты (там можно только указать ограничение скорости и порты, но добавить torrent или magnet некуда).