- 1
- 2
- 3
- 4
// I am not responsible of this code.
// They made me write it, against my will.
double penetration;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+191
// I am not responsible of this code.
// They made me write it, against my will.
double penetration;
http://community.livejournal.com/programmers_fun/65300.html
+143
#include "StdAfx.h"
#include <stdio.h>
#include <conio.h>
#include <Windows.h>
int main()
{
int hs, hr, ms, mr, resulth, resultm;
printf("-----------------------------------\n------ Counting machine 3000 ------ \n \n");
printf("Write start time: ");
scanf("%d %d", &hs, &ms);
printf("Write time on the road: ");
scanf("%d %d", &hr, &mr);
printf("Expect to perform a calculation...\n");
Sleep(4000);
resulth=hs+hr;
resultm=ms+mr;
while (resulth>=24)
{
resulth=resulth-24;
}
if (resultm>=60)
{
resultm=resultm-60;
resulth++;
}
printf("Done! You'll reach your destination at ", "%d", resulth, ":", "%d", resultm, ".");
printf("%d", resulth);
printf(":");
printf("%d", resultm, ".");
printf(".");
printf("\n\n-----------------------------------");
int i;
scanf("%d", &i);
return 0;
}
«Время отправления и время прибытия поезда задаются в виде Ч М, где Ч - час от 0 до 23, М - минута от 0 до 59. Время в пути задаётся аналогично в формате Ч М, где Ч - количество часов от 0 до 999, а М - количество минут от 0 до 59.
Требуется по данному времени отправления и времени в пути вычислить время прибытия поезда (возможно, в другие сутки).»
+134
http://www.uae-embassy.ru/index2.htm
Сайт !!!!! ПОСОЛЬСТВА ОАЭ !!!!! в Москве.
зацените внешний вид. внутри вобщем-то не лучше:)
+144
<!-- Редактировать/удалить -->
<ul class="action">
<!-- говнокод --><li style="display: none;"></li><!-- /говнокод -->
{if $oUserCurrent and ($oUserCurrent->getId()==$oTopic->getUserId() or $oUserCurrent->isAdministrator() or $oBlog->getUserIsAdministrator() or $oBlog->getUserIsModerator() or $oBlog->getOwnerId()==$oUserCurrent->getId())}
<li class="edit"><a href="{cfg name='path.root.web'}/{$oTopic->getType()}/edit/{$oTopic->getId()}/" title="{$aLang.topic_edit}">{$aLang.topic_edit}</a></li>
{/if}
{if $oUserCurrent and ($oUserCurrent->isAdministrator() or $oBlog->getUserIsAdministrator() or $oBlog->getOwnerId()==$oUserCurrent->getId())}
<li class="delete"><a href="{router page='topic'}delete/{$oTopic->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" title="{$aLang.topic_delete}" onclick="return confirm('{$aLang.topic_delete_confirm}');">{$aLang.topic_delete}</a></li>
{/if}
</ul>
3-я строчка.
/me выдал (: Видимо лень было думать и оборачивать IF'ом, а валидацию не проходило без <li> внутри <ul>. Понадобилось время, чтобы понять свой же говнокод.
+144
}
}
}
}
}
}
}
}
}
}
Да, у нас есть и такое.
+150
function countdown() {
var today = new Date();
var start = new Date();
start.setTime(Math.ceil(Время ближайшей трансляции будет скоро объявлено * 1000));
var remains = new Date();
remains.setTime(start - today);
//window.status = remains;
var d = remains.getUTCDate() - 1;
var h = remains.getUTCHours();
var m = remains.getUTCMinutes();
d = textize(d, 'день', 'дня', 'дней');
h = textize(h, 'час', 'часа', 'часов');
m = textize(m, 'минуту', 'минуты', 'минут');
if (remains.getUTCHours() == 0 && remains.getUTCMinutes() < 5) {
document.getElementById('remains').innerHTML="Трансляция начнется с минуты на минуту";
} else if (remains.getTime() < 0) {
document.getElementById('remains').innerHTML="Трансляция идет";
//if (!document.getElementById('hll')) {
// location.reload(true);
//}
} else {
document.getElementById('remains').innerHTML="Ближайшая трансляция — через <b>"+d+" "+h+" "+m+"</b>";
}
t = setTimeout('countdown()',500);
}
взято с сайта http://kultu.ru/
+162
function drawdate(stamp,DD,MM,YY,hh,mm,ss) {
dte = new Date();
dates = new Array('января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря');
days = new Array('в воскресенье','в понедельник','во вторник','в среду','в четверг','в пятницу','в субботу');
if (stamp > 0) {dte.setTime(stamp*1000+dte.getTimezoneOffset()*60000);}
else {
dte.setSeconds(ss);
dte.setDate(DD);
dte.setMonth(MM-1);
dte.setFullYear(YY);
dte.setMinutes(mm);
dte.setHours(hh);
dte.setTime(dte.getTime())
}
document.write('Написано '+days[dte.getDay()]+', '+dte.getDate()+' '+dates[dte.getMonth()]+' '+dte.getFullYear()+' года, в '+an(dte.getHours())+':'+an(dte.getMinutes()));
}
.......................а вызываем всегда так:
<script><!--
drawdate(1278053495,02,7,2010,10,51,35);
//--></script>
код воняет тут:
http://newwave.hoha.ru/maxim_axenov/guestbook/
+187
function length(obj){
var y = 0;
for(var i = 0; i < obj.length; i++) y++;
return y;
}
+144
<a href="/" id="ctl00_ctl00_ctl00_ctl00_ctl11_ctl00_ctl02_ctl00_ctl00_aLogo"> <img height="90" width="138" class="logo" src="/upload/images/design/i/logo.gif" title="МТС" alt="МТС" id="logo"/></a>
view-source:
http://www.mts.ru/messaging/sendsms/
среди прочего прочего акуя
−162
>>> mylist = [3,5,8,5,3,12]
>>> print dict().fromkeys(mylist).keys()
[8, 3, 12, 5]
"Getting rid of duplicate items in a list" типа способ убрать дубликаты в списке