- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
int str_fpos(char * in_str,char chr1)
{
int i=0;
char * pch = strchr(in_str,chr1);
while (pch != NULL)
{
i = pch-in_str;//+1;
break;
}
return i;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+137
int str_fpos(char * in_str,char chr1)
{
int i=0;
char * pch = strchr(in_str,chr1);
while (pch != NULL)
{
i = pch-in_str;//+1;
break;
}
return i;
}
if-ом пользуются только трусы!!!
+142
i:=1;
if i=1 then i:=1;
else i:=1;
+116
protected void chxPeriodCostDeviationGreater_CheckedChanged(object sender, EventArgs e)
{
foreach (Pair lstPair in lstPairs)
{
if (lstPair.First.Equals(sender))
{
(lstPair.Second as TextBox).Enabled = (lstPair.First as CheckBox).Checked;
return;
}
}
}
задаем видимость контролов :)
+137
<b style="font-weight: normal;">жирный текст будь не жирным!</b>
+161
ReceiveManager* getReveiceManager() { return (receiveManager == 0 ? 0 : receiveManager); }
+173
if(strpos($da,'Да')!==FALSE || strpos($da,'ДА')!==FALSE || strpos($da,'да')!==FALSE){$da='ДА';}
else{$da = 'Нет';}
.....
if(strlen($document['Document_mark'])<=0){
//манагеру разрешено ставить
if($_SESSION['GL_firm'] == 1){$da = 'Нет';}
if(strpos($da,'ДА')!==FALSE){$da='ДА';}
else{
.....
Разбирая работающую (!) систему документооборота крупной компании.
Фриланс.
Цена 6000EUR.
+110
public class CatalogCache : IDIsposable
{
public void Dispose()
{
if (_loadThread != null)
{
if (_loadThread.IsAlive)
_loadThread.Abort();
}
if (_updateThread != null)
{
if (_updateThread.IsAlive)
_updateThread.Abort();
}
}
+160
var HS_ShareButton = new Object();
HS_ShareButton.Info = "ShareButton";
HS_ShareButton.ShareAction = new function(hURL, hTitle, hDescription, hImage, hParams)
{
var hResult = '';
var hURL = this.hURL;
var hTitle = this.hTitle;
var hDescription = this.hDescription;
var hImage = this.hImage;
var hParams = this.hParams;
var hSendData = new Object();
var hSendData = {hURL, hTitle, hDescription, hImage, hParams};
if(hURL == null && hTitle == null && hDescription == null && hImage == null && hParams == null)
{
return hResult = 'Initialization impossible #001';
}
else
{
HS_ShareButton._DoShare(this.hSendData);
}
}
.... еще over 100500 строчек =]
Это кнопка расшаривает материалы для сайта...
−121
override public function removeChildAt(index:int):DisplayObject
{
var child:DisplayObject = getChildAt(index);
removingChild(child);
$removeChild(child);
childRemoved(child);
return child;
}
+122
switch (count)
{
case 2:
return Tuple.Create(col[1]);
case 3:
return Tuple.Create(col[1], col[2]);
case 4:
return Tuple.Create(col[1], col[2], col[3]);
case 5:
return Tuple.Create(col[1], col[2], col[3], col[4]);
case 6:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6]);
case 8:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7]);
case 9:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], col[7]);
case 10:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8]));
case 11:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9]));
case 12:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9], col[10]));
case 13:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9], col[10], col[11]));
case 14:
return Tuple.Create(col[1], col[2], col[3], col[4], col[5], col[6], col[7], Tuple.Create(col[8], col[9], col[10], col[11], col[12]));
default:
throw new ArgumentOutOfRangeException("count", count, "Can't convert array to tuple.");
}