- 1
- 2
- 3
if ($('.b-form__row_hide').hasClass('b-form__row_hide')) {
$('.b-form__row_hide').addClass('b-form__row_hide');
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+5
if ($('.b-form__row_hide').hasClass('b-form__row_hide')) {
$('.b-form__row_hide').addClass('b-form__row_hide');
}
+4
if(((player[i].targetanimation!=getupfrombackanim&&player[i].targetanimation!=getupfromfrontanim)||player[i].skeleton.free)&&((player[k].targetanimation!=getupfrombackanim&&player[k].targetanimation!=getupfromfrontanim)||player[k].skeleton.free))
if(((((findLengthfast(&rotatetarget)>150&&(i!=0&&k!=0))||(findLengthfast(&rotatetarget)>50&&player[0].rabbitkickragdoll/*currentanimation==rabbitkickanim*/&&(i==0||k==0)))&&normaldotproduct(rotatetarget,player[k].coords-player[i].coords)>0)&&((i==0||k==0)||((player[i].skeleton.oldfree==1&&k!=0&&animation[player[k].currentanimation].attack==neutral)||(player[k].skeleton.oldfree==1&&i!=0&&animation[player[i].currentanimation].attack==neutral)||(player[i].isFlip()&&!player[i].skeleton.oldfree&&(i==0||k==0))||(player[k].isFlip()&&!player[k].skeleton.oldfree&&(i==0||k==0))||(i==0||k==0))))||((player[i].targetanimation==jumpupanim||player[i].targetanimation==jumpdownanim||player[i].isFlip())&&(player[k].targetanimation==jumpupanim||player[k].targetanimation==jumpdownanim||player[k].isFlip())&&(i==0||k==0)&&(!player[i].skeleton.oldfree&&!player[k].skeleton.oldfree))){
//If hit by body
if((i!=0||player[i].skeleton.free)&&(k!=0||player[k].skeleton.free)||(animation[player[i].targetanimation].height==highheight&&animation[player[k].targetanimation].height==highheight)){
static float gLoc[3];
// ...
Не могу не запостить. Кажется, это самый длинный говнокод, что я видел.
По мотиву #20073, из http://hg.icculus.org/icculus/lugaru/file/97b303e79826/Source/GameTick.cpp .
PS, на всякий случай поставлю C++ - где-то в недрах второй строчки он наверняка есть.
+4
/*не знаю, почему на массиве не сработал concat()*/
function arrPusher (arr) {
_.forEach(arr, function (i) {
saveParams.push(i);
});
}
0
public function format_phone($phone) {
$phone = preg_replace("/\D/", "", $phone);
$first_digit = substr($phone, 0, 1);
if ($first_digit == "7" || $first_digit == "8") {
$phone = substr($phone, 1);
}
if ($first_digit == "+") {
$phone = substr($phone, 2);
}
$p = str_split($phone);
$phone = "(" . $p[0] . $p[1] . $p[2] . ") " . $p[3] . $p[4] . $p[5] . "-" . $p[6] . $p[7] . "-" . $p[8] . $p[9];
return $phone;
}
+7
private function checkPlaces(){
$popups = array();
foreach($this->popups as $popup){
if($popup->showOnThisPage()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkExcludes(){
$popups = array();
foreach($this->popups as $popup){
if(!$popup->excludeOnThisPage()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkPage(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkPageCount($this->user_info['popup_page'])){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkReferer(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkReferer()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkGETParams(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkGETParams()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkVisitCount(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkVisitCount($this->user_info['visit_count'])){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkFirstVisitDate(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkFirstVisitDate()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkLastVisitDate(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkLastVisitDate()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkCustom(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkCustom()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkDate(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkDate()){
$popups[] = $popup;
}
}
$this->popups = $popups;
}
private function checkDevice(){
$popups = array();
foreach($this->popups as $popup){
if($popup->checkDevice()){
$popups[] = $popup;
}
}
$this->popups = $popups;
Скилл Ctrl+C - Ctrl+V прокачан до 80го уровня.
+2
$sql = "SELECT COUNT(`user_id`) FROM `link_empl_tf` WHERE `sched_date` >= " . $DB->
F(substr($startDate, 6, 4) . "-" . substr($startDate, 3, 2) . "-" . substr($startDate,
0, 2)) . " AND `sched_date` <= " . $DB->F(substr($endDate, 6, 4) . "-" . substr
($endDate, 3, 2) . "-" . substr($endDate, 0, 2)) . " AND `user_id`=" . $DB->F($uParam[0]) .
";";
Date formatting by ©senior shaurma developer
0
var routers = new (R(views))();
Чет по другому не придумал как в роутер view передать
+3
setTimeout(function() {
$('#kostyl').click().click();
}, 2000);
Применить сортировку по этому столбцу в таблице после её подгрузки и отработки жс, который строит эту таблицу.
+3
var pricerawjson = "%7B%22price%22%3A%226973.00%22%2C%22status%22%3A%22active%22%2C%22sell_status%22%3A%22available%22%2C%22old_price%22%3A%227607.0000%22%2C%22price_formatted%22%3A%226%20973%22%2C%22old_price_formatted%22%3A%227%20607%22%7D";
if (pricerawjson.length == 0) {
pricerawjson = '%7B%22price%22%3A%226973%22%2C%22price_formatted%22%3A%226%20973%22%2C%22old_price%22%3A7607%2C%22old_price_formatted%22%3A%227%20607%22%2C%22status%22%3A%22active%22%2C%22sell_status%22%3A%22available%22%7D';
}
0
.container .additional-item{display: block;width:100%;}
.container .additional-item thead{display: block;width:100%;}
.container .additional-item thead tr td{font-weight: bold;}
.container .additional-item tbody{display: block;width:100%;}
.container .additional-item tr{display: block;width:100%;padding:10px 0px;}
.container .additional-item tr td{display: inline-block;text-align: center;}
.container .additional-item tr td:nth-child(1){width:3%;}
.container .additional-item tr td:nth-child(2){width:3%;}
.container .additional-item tr td:nth-child(3){width:3%;}
.container .additional-item tr td:nth-child(4){width:15%;}
.container .additional-item tr td:nth-child(5){width:5%;}
.container .additional-item tr td:nth-child(6){width:5%;overflow: hidden;}
.container .additional-item tr td:nth-child(7){width:20%;overflow: hidden;}
.container .additional-item tr td:nth-child(8){width:3%;overflow: hidden;}
.container .additional-item tr td:nth-child(9){width:3%;overflow: hidden;}
.container .additional-item tr td:nth-child(10){width:5%;overflow: hidden;}
.container .additional-item tbody tr td:nth-child(11){font-weight: bold;color:rgb(138, 43, 23);}
.container .additional-item tr td:nth-child(11){width:10%;overflow: hidden;}
.container .additional-item tr td:nth-child(12){width:7.5%;overflow: hidden;}
.container .additional-item tr td:nth-child(12) input{width:50%;margin:auto;text-align: center;}
.container .additional-item tr td:nth-child(13){width:12%;overflow: hidden;}
.container .additional-item tr td:nth-child(13) a{display: block;width: 95%;margin-left: 5%;height: 30px;line-height: 15px;font-size: 100%;}