- 1
';alert(0)//\';alert(1)//";alert(2)//\";alert(3)//--></SCRIPT>"">'><SCRIPT>alert(4)</SCRIPT>=&{}"");}alert(6);function xss(){//"
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+14
';alert(0)//\';alert(1)//";alert(2)//\";alert(3)//--></SCRIPT>"">'><SCRIPT>alert(4)</SCRIPT>=&{}"");}alert(6);function xss(){//"
';alert(0)//\';alert(1)//";alert(2)//\";alert(3)//--></SCRIPT>"">'><SCRIPT>alert(4)</SCRIPT>=&{}"");}alert(6);function xss(){//"
+10.6
private void UpdateLabel(string str)
{
if (str == "!0123clear3210!")
{
textBox1.Clear();
return;
}
textBox1.AppendText(str);
}
а иногда стираем
+3.4
if ((armid == "3504000036") || (armid == "3504000034"))
{
if (armid == "3504000036")
{
PlaceSave = "3243100001";
}
if (armid == "3504000034")
{
PlaceSave = "2311030001";
}
}
Нет слов, одни эмоции
+27
volumes = new List<VolumeInformation>(ServerTypedProxy.GetUnfilteredVolumeInformationList())
.ConvertAll<BindableVolumeInfo>(delegate(VolumeInformation vi) { return new BindableVolumeInfo(vi); });
Из разряда попробуй отдебажь
[Ф]
+21
TabToShow currentTabToShowInShortForm = tab;
string currentTemplateNameToShowInShortForm = templateName;
currentShortFormToShow = new ShortForm(currentTabToShowInShortForm, currentTemplateNameToShowInShortForm);
Чем длиннее названия переменных, тем солиднее выглядит код
[Ф]
+26
if (Program.showLoginDialog &&
clientVersion != serverVersion &&
DialogResult.No == MessageBox.Show
(
String.Format
(
"The version {0} of the Server does not match the version of the Client {1}. Would you like to proceed?",
serverVersion, clientVersion
),
"Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning
)
)
MessageBox показывается в if
[Ф]
+16.8
return typeof(Nullable<>).MakeGenericType(new Type[] { valueType }).GetConstructor(new Type[] { valueType }).Invoke(new object[] { value });
У афтора было желание сэкономить строчки кода
[Ф]
+25
DateTime startTime = DateTime.Now;
DateTime endTime = DateTime.Now;
foreach (BillablePhas bi in CreateBillablePhaseForFixedPrice.Phases)
{
if (BillablePhase.Equals(bi))
{
errorLbl.Visible = true;
savedLbl.Visible = false;
TimeSpan spread = endTime - startTime; //пик быдлокода
bi.RatioSpredDateTime = Math.Ceiling(Convert.ToDouble(spread.Days*bi.Ratio/100));
}
}
endTime - startTime АААА!!!
+15
if (ValidatorBillablePhase())
{
// строк 40-50 кода
}
private static bool ValidatorBillablePhase()
{
return true;
}
я в шоке от такой валидации ;-)
+3
public void SetDirty()
{
ViewState.SetDirty(false);
}
Отличное название для функции ;-)