- 1
createCanvas(); // create canvas!
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+123
createCanvas(); // create canvas!
Комментарии от Кэпа.
−131
alter table EqualityCodes add constraint chk_EqualityCodes_Code
check (Code not in ('', ' ', ' ', ' ', ' ', ' ', ' ', ' '));
−22
class TFunctorMap
{
public:
typedef bool (*TFunctor)(const TSentenceList&, unsigned short &);
private:
std::map<char, TFunctor> _functorMap;
public:
TFunctorMap(void)
{
_functorMap.insert(std::make_pair('g', &RZC));
_functorMap.insert(std::make_pair('t', &STN));
_functorMap.insert(std::make_pair('d', &RTC));
}
TFunctor GetFunctor(const char Key)
{
if (_functorMap.find(Key) == _functorMap.end())
return NULL;
return _functorMap[Key];
}
};
+141
string Signal = Console.ReadLine();
Console.WriteLine(Convert.ToString(bool.Parse(Signal))); //НУ НАХУЯ?!?!?
Для непонятных: Автор говна создает переменную типа string и записывает туда введенную в консоли строку, после он нехилым образом вызывает метод Parse который из string переводит в bool, а потом этот поносопроггер переконвертирует полученную переменную типа bool в переменную типа string. Ну нахуя спрашивается????
+160
<button type='button' id='button-download'>download zipfile</button>
$("#button-download").live("click", function() {
$.get("http://localhost/admin/zip/002140.zip"); // doesn't work?
})
Ссылка на скачивание файла, современный вариант.
+83
$v = (((bool) $v) ? true : false);
−282
NSArray *beautifulValues = [[NSArray alloc] initWithObjects:
[NSNumber numberWithFloat:0.00001],
[NSNumber numberWithFloat:0.00005],
[NSNumber numberWithFloat:0.0001],
[NSNumber numberWithFloat:0.005],
[NSNumber numberWithFloat:0.001],
[NSNumber numberWithFloat:0.005],
[NSNumber numberWithFloat:0.01],
[NSNumber numberWithFloat:0.05],
[NSNumber numberWithFloat:0.1],
[NSNumber numberWithFloat:0.5],
[NSNumber numberWithFloat:1],
[NSNumber numberWithFloat:5],
[NSNumber numberWithFloat:10],
[NSNumber numberWithFloat:50],
[NSNumber numberWithFloat:100],
[NSNumber numberWithFloat:500],
[NSNumber numberWithFloat:1000],
[NSNumber numberWithFloat:5000],
[NSNumber numberWithFloat:10000],
[NSNumber numberWithFloat:50000],
[NSNumber numberWithFloat:100000],
[NSNumber numberWithFloat:500000],
[NSNumber numberWithFloat:1000000],
[NSNumber numberWithFloat:5000000],
[NSNumber numberWithFloat:10000000], nil];
Нашел в одном из проектов.
+155
<style type="text/css">
#1{display:<script type="text/javascript">if(NextStrInfo(1) == 1){document.write("block");}else{document.write("none");}</script>;}
#2{display:<script type="text/javascript">if(NextStrInfo(2) == 1){document.write("block");}else{document.write("none");}</script>;}
</style>
Замечено на форуме.
+958
public int RomeToArab (string str)
{
int[] arabian = new int[13] { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };
strint[] rome = new string[13] { "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I" };
int n = 0;
int i = 0;
do
{
if (str.StartsWith(rome[i]))
{
n = n + arabian[i];
str = str.Substring(rome[i].Length, str.Length - rome[i].Length);
}
if (!str.StartsWith(rome[i])
i++;
}
while (i < 13);
return n;
}
+110
this.pictureBox14.BeginInit();
this.pictureBox15.BeginInit();
this.pictureBox15.BeginInit();
this.pictureBox21.BeginInit();
this.pictureBox21.BeginInit();
this.pictureBox22.BeginInit();
this.pictureBox22.BeginInit();
this.pictureBox23.BeginInit();
this.pictureBox23.BeginInit();
this.pictureBox24.BeginInit();
this.pictureBox24.BeginInit();
this.pictureBox16.BeginInit();
this.pictureBox16.BeginInit();
this.pictureBox17.BeginInit();
this.pictureBox17.BeginInit();
this.pictureBox18.BeginInit();
this.pictureBox18.BeginInit();
this.pictureBox19.BeginInit();
this.pictureBox19.BeginInit();
this.pictureBox20.BeginInit();
this.pictureBox20.BeginInit();
this.pictureBox9.BeginInit();
this.pictureBox9.BeginInit();
this.pictureBox6.BeginInit();
this.pictureBox6.BeginInit();
this.pictureBox5.BeginInit();
this.pictureBox5.BeginInit();
this.pictureBox7.BeginInit();
this.pictureBox7.BeginInit();
this.pictureBox10.BeginInit();
this.pictureBox10.BeginInit();
this.panel1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
this.SuspendLayout();
this.panel3.Location = new Point(140, 36);
this.panel3.Location = new Point(140, 36);
this.panel3.Name = "panel3";
this.panel3.Name = "panel3";
this.panel3.Size = new Size(740, 436);
this.panel3.Size = new Size(740, 436);
this.panel3.TabIndex = 4;
this.panel3.TabIndex = 4;
this.panel3.MouseDown += new MouseEventHandler(this.panel3_MouseDown);
this.panel3.MouseDown += new MouseEventHandler(this.panel3_MouseDown);
this.panel3.MouseUp += new MouseEventHandler(this.panel3_MouseUp);
this.panel3.MouseUp += new MouseEventHandler(this.panel3_MouseUp);
this.pictureBox2.BackColor = Color.Gray;
this.pictureBox2.BackColor = Color.Gray;
this.pictureBox2.Location = new Point(-11, 0);
this.pictureBox2.Location = new Point(-11, 0);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new Size(938, 36);
this.pictureBox2.Size = new Size(938, 36);
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false;
this.pictureBox2.TabStop = false;
this.pictureBox3.BackColor = Color.Gray;
this.pictureBox3.BackColor = Color.Gray;
this.pictureBox3.Location = new Point(880, 12);
this.pictureBox3.Location = new Point(880, 12);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new Size(36, 466);
this.pictureBox3.Size = new Size(36, 466);
this.pictureBox3.TabIndex = 0;
this.pictureBox3.TabIndex = 0;
this.pictureBox3.TabStop = false;
this.pictureBox3.TabStop = false;
this.pictureBox1.BackColor = Color.Gray;
this.pictureBox1.BackColor = Color.Gray;
this.pictureBox1.Location = new Point(-4, 472);
this.pictureBox1.Location = new Point(-4, 472);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new Size(938, 36);
this.pictureBox1.Size = new Size(938, 36);
this.pictureBox1.TabIndex = 0;
Полная версия: http://pastebin.com/KwDzLR4s