- 1
CBinarySemaphore _there_is_only_one;//Highlander.
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+3
CBinarySemaphore _there_is_only_one;//Highlander.
−11
Point ReadPoint ()
{
Fixed x = ReadFixed();
Fixed y = ReadFixed();
return Point(x,y);
}
Как же меня бесит отсутствие чётко определённого стандартом порядка вычисления аргументов!!!!!!!
+11
AbstractMessageFrame * DataLength = create_frame(
make_condition_reader(this,
fnc_ext::bind(
fnc_ext::compose1(
fnc_ext::compose2(std::logical_or<bool>(),
std::bind2nd(std::equal_to<byte>(), PC5000FlashFeatures::MARKER_SYMBOL),
std::bind2nd(std::equal_to<byte>(), PC5000FlashFeatures::SPACE_SYMBOL)),
fnc_ext::mem_fun<const ByteBuffer, const byte&>(&ByteBuffer::back) ),
&_receivedBuffer),
fnc_ext::bind(
fnc_ext::compose2(std::logical_or<bool>(),
fnc_ext::compose1(std::bind2nd(std::greater<WORD>(),
PC5000FlashFeatures::LENGTH_HEADER +
_maxCommandFieldLength +
PC5000FlashFeatures::LENGTH_MARKER +
PC5000FlashFeatures::LENGTH_OF_LENGTH),
fnc_ext::mem_fun(&ByteBuffer::length)),
fnc_ext::compose1(fnc_ext::compose2(std::logical_and<bool>(),
std::not1(std::ptr_fun<const char, bool>((SymbolCheckFunc)isDigit)),
std::not1(std::ptr_fun<const char, bool>((SymbolCheckFunc)isEnglishLetter))),
fnc_ext::mem_fun<const abstractBuffer<unsigned char>, const byte&>(&ByteBuffer::back)) ),
&_receivedBuffer) ),
fnc_ext::bind(std::mem_fun(&ThisClass::setDataLength), this),
"Data Length");
Композиции, частичные применения, функторы? Больше тотальной функциональщины! Вложенность продолжает расти с развитием проекта.
+153
$imgs = glob('images/'.$url_parts[0].'/*');
// Windows detection
if(DIRECTORY_SEPARATOR == '\\') {
$cnt = count($imgs);
for($i = 0; $i < $cnt; $i++) $imgs[$i] = iconv('CP1251//IGNORE', 'UTF-8', $imgs[$i]);
}
+116
Кто может посоветовать сайт, на котором стоит потроллить?
Хочу отточить свои навыки.
З.Ы. Представляю, как скрежещут зубами тарас и борманд. Слово кабальеро - как только кто нибудь посоветует, заминусую топик.
)
Флудинг, троллинг и спаминг.
+163
...
$str = preg_replace ( array_keys ( $new ), array_values ( $new ), $str );
$str = trim ( $str );
$str = str_replace ( " ", "_", $str );
$str = str_replace ( " ", "_", $str );
$str = str_replace ( " ", "_", $str );
$str = str_replace ( " ", "_", $str );
$str = str_replace ( " ", "_", $str );
$str = str_replace ( " ", "_", $str );
$str = str_replace ( " ", "_", $str );
+152
<div style="display:none;"><script type="text/javascript">
(function(w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter... = new Ya.Metrika({id:..., enableAll: true});
}
catch(e) { }
});
})(window, "yandex_metrika_callbacks");
</script></div>
Whattt????
−4
// please don't change this
#define NUM_INVISIBLE_TYPES 1
Выдержка из исходников civilization 5.
Да, да, прекрасно, усложняйте моддинг
+26
$arr['body'][$row_num] = array(
$datas,
$tval,
$club1_link,
($results['results_url'] != '' ? '<a href="' . $results['results_url'] . '"' . ($results['results_class'] != '' ? $results['results_class'] : '') . '>' : '<span>') . $results['results'] . ($results['results_url'] != '' ? '</a>' : '</span>'),
$club2_link,
spb_stats_show_media_icons($row),
);
было еще хуже. каждая строка была адовый тернарник...
+140
define('SECOND', 1);
define('MINUTE', SECOND*60);
define('HOUR', MINUTE*60);
// ...
количество секунд в секунде — это определённо что-то новое.