- 1
- 2
- 3
if (f > 1) { }
else
chart5.Series[1].Points.AddXY(i, f);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+128
if (f > 1) { }
else
chart5.Series[1].Points.AddXY(i, f);
Было замечено за коллегой
+131
/*
=====================
Q_acos
the msvc acos doesn't always return a value between -PI and PI:
int i;
i = 1065353246;
acos(*(float*) &i) == -1.#IND0
This should go in q_math but it is too late to add new traps
to game and ui
=====================
*/
Астрологи объявили неделю Деда Лайна - количество говнокода и костылей увеличилось вдвое.
+134
ok = r.nextInt(prob) <= prob
рассчитываем вероятность события...
+147
\\Editing source code? CHEATER! CHEATER!
$ps =100
$time = $ps + $time
echo $time
\\The end.
Я один нашёл ошибку?
+130
Java programming class.
A boy and a girl were sitting in a Java programming class together. He reached over and grabbed her breast. She said: "Hey, that's private". He looked confused and said: "I thought we were in the same class"
Оффтоп, ржака, ебмп.
+160
$result = (string)(int)false;
+118
f g l = hylo l (.) (\n -> (g, n-1)) (==0)
Этот пример использует hylomorphism.
Композируем функцию типа (.) g(l) пока не наступит n==0
−91
def dubliSert(): #Проверка дублей Сертификата
dsn = cx_Oracle.makedsn(ip, 1521, '###' )
db = cx_Oracle.connect(LOGIN, PASSWORD, dsn)
f1 = open("text1.txt")
x = f1.readline()
x1 = f1.readline()
x2 = f1.readline()
x3 = f1.readline()
x4 = f1.readline()
x5 = f1.readline()
x6 = f1.readline()
x7 = f1.readline()
x8 = f1.readline()
x9 = f1.readline()
x10 = f1.readline()
x11 = f1.readline()
x12 = f1.readline()
x13 = f1.readline()
x14 = f1.readline()
x15 = f1.readline()
x16 = f1.readline()
x17 = f1.readline()
x18 = f1.readline()
x19 = f1.readline()
x20 = f1.readline()
#x20 = x20.decode("utf-8")
x20 = x20[:-1]
x20 = x20.replace(' ','')
x20 = int(x20, 16)
#print x20
f1.close()
cu = my_cursor=db.cursor()
cu.execute((u"select * from {} where dscertificate_serial like '{}'").format(TABLE, x20))
No comments
+154
var setLeadingZero = function(val) {
if (val.toString().length == 1)
return '0' + val;
else
return val;
}
"Но работает же"
+131
xlApp = new Excel.Application();
try
{
xlApp.Workbooks.Add(Type.Missing);
xlApp.Interactive = false;
xlApp.EnableEvents = false;
xlSheet = (Excel.Worksheet)xlApp.Sheets[1];
xlSheet.Name = "Данные";
DataTable dt = GetData();
int collInd = 0;
int rowInd = 0;
string data = "";
for (int i = 0; i < dt.Columns.Count; i++)
{
data = dt.Columns[i].ColumnName.ToString();
xlSheet.Cells[1, i + 1] = data;
xlSheetRange = xlSheet.get_Range("A1:Z1", Type.Missing);
xlSheetRange.WrapText = true;
xlSheetRange.Font.Bold = true;
}
for (rowInd = 0; rowInd < dt.Rows.Count; rowInd++)
{
for (collInd = 0; collInd < dt.Columns.Count; collInd++)
{
data = dt.Rows[rowInd].ItemArray[collInd].ToString();
xlSheet.Cells[rowInd + 2, collInd + 1] = data;
}
}
xlSheetRange = xlSheet.UsedRange;
xlSheetRange.Columns.AutoFit();
xlSheetRange.Rows.AutoFit();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
xlApp.Visible = true;
xlApp.Interactive = true;
xlApp.ScreenUpdating = true;
xlApp.UserControl = true;
releaseObject(xlSheetRange);
releaseObject(xlSheet);
releaseObject(xlApp);
}