- 1
Warning: file_get_contents(http://www.bbc.co.uk/radio1/programmes/schedules.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/atomzone/public_html/beta/at0m.rss.class.php on line 65
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+122
Warning: file_get_contents(http://www.bbc.co.uk/radio1/programmes/schedules.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/atomzone/public_html/beta/at0m.rss.class.php on line 65
Случайно найдено на: http://atomzone.co.uk/beta/audio/Blue%20Sky%20Black%20Death
Я все понимаю, бета и все такое, но это же паблик бета...
+120
begin
if not directoryexists('input') then createdir('input');
if not directoryexists('output') then createdir('output');
if not directoryexists('temp') then createdir('temp');
if not directoryexists('temp\temp') then createdir('temp\temp');
if not directoryexists('temp\temp_') then createdir('temp\temp_');
if not directoryexists('temp\temp__') then createdir('temp\temp__');
if not directoryexists('temp\temp___') then createdir('temp\temp___');
if not directoryexists('temp\temp____') then createdir('temp\temp____');
if not directoryexists('temp\temp_____') then createdir('temp\temp_____');
if not directoryexists('temp\temp______') then createdir('temp\temp______');
if not directoryexists('temp\temp_______') then createdir('temp\temp_______');
if not directoryexists('temp\temp________') then createdir('temp\temp________');
if not directoryexists('temp\temp_________') then createdir('temp\temp_________');
if not directoryexists('temp\temp__________') then createdir('temp\temp__________');
if not directoryexists('temp\temp___________') then createdir('temp\temp___________');
if not directoryexists('temp\temp____________') then createdir('temp\temp____________');
if not directoryexists('temp\temp_____________') then createdir('temp\temp_____________');
if not directoryexists('temp\temp______________') then createdir('temp\temp______________');
if not directoryexists('temp\temp_______________') then createdir('temp\temp_______________');
if not directoryexists('temp\temp________________') then createdir('temp\temp________________');
print_('Вас приветствует программа для сортировки слвоарей True Sort');
print_('Если у вас есть какие-то вопросы по её работе - нажмите Help');
turbo:=false;
end;
Кинул знаковый в асю=\
+171
<?php
$visitor = $_SERVER['REMOTE_ADDR'];
if (preg_match("/217.66.26.85/",$visitor))
{header('Location: http://site.ru/page.html');}
?>
http://forum.searchengines.ru/showpost.php?p=7312251&postcount=1
+148
#include <cstdio>
#include <memory.h>
#define maxn 18
char c[maxn][maxn];
int d[1 << maxn];
int main()
{
freopen("network.in", "rt", stdin);
freopen("network.out", "wt", stdout);
int n; scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%s", c[i]);
memset(d, 0, sizeof(d));
for (int k = 0; k < (1 << n); k++)
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
if (c[i][j] == 'Y' && k & (1 << i) && k & (1 << j) && d[k - (1 << i) - (1 << j)] + 2 > d[k])
d[k] = d[k - (1 << i) - (1 << j)] + 2;
int max = 0;
for (int i = 0; i < (1 << n); i++)
if (d[i] > max)
max = d[i];
printf("%d\n", max);
return 0;
}
ACM-задачка на динамику по подмножествам.
Кто поймет, тому 5 ;)
+129
{{ object.xml_data.file.read|safe }}
{% if object.xml_data.file.close %}{% endif %}
Мой говнокод. Django template. Не хотелось писать отдельный view, забацал все в шаблоне + generic views. Лень страшная сила)
object.xml_data обычный FileField
+144
void get_tomorrow_date( struct timeval *date )
{
sleep( 86400 ); // 60 * 60 * 24
gettimeofday( date, 0 );
}
Программистский шедевр на индусском форуме на тему «как узнать завтрашнюю дату» остался непревзойденным.
+168
function endPanel()
{
if($this->type=="common" || $this->type=="common_blank")
{
?>
</div>
</div>
</div>
<?php
}
elseif($this->type=="common_short")
{
?>
</div>
</div>
</div>
<?php
}
elseif($this->type=="main" || $this->type=="main_small")
{
?>
</div>
</div>
<div class="bottom">
<div class="bottom-right"></div>
</div>
</div>
<?php
}
elseif($this->type=="light" || $this->type=="light_blank" || $this->type=="light_narrow")
{
?>
</div>
</div>
<div class="bottom">
<div class="bottom-right"></div>
</div>
</div>
<?php
}
}
Прислали на работе проект на доработку, мало того предыдущий программер не знает про разделение логики и представления, дак еще и такие штуки на каждом шагу встречаются
+156
<?php
if(true) {
...
}
else $blacklist_numbers_error="неверный тип файла";
?>
разбираю на работе код ><
+167
<?php
// Парсируем установочный файл
if(@parse_ini_file("../../phpshop/inc/config.ini",1))
$SysValue=parse_ini_file("../../phpshop/inc/config.ini",1);
elseif(@parse_ini_file("../../../phpshop/inc/config.ini",1))
$SysValue=parse_ini_file("../../../phpshop/inc/config.ini",1);
elseif(@parse_ini_file("../../../../phpshop/inc/config.ini",1))
$SysValue=parse_ini_file("../../../../phpshop/inc/config.ini",1);
else $SysValue=@parse_ini_file("../../../../../phpshop/inc/config.ini",1);
PHPShop
+118
void Say(bool work)
{
if (work)
{
r = new Random();
i = r.Next(100);
textBlock1.Text = i.ToString();
textBlock1.Dispatcher.BeginInvoke(new AsyncSay(this.Say), DispatcherPriority.SystemIdle, null);
}
}
void BtnSay_Click(object sender, RoutedEventArgs e)
{
Say(true);
}
private void BtnStopSay_Click(object sender, RoutedEventArgs e)
{
Say(false);
}