- 1
- 2
- 3
ibox.com.ua/
ibox.com.ua/index.php
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+121
ibox.com.ua/
ibox.com.ua/index.php
Решил тут найти почитать что можно пополнить через терминал ibox. Там флешка и закрыть ее я не нашел где... ну ради прикола на index.php ринулся.
На сервере установлен PHP версии 5.1.6, однако для WordPress 3.3.1 требуется хотя бы 5.2.4.
Ну вот скажите разве такая прибыльная компания не может себе нормальный сайт заказать?
+121
final List<OrderSpecifier<?>> orderBy = ImmutableList.<OrderSpecifier<?>>of(
// Whoa! Sorting by four columns. We really are insane.
q.urgent.desc(),
q.queued.desc(),
q.receiver.asc(),
q.created.desc());
Заказчик попросил.
+121
// Getting first account data and binding it to control
List<string> cardList = new List<string>();
List<string> permissionList = new List<string>();
string x1 = "";
string x2 = "";
string x3 = "";
string x4 = "";
string x6 = "";
string x7 = "";
string x8 = "";
try
{
x8 = getCardNumberByAccountNumber(CustAcc1.Text);
}
catch { }
GetAllCustomerAccountValue(de_ca1, ref x1, ref x2, ref x3, ref x4, ref cardList, ref permissionList, ref x6, ref x7, ref x8); //, ref x2, ref x3, ref x4, ref cardList, ref x5, ref x6, ref x7, ref x8);
FormCustomerAccount1.accountNum = x1;
FormCustomerAccount1.fullName = x2;
FormCustomerAccount1.streetBuild = x3;
FormCustomerAccount1.postalCode = x4;
FormCustomerAccount1.creditNote = x6;
FormCustomerAccount1.accountBalance = x7;
FormCustomerAccount1.cards = cardList;
FormCustomerAccount1.permissions = permissionList;
(
+121
DELPHP
PHI
+121
private void txtModel_KeyPress(object sender, KeyPressEventArgs e)
{
if (getTag() == 3)
{
if (e.KeyChar != 8 && (e.KeyChar < 97 || e.KeyChar > 122) && (e.KeyChar < 65 || e.KeyChar > 90) && e.KeyChar < 192 && e.KeyChar != 37 && e.KeyChar != 63 && e.KeyChar != 42 && e.KeyChar != 91 && (e.KeyChar < 93 || e.KeyChar > 95) && e.KeyChar != 94 && e.KeyChar != 33)
{ e.Handled = true; }
}
else
{
if (e.KeyChar != 8 && (e.KeyChar < 97 || e.KeyChar > 122) && (e.KeyChar < 65 || e.KeyChar > 90) && e.KeyChar < 192)
{
e.Handled = true;
}
}
}
Очередной говнокод: проверка на ввод в текстовом поле, проверяется если форма вызвана для поиска, то допускаются символы шаблона, если нет, то только буквы в любом регистре, и так далее по всем полям формы проверяется
+121
// This is de facto a Map<Integer, Long> because SUM() returns longs, but
// QueryDSL's type inference makes a fluke here and thinks sum() is an Integer.
// So the return type is Map<Integer, Integer>. Aren't generics fun?
final Map<Integer, ? extends Number> map =
dsl.from(q).where(q.department.eq(params.getDepartment()), q.quantity.ne(0),
q.action.in(UserAction.ORDER_ENGRAVE, UserAction.ORDER_STOCK_WASTAGE,
UserAction.ORDER_INVOICE, UserAction.ORDER_STOCK_ADJUSTMENT),
QueryDsl.subFrom(q2).where(q2.order.eq(q.order), q2.timestamp.goe(interval.getA()),
q2.timestamp.lt(interval.getB()),
q2.action.in(UserAction.ORDER_ENGRAVE, UserAction.ORDER_STOCK_WASTAGE,
UserAction.ORDER_INVOICE, UserAction.ORDER_STOCK_ADJUSTMENT)).exists())
.groupBy(q.order.id).having(q.quantity.sum().gt(0)).map(q.order.id, q.quantity.sum());
+121
public class MainSetting
{
// ...
public void Load(out MainSetting objectToDeserialise) {...}
// ...
}
Использвоание: _mainSetting.Load(out _mainSetting);
+121
private void textBox1_TextChanged(object sender, EventArgs e)
{
if ((textBox1.Text + textBox2.Text).Length + 1 > 255)
{
textBox1.BackColor = Color.LightPink;
textBox2.BackColor = Color.LightPink;
}
else
{
textBox1.BackColor = Color.White;
textBox2.BackColor = Color.White;
}
if ((textBox3.Text + textBox6.Text).Length + 1 > 255)
{
textBox3.BackColor = Color.LightPink;
textBox6.BackColor = Color.LightPink;
}
else
{
textBox3.BackColor = Color.White;
textBox6.BackColor = Color.White;
}
}
private void bntSave_Click(object sender, EventArgs e)
{
if (textBox1.BackColor == Color.LightPink)
{
MessageBox.Show("Длинна полей От и Адрес в сумме не должна превышать 255");
return;
}
if (textBox3.BackColor == Color.LightPink)
{
MessageBox.Show("Длинна полей Кому и Адрес в сумме не должна превышать 255");
return;
}
Properties.Settings.Default.Save();
Navigator.Navigate(new ConfigMenuPage());
}
ТЗ: "Суммарная длина полей X и Y не должна превышать 255 символов"
Решение шедеврально как по вычислению длинны суммы строк, так и по цветовой идентификации :)
+121
$ df -k /
/ (/dev/vgroot/lvol3 ) : 2083856 total allocated Kb
1701112 free allocated Kb
382744 used allocated Kb
18 % allocation used
HP-UX. вывод df (disk free) тулзы. почти все тратят минут пять на чтение вывода, пытаясь понять смысл "free allocated" и ту тонкую разницу которая отличает это выражение от "used allocated".
+121
ворд генерирует.......
@font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2;
... понос??? WTF????
Понос :)