- 1
Перейти на страницу <span onmouseover="this.className='menu_over'" onmouseout="this.className='menu'" class="menu" onClick="window.location='<?echo $arItem["DETAIL_PAGE_URL"]?>'">--></span>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+167
Перейти на страницу <span onmouseover="this.className='menu_over'" onmouseout="this.className='menu'" class="menu" onClick="window.location='<?echo $arItem["DETAIL_PAGE_URL"]?>'">--></span>
тег "a" видимо был незнаком.
−124
grep {$a_b_props = ($a_b_props && $a_b_props.".").(($block < 1)? &dupl($tempProps{$_}) : $tempProps{$_}) if /^[ab]_/} sort keys %tempProps;
туда же...
−125
<a href="javascript:void(0);"
onclick="$('menu_main_dropdown2').style.display = (
$('menu_main_dropdown2').style.display=='none' ? 'inline' : 'none' );
$('menu_main_dropdown').style.display = 'none';this.blur(); return false;"
class="top_menu_item">
Account</a>
Скрытие /показ блока меню
−124
@AoH_SUBSinFILE = map {&parseSubmodel($_, $block)} $g_file_content =~ m/\s*?(inst .+?vars \\.+?[^\\])\n/gs;
Говнокод4obfuscation :)
−124
sub WidthOf()
{
my %WIDTHES =('90','195','118','165', ... over9000 ...'43','255');
my $TextWidth;
map {$TextWidth += $WIDTHES{ord $_} || 200} split //,@_[0];
return $TextWidth;
}
−116
sub chooseType()
{
grep {return $_ if @_[0] =~ /$_/} (keys %TYPES);
return "";
}
люблю map и grep :)
+161
function get_section(){
if(ifGet('section')){
if($this->get_file('./applications/app.'.$this->section.'.php')){
switch (Get('section')){
case ''.$this->section.'':
$m = new $this->section();
break;
}
} else {
switch (Get('section'))
{
default:
include_once('./applications/sys.pages.php');
$m = new pages();
break;
}
}
}else{
switch (Get('section'))
{
default:
include_once('./applications/sys.home.php');
$m = new home();
break;
}
}
if(isset($m) && is_object($m)) {
$this->output = $m->output;
$this->title = $m->title;
$this->crumbs = $m->crumbs;
}
}
я сам в шоке как такое мог написать...
+164
$('#menu_block').each…
Дальше не смотрел.
+158
if (location.href.split('/')[4] == '14-0-0' | location.href.split('/')[4] == '14') {
$('#u1').attr({
class: 'tabv'
})
}
else if (location.href.split('/')[4] == '14-0-1') {
$('#u2').attr({
class: 'tabv'
})
}
else if (location.href.split('/')[4] == '14-0-0-1' || $('#PMtoUser').val()) {
$('#bar').hide();
$('#mess').css({
backgroundColor: '#fafafa'
});;
$('#mess').html('<div style="padding-top:30px;padding-bottom:30px;"><div id="valError2"></div><div id="valSuccess2"></div><div id="bmess"><div id="bmess2"><table width="100%"><tr><td align="left" valign="top"><div class="avaogets" style="margin-top:2px;"><img src='+noavatar+'></div></td><td width="100%" style="padding-left:15px;" align="left" valign="top"><div id="hname">Получатель</div><input type="text" id="nameSend"><div style="padding-top:9px;" id="hname">Тема</div><input type="text" id="tSend"></td></tr></table><textarea style="margin-top:10px;" id="message2"></textarea><div id="idCap" style="overflow:hidden;margin-top:3px;margin-left:1px;"><div style="float:left;" id="abbbb"></div><div style="float:right;"><input id="capval" maxlength="4" type="text"></div></div><div id="new_b" class="Mbd" style="margin-top:6px;" onclick="$(\'#sbm\').click()"><div id="new_b2">Отправить</div></div><div class="spanload" style="display:inline-block;padding-left:5px;"></div></div> </div></div>');
$('#u4').attr({
class: 'tabv'
})
}
Это и многое другое на http://uweb.su/js/new_message.js!
Смотрите в браузерах вашего компьютера!
+159
m_hSemaphore = CreateSemaphore( NULL, 1, 1, NULL );
....
void CTestGUIDlg::OnBnClickedButtonStartStream()
{
WaitForSingleObject(m_hSemaphore, INFINITE);
if(m_ThreadHandle)
{
AfxMessageBox("Stop running stream!", MB_ICONEXCLAMATION);
return;
};
m_ThreadHandle = NULL;
m_StreamType = 1;
m_ThreadHandle = (HANDLE)_beginthreadex(NULL,
0,
streamProcedure,
static_cast<LPVOID>( this ),
0,
NULL);
if(!m_ThreadHandle)
{
m_StreamType = 0;
}
UpdateButtons();
ReleaseSemaphore(m_hSemaphore, 1, NULL);
}
классика жанра