- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
if(!$price){
$price = 'ФОЛСУ РАВЕН';
}
...
{
...
$_SESSION['BASKET']['ITEMS'][$id]['PRICE'] = $price['PRICE'];
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+163
if(!$price){
$price = 'ФОЛСУ РАВЕН';
}
...
{
...
$_SESSION['BASKET']['ITEMS'][$id]['PRICE'] = $price['PRICE'];
}
+102
if (nchan == 1)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],sub_window_length,main_window_length,out_dir,decon_c);
}
if (nchan == 2)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s,%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],chan_list[1],sub_window_length,main_window_length,out_dir,decon_c);
}
if (nchan == 3)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s,%s,%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],chan_list[1],chan_list[2],sub_window_length,main_window_length,out_dir,decon_c);
}
if (nchan == 4)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s,%s,%s,%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],chan_list[1],chan_list[2],chan_list[3],sub_window_length,main_window_length,out_dir,decon_c);
}
if (nchan == 5)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s,%s,%s,%s,%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],chan_list[1],chan_list[2],chan_list[3],chan_list[4],sub_window_length,main_window_length,out_dir,decon_c);
}
if (nchan == 6)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s,%s,%s,%s,%s,%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],chan_list[1],chan_list[2],chan_list[3],chan_list[4],chan_list[5],sub_window_length,main_window_length,out_dir,decon_c);
}
if (nchan == 7)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s,%s,%s,%s,%s,%s,%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],chan_list[1],chan_list[2],chan_list[3],chan_list[4],chan_list[5],chan_list[6],sub_window_length,main_window_length,out_dir,decon_c);
}
...
}
if (nchan >= 14)
{
fprintf(commands_ptr,(char *)"StaNoise sta=%s start_time=%14.3f chan_list=%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s window_type=nutall4a sub_window_length=%5.1f main_window_length=%6.1f out_dir=%s plot=yes record=yes decon=%s\n",sta,gmttime,chan_list[0],chan_list[1],chan_list[2],chan_list[3],chan_list[4],chan_list[5],chan_list[6],chan_list[7],chan_list[8],chan_list[9],chan_list[10],chan_list[11],chan_list[12],chan_list[13],sub_window_length,main_window_length,out_dir,decon_c);
}
Тяжело в сях работать со строками и переменным числом параметров...
−850
-- Таблица в БД имеет колонку Visible, при этом значение 0 означает "Видим", а 1 - "Не видим"
+134
function ()
local res = false
for j = 1, hE do
if () then
elseif () or () then
elseif () or () then
else
res = true
end
end
if not res then
return res
end
return true
end
Код взят из миниигры в разрабатываемой казуалке.
Первое непонятно накуя выпендриваться с кучей условий с пустыми телами, если результат получим только в одном случае.
Второе вообще убивает: накуя танцы с переменной res в конце тела ф-ции?
+140
if ((u[i]!=100500)&&(v[j]==100500))
v[j]=matr[i+1][j+1].cost-u[i];
if ((u[i]==100500)&&(v[j]!=100500))
u[i]=matr[i+1][j+1].cost-v[j];
пересчет платежей в ТЗЛП
+147
/*Windows 8 source code.*/
/*
TOP SECRET Microsoft(c) Code
Project: Cairo(tm)
Projected release-date: Summer 2012
*/
#include "winnt.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#define INSTALL_HARD_C
#define INSTALL_DIR_WINDOWS
char make_prog_look_big[160000000] ;
void main()
{
while(!CRASHED)
{
display_copyright_message();
display_bill_rules_message();
do_nothing_loop();
if (first_time_installation)
{
make_4gb_megabyte_swapfile();
do_nothing_loop();
display_funny_3d();
hang_system();
}
write_something(anything);
display_copyright_message();
do_nothing_loop();
do_some_stuff();
if (still_not_crashed)
{
display_copyright_message();
do_nothing_loop();
basically_run_windows_vista();
show3d_in_loop();
do_nothing_loop();
do_nothing_loop();
}
}
if (detect_cache())
disable_cache();
if (fast_cpu())
{
set_wait_states(lots);
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
}
if (fast_gpu())
{
setitonfire(dx12);
}
if (lotofmemory())
{
//achtung: red alert!
/* allocateforfutureuse(200mb); */
allocateforfutureuse(2gb);
}
/* printf("Welcome to Windows Vista"); */
/* printf("Welcome to Windows 7"); */
printf("Welcome to Windows 8");
if (system_ok())
crashex(aero3denalbed());
else;
/* system_memory = open("a:\swp0001.swp", O_CREATE); */
while(something)
{
allocate_random_memory();
sleep(5);
get_user_input();
sleep(5);
display_uac_prompt();
act_on_user_input();
sleep(5);
}
draw_3d_bsod();
die();
}
+153
$request->request->get('page'); // get a $_POST parameter
symfony2
Почему не $request->post->get('page'); ???
+129
public void UpdateSession()
{
this.RequestTypeId = this.RequestTypeId;
this.ServiceId = this.ServiceId;
this.Name = this.Name;
}
"Обновление" сессии. Взято из реального проекта.
−104
function BU(BTN:MovieClip, URL_to){
BTN.buttonMode = true;
function STRT_CLOS(BTN:MovieClip, K_P){
BTN.removeEventListener(Event.ENTER_FRAME, POS_CLOS)
BTN.addEventListener(Event.ENTER_FRAME, POS_CLOS)
}
function STRT_OP(BTN:MovieClip, K_P){
BTN.removeEventListener(Event.ENTER_FRAME, OPen)
BTN.addEventListener(Event.ENTER_FRAME, OPen)
...
p.p.gotoAndStop ("prav_sr"
p.p.b.nadp.stop ();
p.p.f.nadp.stop ();
p.p.k.nadp.stop ();
p.p.konf.nadp.stop ();
p.p.prav.nadp.stop ();
p.p.raz.stop ();
raskr (p.p.b);
raskr (p.p.f);
raskr (p.p.k);
raskr (p.p.konf);
raskr (p.p.prav);
raskr (p.p.raz);
p.p.b.t=false;
p.p.f.t=false;
p.p.k.t = false;
....
var SS:MovieClip = this.parent.parent as MovieClip
var SSSS = this.parent.parent.parent as MovieClip
var OOOO:MovieClip = SSSS.BAZ_LOER.getChildByName("ZaGl")
....
BTN.otkr="otkr";
BTN.kloc="klos";
if (BTN.otkr!="otkr") return;
Код на кадрах, в проекте не одна к строк подобного содержания.
+166
// Если регистрация, то показываем контрольный вопрос
if($_GET['op'] == 'registration') {
$vars['c_question'] = true;
} else {
$vars['c_question'] = false;
}
Классика