/** * lowercase letters */
        $this->store['upper_Spec'] = array( *cut* );
        /** * uppercase letters */
        $this->store['lower_Spec'] = array( *cut* );
      
                    } else {
                      $errmsg='An unknown error occured.';
                    }
                  } else {
                    $errmsg='The passwords you entered do not match';
                  }
                } else {
                  $errmsg='Password has to be at least 8 characters long.';
                }
              } else {
                $errmsg='The email you entered is already in our database.';
              }
            } else {
              $errmsg='Please enter your email address.';
            }
          } else {
            $errmsg='Please enter your first name and your last name.';
          }
        } else {
        (...)
      
        // Happy debugging, suckers
        # define true (rand() > 10)
      

anonymous

-1

replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(lower(AmazonCategory0), 'ö', 'oe'), 'ä', 'ae'), 'ü', 'ue'), 'ß', 'ss'), '.', ''), ',', ''), '-', ''), '_', ''), '/', ''), '|', ''), ')', ''), '(', ''), '[', ''), ']', ''), '{', ''), '}', ''), '''', ''), '´', ''), '`', ''), ' ', '') 
 

anonymous

0

while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        if(!@$_++) continue; // skip headline
        //...
}
 

0

//This code is in production on a major website            

            $('#hiba_1').hide();
            //$('#div_2').hide();
            $('#div_3').hide();
            $('#div_32').hide();
            $('#div_4').hide();
            $('#div_42').hide();
            $('#div_45').hide();
            $('#div_5').hide();
            $('#div_6').hide();
            $('#div_7').hide();
            $('#div_8').hide();
            $('#div_9').hide();
            $('#div_10').hide();
            $('#div_11').hide();
            $('#div_12').hide();
            $('#div_13').hide();
            $('#div_14').hide();
            $('#div_15').hide();
            $('#div_16').hide();
            $('#div_17').hide();
            $('#div_18').hide();
            $('#div_19').hide();
            $('#div_20').hide();
 

anonymous

0

// Actual production code used to generate many installments for an invoice
// This very code is copied and pasted three times inside the same method
 // 1a. Installment
                if dmConsultas.qryGeral.FieldByName('fator1').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 1;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias1').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                             ( dmConsultas.qryGeral.FieldByName('fator1').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 2a. Installment
                if dmConsultas.qryGeral.FieldByName('fator2').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico'). Value      := 2;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias2').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator2').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 3a. Installment
                if dmConsultas.qryGeral.FieldByName('fator3').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 3;
                 Parameters.ParamByName('dt_vencimento').Value := ( dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias3').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator3').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 4a. Installment
                if dmConsultas.qryGeral.FieldByName('fator4').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 4;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias4').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator4').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 5a. Installment
                if dmConsultas.qryGeral.FieldByName('fator5').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 5;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias5').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator5').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 6a. Installment
                if dmConsultas.qryGeral.FieldByName('fator1').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 1;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias6').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                             ( dmConsultas.qryGeral.FieldByName('fator6').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 7a. Installment
                if dmConsultas.qryGeral.FieldByName('fator7').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico'). Value      := 2;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias7').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator7').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 8a. Installment
                if dmConsultas.qryGeral.FieldByName('fator8').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 3;
                 Parameters.ParamByName('dt_vencimento').Value := ( dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias8').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator8').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 9a. Installment
                if dmConsultas.qryGeral.FieldByName('fator9').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 4;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias9').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator9').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;

                // 10a. Installment
                if dmConsultas.qryGeral.FieldByName('fator10').AsFloat > 0 then
                begin
                 Parameters.ParamByName('cod_historico').Value      := icod_hist;
                 Parameters.ParamByName('seq_historico').Value      := 5;
                 Parameters.ParamByName('dt_vencimento').Value := (dtpDt_movto.DateTime + dmConsultas.qryGeral.FieldByName('nr_dias10').AsInteger );
                 Parameters.ParamByName('valor_movto').Value          := (rValor_Total *
                                                                 ( dmConsultas.qryGeral.FieldByName('fator10').AsFloat / 100  ));
                 Parameters.ParamByName('usu_lasup').Value           := Frm_Principal.sLoginUser;
                  Execute;
                end;
 

anonymous

+8

// String Arrays
private String scoreArray[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"};

private String scoreConverter(int a)
{		
	return scoreArray[a];
}
 

0

//console.log("route.params",req.route.params, "param 0", req.route.params[0]);
//console.log("stars", stars);
var starsPrint = "";
if (stars == 5 || stars == "5" || stars == "5\r")
    starsPrint = "Awarded stars: ★ ★ ★ ★ ★  ";
    else if (stars == 4 || stars == "4" || stars == "4\r")
    starsPrint = "Awarded stars: ★ ★ ★ ★ ☆  ";
else if (stars == 3 || stars == "3" || stars == "3\r")
    starsPrint = "Awarded stars: ★ ★ ★ ☆ ☆  ";
else if (stars == 2 || stars == "2" || stars == "2\r")
    starsPrint = "Awarded stars: ★ ★ ☆ ☆ ☆  ";
else if (stars == 1 || stars == "1" || stars == "1\r")
    starsPrint = "Awarded stars: ★ ☆ ☆ ☆ ☆  ";
else
    starsPrint = "Awarded stars: ☆ ☆ ☆ ☆ ☆  ";
 

anonymous

+1

//refresh page
var output = new JavaScriptResult();
output.Script = "window.location = window.location";
return output;
 

+4

# actual production code
def to_json(self):
    """
    We must return XML always
    """
    return self.to_xml()
 

anonymous

-1

        private void buttonSeven_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "7";
        }

        private void buttonEight_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "8";
        }

        private void buttonNine_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "9";
            result = 9;
        }

        private void buttonFour_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "4";
        }

        private void buttonFive_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "5";
        }

        private void buttonSix_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "6";
        }

        private void buttonOne_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "1";
        }

        private void buttonTwo_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "2";
        }

        private void buttonThree_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "3";
        }

        private void buttonZero_Click(object sender, EventArgs e)
        {
            textBoxResult.Text = "0";
        }
 

anonymous

+2

//break;
break;