- 1
- 2
- 3
- 4
- 5
private void PaintStringInRegionPrivate (Graphics Img, clsPoint StartPoint, string Value, bool isCenter, List<colLine> OutRegions)
{
colLine Result = new colLine (4);
....
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+149
private void PaintStringInRegionPrivate (Graphics Img, clsPoint StartPoint, string Value, bool isCenter, List<colLine> OutRegions)
{
colLine Result = new colLine (4);
....
}
Обратите внимание на возвращаемый ф-цией тип :)
Ребят, а тут можно аккаунты заводить? - мы бы знаменитыми стали (:
+182
ini_set('register_globals','on');// хуй с ними.
+152
if currIndex=2 then
begin
// разкрываем выделенные узлы
TreeView_U.Items[r].Expanded:=true;
if TreeView_U.Items[r].Parent <> nil then
begin
TreeView_U.Items[r].Parent.Expanded:=true;
if TreeView_U.Items[r].Parent.Parent <> nil then
begin
TreeView_U.Items[r].Parent.Parent.Expanded:=true;
if TreeView_U.Items[r].Parent.Parent.Parent <> nil then
TreeView_U.Items[r].Parent.Parent.Parent.Expanded:=true;
end;
end;
Наткнулся тут в прокете. Поначалу просто кусок закоментировал не разбираясь, потому что просто не нужен. Суть - попытка раскрыть полностью ветвь дерева, если в ней есть хоть один выбранный (с помеченным чекбоксом) элемент, о чём говорит currIndex=2.
Весь офис валяется под столами :)))
+142
void NaturNum (unsigned N)
{
if (N) printf("%i \n", N);
if (N > 0) NaturNum (N-1);
}
Лекция, тема про рекурсивные функции, функция вывода ряда натуральных чисел. Институт между прочим. Пары посещаем ради лулзов :).
PS Препод принципиально не пишет cin и cout.
+143
function lol ($lol)
{
echo $lol;
}
$lol = 'lol';
lol ($lol);
lol
+110.7
if (typ == 4) // Это ножницы
if (mirror == 0)
Size_N = " " + (beems[1].LenghtE - (int)dd[0]["value"]).ToString() + "0";
else
Size_N = " " + (mirror - (beems[1].LenghtE - (int)dd[0]["value"])).ToString() + "0";
else
{ // Это механизм
if (typ == 0 || typ == 2 || typ == 3)
{
if (mirror == 0)
Size_M = (((int)tRow["len"] / 2 + (beems[0].LenghtE / 2 - (int)dd[0]["value"]))).ToString() + "0";
else
Size_M = (mirror - ((int)tRow["len"] / 2 + (beems[0].LenghtE / 2 - (int)dd[0]["value"]))).ToString() + "0";
}
else
if (mirror == 0)
Size_M = (beems[0].LenghtE - (int)dd[0]["value"]).ToString() + "0";
else
Size_M = (mirror - (beems[0].LenghtE - (int)dd[0]["value"])).ToString() + "0";
if (typ == 0 || typ == 2 || typ == 3)
{
if (mirror == 0)
Size_M += " " + (beems[0].LenghtE - (int)dd[0]["value"] * 2).ToString() + "0";
else
Size_M += " " + (mirror - (beems[0].LenghtE - (int)dd[0]["value"] * 2)).ToString() + "0";
}
else
Size_M += " 0";
}
Формирование чего то для чего то..
+189.5
$r1=mt_rand(0,9);
$r2=mt_rand(0,9);
$r3=mt_rand(0,9);
$r4=mt_rand(0,9);
$r5=mt_rand(0,9);
$r6=mt_rand(0,9);
$r7=mt_rand(0,9);
$r8=mt_rand(0,9);
$r9=mt_rand(0,9);
$result=$id.$r1.$r2.$r3.$r4.$r5.$r6.$r7.$r8.$r9;
print $notvalid.$result;
$rest1=substr($result,0,-14);
$rest2=substr($result,2,-12);
$rest3=substr($result,4,-10);
$rest4=substr($result,6,-8);
$rest5=substr($result,8,-6);
$rest6=substr($result,10,-4);
$rest7=substr($result,12,-2);
$rest8=substr($result,-1);
$ddos1=substr($result,1,-13);
$ddos2=substr($result,3,-11);
$ddos3=substr($result,5,-9);
$ddos4=substr($result,7,-7);
$ddos5=substr($result,9,-5);
$ddos6=substr($result,11,-3);
$ddos7=substr($result,13,-1);
$dos1=$rest1*2;
$dos2=$rest2*2;
$dos3=$rest3*2;
$dos4=$rest4*2;
$dos5=$rest5*2;
$dos6=$rest6*2;
$dos7=$rest7*2;
$dos8=$rest8*2;
if ($dos1>=10) {
$doss1=$dos1-9;
} else {
$doss1=$dos1;
}
if ($dos2>=10) {
$doss2=$dos2-9;
} else {
$doss2=$dos2;
}
if ($dos3>=10) {
$doss3=$dos3-9;
} else {
$doss3=$dos3;
}
if ($dos4>=10) {
$doss4=$dos4-9;
} else {
$doss4=$dos4;
}
if ($dos5>=10) {
$doss5=$dos5-9;
} else {
$doss5=$dos5;
}
if ($dos6>=10) {
$doss6=$dos6-9;
} else {
$doss6=$dos6;
}
if ($dos7>=10) {
$doss7=$dos7-9;
} else {
$doss7=$dos7;
}
if ($dos8>=10) {
$doss8=$dos8-9;
} else {
$doss8=$doss8;
}
$res1=$doss1+$doss2+$doss3+$doss4+$doss5+$doss6+$doss7+$doss8;
$res2=$ddos1+$ddos2+$ddos3+$ddos4+$ddos5+$ddos6+$ddos7;
$rez=$res1+$res2;
print $magic.$rez.'<br>';
$d=$rez%10;
if ($d==0) {
print $valid.$result.$d;
} else {
$k1=$rez+1;
$k2=$rez+2;
$k3=$rez+3;
$k4=$rez+4;
$k5=$rez+5;
$k6=$rez+6;
$k7=$rez+7;
$k8=$rez+8;
$k9=$rez+9;
ааааа пиздец!!!11
+153
Bool IsNumber (string str) {
return (str.Replace ("0", "").Replace ("1", "").Replace ("2", "").Replace ("3", "").Replace ("4", "").Replace ("5", "").Replace ("6", "").Replace ("7", "").Replace ("8", "").Replace ("9", "").Length == 0);
}
Где-то находил. Вроде это на Java
+140.5
#include <numeric>
#include <algorithm>
#include <iostream>
#include <functional>
#include <boost/iterator/counting_iterator.hpp>
int main()
{
std::cout << std::accumulate(boost::make_counting_iterator(2), boost::make_counting_iterator(8), 1, std::multiplies<int>());
return 0;
}
+153.8
for($i=0;$i<10;$i++){
$tf2[rand(0,count($tf2)-1)][2]-=$tf1[rand(0,count($tf1)-1)][1];
$tf1[rand(0,count($tf1)-1)][2]-=$tf2[rand(0,count($tf2)-1)][1];
}
Долго не мог понять, что этот кусок делает.