- 1
- 2
- 3
- 4
- 5
- 6
// заполнить кадр на пересылку
for (i = 1; i<frame[0]; i++)
{ sciOutFrame[i] = frame[i];}
// Установим длину кадра ( в первый байт кадра )
sciOutFrame[0] = i;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+135
// заполнить кадр на пересылку
for (i = 1; i<frame[0]; i++)
{ sciOutFrame[i] = frame[i];}
// Установим длину кадра ( в первый байт кадра )
sciOutFrame[0] = i;
+75
try {
try{
BasicFormatKeywordsReader keyRep = new BasicFormatKeywordsReader(new ExcelBook(fileName),keywordName,sheetName);
keyRep.readKeywords(keyword);
} catch (Throwable ex){
throw new TestCaseException("Can't initialize flow",ex);
}
for(Executable executable:keyword.getChildren()) {
executable.execute(getRequest());
}
} catch (TestCaseException ex) {
throw ex;
} catch (Throwable ex){
throw new TestCaseException(ex);
}
Талантливо!
+92
double e1 = (((-Data[65021] + 1.25) / 2) > 0) && (((-Data[65021] + 1.25) / 2) < 6) ? 180 * Math.Acos(((-Data[65021] + 1.25) / 2) / 6.07) / Math.PI : 90;
Просто вычисляется в одну строчку угол. В алгоритме расчета параметров тех.процесса.
+155
ISQ.Data.checkString=function(e,f){
var d=true;
switch(f){
case"email":
var a=/^[\w-_\&.]+\@([\w-_]+\.[\w-_]+){1,3}$/;
var g=new RegExp("[~!#$%^&*()=''\"\\/><?[]{}|]","g");
return(e.search(g)===-1)&&(e.match(a))&&(e!=="");
break;
case"number":
var b=/^[-]?[0-9]+\.?[0-9]?$/;
return b.test(e);
break;
case"username":
var c=new RegExp(".+@.+");
return(c.test(e));
break;
case"url":
var c=new RegExp("^https?://([a-zA-Z0-9]+.){1,}[a-zA-Z0-9]+");
return(c.test(e));
break
}
return d
}
// Функция универсальной валидации.
// (Но незадолго до того было еще и)
ISQ.Data.getEmailAddress=function(e){
var a=/[\w-_\&.]+\@[\w-_]+\.+[\w-_.]+/g;
var d=e.match(a);
if(d===null||d.length===0){
return null
}
var f=new RegExp();
f.compile("[~!#$%^&*()=`'\"\\/><?[]{}|]","g");
var b=new Array();
for(var c=0;c<d.length;++c){
if(d[c].search(f)===-1){
b.push(d[c])
}
}
return b
}
Еще одна творческая работа.
+141
foreach ($collector as $valuev) {
Очепятка.
+101
private void FillLocalService(int SelectedPageIndex)
{
//Set category by search
string search = inputSearch.Value == inputSearchValue ? string.Empty : inputSearch.Value;
if (inputSearch.Value != inputSearchValue && !string.IsNullOrWhiteSpace(inputSearch.Value))
{
if (inputSearch.Value.StartsWith("landscap", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Landscapers";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("baby sitter", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Baby sitters";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("doctor", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Doctor";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("cleaning service", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Cleaning services";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("pet sitter", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Pet sitters";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("handyman", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Handyman";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("electrical service", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Electrical services";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("tutor", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Tutor";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("dog walker", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Dog walker";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("plumb", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Plumbing";
search = string.Empty;
}
else if (inputSearch.Value.StartsWith("Caterer", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Caterers";
search = string.Empty;
}
else if (inputSearch.Value.Equals("misc", StringComparison.InvariantCultureIgnoreCase))
{
SelectedCategory = "Misc";
search = string.Empty;
}
}
200+ строк кода
}
тот же девелопер, та же .aspx страница)))))
+62
<<<<<<<<<<<<<<<<<===============================>>>>>>>>>>>>>>>>>
АДМИН - ПИДОР!!!
+122
<table border='0' cellspacing='1' cellspacing='1' width=707>
<thead>
<a>
<th width=44 align='center'>
<IMG name='Image300' SRC='images/check.gif' height='22' width='44'>
</th>
</a>
<a href=javascript:SortForm('Agent_Name');>
<th class='header'>Name</th>
</a>
<a href=javascript:SortForm('Description');>
<th class='header'>Description</th>
</a>
</thead>
Сортировка таблицы по полю при нажатии на заголовок. Код отформатирован для читабельности.
+66
function EchoForum( $var ){
return true;
echo $var.'<BR>';
}
Из модуля форума...
+147
function trim(str) { //Маленький трёхколёсный велосипед
return str.replace(/^\s+|\s+$/g, '');
}
Комментарий оригинала...