- 1
- 2
- 3
this.isWait && result.push(campLinkCid);
result.push(this.isWait ? camp.bid : campLinkCid);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+160
this.isWait && result.push(campLinkCid);
result.push(this.isWait ? camp.bid : campLinkCid);
Нужно больше логики.
+62
#include<iostream>
#include<clocale>
#include<fstream>
#include<cstring>
using namespace std;
int main()
{
setlocale(LC_ALL,"RUS");
int cnt=0,cnt2=0,cnt3=0,cnt4=0;
int iMax=93;
bool bPassword=1;
char password[6];
char cBuffer[5]="";
char cSymbols[]=",<.>/?;:'|[{]}`~!@#$%^&*()-_=/№0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHILKLMNOPQRSTUVWXYZ";
char cClear[]="";
cout<<"Введите пароль:";
cin>>password;
cout<<"Брать ли в перебор символы?(1 - да , 0 - нет):";
bool bSymbols;
cin>>bSymbols;
cout<<"Брать ли в перебор цифры?(1 - да , 0 - нет):";
bool bNumbers;
cin>>bNumbers;
cout<<"Брать ли в перебор буквы нижнего регистра?(1 - да , 0 - нет):";
bool bDownRegister;
cin>>bDownRegister;
cout<<"Брать ли в перебор буквы верхнего регистра?(1 - да , 0 - нет):";
bool bUpRegister;
cin>>bUpRegister;
while(bPassword)
{
if(!bSymbols){if(cnt>=0&&cnt<31){cnt++;continue;}}
if(!bNumbers){if(cnt>=31&&cnt<41){cnt++;continue;}}
if(!bDownRegister){if(cnt>=31&&cnt<67){cnt++;continue;}}
if(!bUpRegister){if(cnt>=67&&cnt<iMax){cnt++;continue;}}
cBuffer[0]={cSymbols[cnt]};
bPassword=strcmp(password,cBuffer);
cout<<"cBuffer:"<<cBuffer<<endl;
if(bPassword){strcpy(cBuffer,cClear);}
if(cnt==iMax)
{
cnt=0;
while(bPassword)
{
if(!bSymbols){if(cnt>=0&&cnt<31){cnt++;continue;}}
if(!bNumbers){if(cnt>=31&&cnt<41){cnt++;continue;}}
if(!bDownRegister){if(cnt>=31&&cnt<67){cnt++;continue;}}
if(!bUpRegister){if(cnt>=67&&cnt<iMax){cnt++;continue;}}
if(!bSymbols){if(cnt2>=0&&cnt2<31){cnt2++;continue;}}
if(!bNumbers){if(cnt2>=31&&cnt2<41){cnt2++;continue;}}
if(!bDownRegister){if(cnt2>=31&&cnt2<67){cnt2++;continue;}}
if(!bUpRegister){if(cnt2>=67&&cnt2<iMax){cnt2++;continue;}}
cBuffer[0]={cSymbols[cnt2]};
cBuffer[1]={cSymbols[cnt]};
bPassword=strcmp(password,cBuffer);
cout<<"cBuffer:"<<cBuffer<<endl;
if(bPassword){strcpy(cBuffer,cClear);}
if(cnt2==iMax&&cnt==iMax)
{
cnt2=0;
cnt=0;
while(bPassword)
{
if(!bSymbols){if(cnt>=0&&cnt<31){cnt++;continue;}}
if(!bNumbers){if(cnt>=31&&cnt<41){cnt++;continue;}}
if(!bDownRegister){if(cnt>=31&&cnt<67){cnt++;continue;}}
if(!bUpRegister){if(cnt>=67&&cnt<iMax){cnt++;continue;}}
if(!bSymbols){if(cnt2>=0&&cnt2<31){cnt2++;continue;}}
if(!bNumbers){if(cnt2>=31&&cnt2<41){cnt2++;continue;}}
if(!bDownRegister){if(cnt2>=31&&cnt2<67){cnt2++;continue;}}
if(!bUpRegister){if(cnt2>=67&&cnt2<iMax){cnt2++;continue;}}
if(!bSymbols){if(cnt3>=0&&cnt3<31){cnt3++;continue;}}
if(!bNumbers){if(cnt3>=31&&cnt3<41){cnt3++;continue;}}
if(!bDownRegister){if(cnt3>=31&&cnt3<67){cnt3++;continue;}}
if(!bUpRegister){if(cnt3>=67&&cnt3<iMax){cnt3++;continue;}}
cBuffer[0]={cSymbols[cnt3]};
cBuffer[1]={cSymbols[cnt2]};
cBuffer[2]={cSymbols[cnt]};
bPassword=strcmp(password,cBuffer);
cout<<"cBuffer:"<<cBuffer<<endl;
if(bPassword){strcpy(cBuffer,cClear);}
if(cnt3>=iMax&&cnt2>=iMax&&cnt>=iMax)
{
cnt3=0;
cnt2=0;
cnt=0;
while(bPassword)
{
if(!bSymbols){if(cnt>=0&&cnt<31){cnt++;continue;}}
if(!bNumbers){if(cnt>=31&&cnt<41){cnt++;continue;}}
if(!bDownRegister){if(cnt>=31&&cnt<67){cnt++;continue;}}
if(!bUpRegister){if(cnt>=67&&cnt<iMax){cnt++;continue;}}
if(!bSymbols){if(cnt2>=0&&cnt2<31){cnt2++;continue;}}
if(!bNumbers){if(cnt2>=31&&cnt2<41){cnt2++;continue;}}
if(!bDownRegister){if(cnt2>=31&&cnt2<67){cnt2++;continue;}}
if(!bUpRegister){if(cnt2>=67&&cnt2<iMax){cnt2++;continue;}}
if(!bSymbols){if(cnt3>=0&&cnt3<31){cnt3++;continue;}}
if(!bNumbers){if(cnt3>=31&&cnt3<41){cnt3++;continue;}}
if(!bDownRegister){if(cnt3>=31&&cnt3<67){cnt3++;continue;}}
if(!bUpRegister){if(cnt3>=67&&cnt3<iMax){cnt3++;continue;}}
Брутфорс 2014 (!).
−87
/src/com/<секрет>/client/view/components/movicons/ImageHolderView.mxml
protected function onFlipRollOver(event:MouseEvent):void
{
- if ( (track && track.slide &&(track.slide.selectedTrack==null || (holderData && track.slide.selectedTrack.sprite!=holderData)))
- || ( holderData && holderData.sourceUrl && holderData.getName()==ImageSpriteVO.EMPTY_IMAGE_NAME)
+ if (((track && track.slide && (track.slide.selectedTrack==null || (holderData && track.slide.selectedTrack.sprite!=holderData)))
+ || ( holderData && holderData.sourceUrl && holderData.getName()==ImageSpriteVO.EMPTY_IMAGE_NAME))
&& <секрет>.slidesMode
&& !<секрет>.fullScreenMode)
{
/src/com/<секрет>/client/view/components/movicons/ImageView.mxml
protected function onFlipRollOver(event:MouseEvent):void
{
- if ( (track && track.slide &&(track.slide.selectedTrack==null || (holderData && track.slide.selectedTrack.sprite!=holderData)))
- || ( holderData && holderData.sourceUrl && holderData.getName()==ImageSpriteVO.EMPTY_IMAGE_NAME)
+ if ( ((track && track.slide &&(track.slide.selectedTrack==null || (holderData && track.slide.selectedTrack.sprite!=holderData)))
+ || ( holderData && holderData.sourceUrl && holderData.getName()==ImageSpriteVO.EMPTY_IMAGE_NAME))
&& <секрет>.slidesMode
&& !<секрет>.fullScreenMode)
{
Тяжело было прочитать, попросили поправить, поправил.
+159
<?php
$action = $_REQUEST["action"];
$subaction = $_REQUEST["subaction"];
$id = intval($_REQUEST["id"]);
if ($action == "" or $subaction == "" or $id =="") {
die("Go fuck yourself!");
} elseif ($action == 'add' or $action == 'edit' or $action == 'delete') {
if ($action == 'add') {
if ($subaction == "character") {
} elseif ($subaction == "seiyu") {
} else {
die("Go fuck yourself!");
}
} elseif ($action == 'edit') {
if ($subaction == "character") {
} elseif ($subaction == "seiyu") {
} else {
die("Go fuck yourself!");
}
} elseif ($action == 'delete') {
if ($subaction == "character") {
} elseif ($subaction == "seiyu") {
} else {
die("Go fuck yourself!");
}
}
} else {
die("Go fuck yourself!");
}
Вырезка из модуля DLE
−393
- (void)config
{
self.contentView.backgroundColor = [UIColor NaviCellBgColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
UIImageView *theDisclosureView = _disclosureView;
UILabel *theLabel = _titleLabel;
if (self.isHighlighted)
{
theLabel.shadowColor = [UIColor TextShadowColor];
theLabel.shadowOffset = CGSizeMake(0.0f, -0.5f);
self.contentView.backgroundColor = [UIColor NaviCellBgHighlightColor];
theLabel.textColor = [UIColor GreenTextColor];
self.contentView.backgroundColor = [UIColor NaviCellBgHighlightColor];
theDisclosureView.image = [UIImage imageNamed:@"Button_Disclosure_touch"];
}
else
{
theLabel.shadowColor = [UIColor TextShadowColor];
theLabel.shadowOffset = CGSizeMake(0.0f, -0.5f);
self.contentView.backgroundColor = [UIColor NaviCellBgHighlightColor];
theLabel.textColor = [UIColor GreenTextColor];
self.contentView.backgroundColor = [UIColor NaviCellBgColor];
theDisclosureView.image = [UIImage imageNamed:@"Button_Disclosure"];
}
UIActivityIndicatorView *theIndicator = _loadingIndicator;
if (_loading)
[theIndicator startAnimating];
else
[theIndicator stopAnimating];
UILabel *theTitleLabel = _titleLabel;
theTitleLabel.textColor = [UIColor GreenTextColor];
}
Код вид культурного европэйця. Справжний европейский кодстайл.
+156
jQuery("#myId"+object+".myTr"+array.length-1).append(JSON.parse(object));
Appending result to grid table
+51
template<typename T>
class com_ptr {
// ...
// HRESULT ID2D1RenderTarget::CreateSolidColorBrush(
// const D2D1_COLOR_F &color,
// [out] ID2D1SolidColorBrush **solidColorBrush // нормальный, типизированный петух
// );
T ** get_init_ptr() {
if(ptr) {
ptr->Release();
ptr = 0;
}
return &ptr;
}
// HRESULT DWriteCreateFactory(
// _In_ DWRITE_FACTORY_TYPE factoryType,
// _In_ REFIID iid,
// _Out_ IUnknown **factory // петух неизвестен!
// );
IUnknown ** get_unknown_init_ptr() {
return reinterpret_cast<IUnknown**>(get_init_ptr());
}
// HRESULT CoCreateInstance(
// _In_ REFCLSID rclsid,
// _In_ LPUNKNOWN pUnkOuter,
// _In_ DWORD dwClsContext,
// _In_ REFIID riid,
// _Out_ LPVOID *ppv // соломка, где петух будет лежать
// );
void ** get_void_init_ptr() {
return reinterpret_cast<void**>(get_init_ptr());
}
//...
};
Ко-ко-ком. Чтоб его за ногу.
+56
for (size_t i=v.size()-1; i<v.size(); --i)
unsigned в массивах не нужен, нахуй усрались длинные массивы?
+60
Объявление:
bool getBorderThickness() const {return isThinBorder;}
Использование:
size += !getBorderThickness();// + 2;
visibleAreaBegin.x = getLTPoint().x + xLeftShift + !getBorderThickness();
visibleAreaWidth = getRBPoint().x - getLTPoint().x - xRightShift - xLeftShift - 2*!getBorderThickness();
Умножать на буль - айм ловинг щит!
+163
<?
$text[5] .="</body>";
$text[5] .="</html>";
echo $text[5];
?>
И вот таким вот макаром
Наша рота солдат
Обходит ровно за сутки
Квадрат, квадрат, квадрат...