- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
if (0) {
unserialize ("");
is_bool ("");
is_array ("");
is_string ("");
is_integer ("");
is_float ("");
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 70
−10
if (0) {
unserialize ("");
is_bool ("");
is_array ("");
is_string ("");
is_integer ("");
is_float ("");
}
github.com/vk-com/kphp-kdb/blob/master/KPHP/functions.txt
−10
static void Alert(object text)
{
Console.WriteLine(text);
}
−10
static bool IsPalindrome( int value ) {
int reverseValue = 0;
if(value < 0) value = -value;
int tempValue = value;
int reverseValueTens = 1;
while(tempValue > 0) {
reverseValueTens *= 10;
tempValue /= 10;
}
reverseValueTens /= 10;
tempValue = value;
while(tempValue > 0) {
//Alert( reverseAbsValueAddition );
reverseValue += (tempValue - (tempValue/10)*10) * reverseValueTens;
reverseValueTens /= 10;
tempValue /= 10;
}
//Alert( reverseAbsValue );
return reverseValue == value;
}
−9
function delMessage(id,posted) {
if (confirm("Удалить сообщение от "+posted+" ?")) {
if('corporate'=='common')
{
window.location="/forum/theme/?id=22213&delmsg="+id;
}
else if ('corporate'=='olimpic')
{
window.location="/competitions/kazah/team/?teamId=0&tab=forum&themeId=22213&delmsg="+id;
}
else if ('corporate'=='city')
{
window.location="/city/?id=&tab=forum&themeId=22213&delmsg="+id;
}
else
{
window.location="/corporation/?id=1401150&tab=forum&themeId=22213&delmsg="+id;
}
}
}
function addMessage() {
document.messageForm.submit();
}
function closeMessage() {
var textarea=document.getElementById("messagetext");
if (textarea) textarea.value="";
var div=document.getElementById("submit");
if (div) div.style.display="none";
}
function showSubmit() {
showElement("submit");
}
function messageKeyDown(event) {
if (!event) event=window.event;
if (event.keyCode==13 && event.ctrlKey || event.keyCode==10) {
addMessage();
}
}
−7
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><nav</span> <span class="na">class=</span><span class="s">"navbar navbar-default"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"container-fluid"</span><span class="nt">></span>
<span class="c"><!-- Brand and toggle get grouped for better mobile display --></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"navbar-header"</span><span class="nt">></span>
<span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"navbar-toggle collapsed"</span> <span class="na">data-toggle=</span><span class="s">"collapse"</span> <span class="na">data-target=</span><span class="s">"#bs-example-navbar-collapse-1"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>Toggle navigation<span class="nt"></span></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
<span class="nt"></button></span>
<span class="nt"><a</span> <span class="na">class=</span><span class="s">"navbar-brand"</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Brand<span class="nt"></a></span>
<span class="nt"></div></span>
<span class="c"><!-- Collect the nav links, forms, and other content for toggling --></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"collapse navbar-collapse"</span> <span class="na">id=</span><span class="s">"bs-example-navbar-collapse-1"</span><span class="nt">></span>
<span class="nt"><ul</span> <span class="na">class=</span><span class="s">"nav navbar-nav"</span><span class="nt">></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"active"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>(current)<span class="nt"></span></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link<span class="nt"></a></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"dropdown"</span><span class="nt">></span>
<span class="nt"><a</span> <span class="na">href=</span><span class="s">"#"</span> <span class="na">class=</span><span class="s">"dropdown-toggle"</span> <span class="na">data-toggle=</span><span class="s">"dropdown"</span> <span class="na">role=</span><span class="s">"button"</span> <span class="na">aria-haspopup=</span><span class="s">"true"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>Dropdown <span class="nt"><span</span> <span class="na">class=</span><span class="s">"caret"</span><span class="nt">></span></a></span>
<span class="nt"><ul</span> <span class="na">class=</span><span class="s">"dropdown-menu"</span><span class="nt">></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Action<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Another action<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Something else here<span class="nt"></a></li></span>
<span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Separated link<span class="nt"></a></li></span>
<span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>One more separated link<span class="nt"></a></li></span>
<span class="nt"></ul></span>
<span class="nt"></li></span>
<span class="nt"></ul></span>
<span class="nt"><form</span> <span class="na">class=</span><span class="s">"navbar-form navbar-left"</span> <span class="na">role=</span><span class="s">"search"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"form-group"</span><span class="nt">></span>
<span class="nt"><input</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">class=</span><span class="s">"form-control"</span> <span class="na">placeholder=</span><span class="s">"Search"</span><span class="nt">></span>
<span class="nt"></div></span>
С сайта bootstrap
+81
mov podi,vilov
−12
for(j=1;j<=1;j++) {
$("#sharing_user > tbody > tr:last").append('<td><a href="//vk.com/id'+uid_remote_+'" target="_blank">' + real_name_ + '</a></td>');
$("#sharing_user > tbody > tr:last").append('<td><span class="glyphicon glyphicon-remove" onclick="javascript:delete_remote_control('+uid_remote_+');" style="cursor: pointer;" title="Удалить"></span></td>');
}
−8
if (table[0] == 1 && table[1] == 1 && table[2] == 1 ||
table[0] == 2 && table[1] == 2 && table[2] == 2 ||
table[3] == 1 && table[4] == 1 && table[5] == 1 ||
table[3] == 2 && table[4] == 2 && table[5] == 2 ||
table[6] == 1 && table[7] == 1 && table[8] == 1 ||
table[6] == 2 && table[7] == 2 && table[8] == 2 ||
table[0] == 1 && table[4] == 1 && table[8] == 1 ||
table[0] == 2 && table[4] == 2 && table[8] == 2 ||
table[2] == 1 && table[4] == 1 && table[6] == 1 ||
table[2] == 2 && table[4] == 2 && table[6] == 2 ||
table[0] == 1 && table[3] == 1 && table[6] == 1 ||
table[0] == 2 && table[3] == 2 && table[6] == 2 ||
table[1] == 1 && table[4] == 1 && table[7] == 1 ||
table[1] == 2 && table[4] == 2 && table[7] == 2 ||
table[2] == 1 && table[5] == 1 && table[8] == 1 ||
table[2] == 2 && table[5] == 2 && table[8] == 2)
Боже, Крис! Они же ещё дети.
+2
bool compareArrays(int[] a,int[] b)
{
if(a.Length != b.Length)
return false;
for(int i = 0;i<a.Length;i++)
if(a[i] != b[i])
return false;
return true;
}
Нобелевская премия по программированию
+1
Верните мой WCT!