/** * 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

+7

    /**
     *  BLANK_STRING storing "" for comparision
     */
    public static transient String BLANK_STRING = "";
    /**
     * The empty String <code>""</code>.
     *  
     */
    public static final String EMPTY = "";
 

anonymous

+7

string valueTmp = (string)((object[])((object[])((object[])((object[])(attrValues[i]))[j]))[k])[0];
 

anonymous

-3

    /** 
     * This method creates a Map out of the data list, thus creating a Map of
     * Maps from a list of Maps.
     */
    public Map<Object,Object> getDataMap(String mapColumnName) throws CommandException {...}
 

anonymous

+9

private int signum(int number) {
	int result = 0;
	if (number != 0) {
		result = number / Math.abs(number);
	}
	return result;
}
 

anonymous

+57

return !finished || notFinished; // even horse can not understand this.
 

anonymous

+16

function _menu_parents_recurse($menu_name, $type = 'menu', $lang = 'en', $path = false){

	$q = db_query("SELECT * FROM menu_links WHERE menu_name = '{$menu_name}' ORDER BY depth, weight ASC");
	$languages_list = locale_language_list();
	$menu_name_read = db_fetch_object(db_query("SELECT title FROM menu_custom WHERE menu_name = '{$menu_name}' LIMIT 1"));
	$menu_structure = array();
	while($data = db_fetch_object($q))
	{
		$lang_un = unserialize($data->options);
		if(isset($lang_un['langcode']) && $lang_un['langcode'] == $lang){

			switch($data->depth)
			{
				case 1:
					$menu[$data->p1] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 2:
					$menu[$data->p1]['childrens'][$data->p2] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 3:
					$menu[$data->p1]['childrens'][$data->p2]['childrens'][$data->p3] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 4:
					$menu[$data->p1]['childrens'][$data->p2]['childrens'][$data->p3]['childrens'][$data->p4] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 5:
					$menu[$data->p1]['childrens'][$data->p2]['childrens'][$data->p3]['childrens'][$data->p4]['childrens'][$data->p5] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 6:
					$menu[$data->p1]['childrens'][$data->p2]['childrens'][$data->p3]['childrens'][$data->p4]['childrens'][$data->p5]['childrens'][$data->p6] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 7:
					$menu[$data->p1]['childrens'][$data->p2]['childrens'][$data->p3]['childrens'][$data->p4]['childrens'][$data->p5]['childrens'][$data->p6]['childrens'][$data->p7] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 8:
					$menu[$data->p1]['childrens'][$data->p2]['childrens'][$data->p3]['childrens'][$data->p4]['childrens'][$data->p5]['childrens'][$data->p6]['childrens'][$data->p7]['childrens'][$data->p8] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
				case 9:
					$menu[$data->p1]['childrens'][$data->p2]['childrens'][$data->p3]['childrens'][$data->p4]['childrens'][$data->p5]['childrens'][$data->p6]['childrens'][$data->p7]['childrens'][$data->p8]['childrens'][$data->p9] = array('name' => $data->link_title, 'path' => $data->link_path);
				break;
			}

		}
	}

	if(!$path)
		$menu_structure[$menu_name.':0'] = '<'.t($menu_name_read->title).'>';
	else
		$menu_structure[''] = '<'.t($menu_name_read->title).'>';

	if($menu){
		foreach($menu as $mlid => $menu_item)
		{
			if($menu_item['name']) $menu_structure[(!$path) ? $menu_name.':'.$mlid : $menu_item['path']] = '-- '.$menu_item['name'];

			if(isset($menu_item['childrens']))
			{
				foreach($menu_item['childrens'] as $children_mlid => $children)
				{
					if($children['name']) $menu_structure[$menu_name.':'.$children_mlid] = '---- '.$children['name'];

					if(isset($children['childrens'])){

						foreach($children['childrens'] as $children2_mlid => $children2)
						{
							if($children2['name']) $menu_structure[$menu_name.':'.$children2_mlid] = '------ '.$children2['name'];

							if(isset($children2['childrens'])){

								foreach($children2['childrens'] as $children3_mlid => $children3)
								{
									if($children3['name']) $menu_structure[$menu_name.':'.$children3_mlid] = '-------- '.$children3['name'];

									if(isset($children3['childrens'])){

										foreach($children3['childrens'] as $children4_mlid => $children4)
										{
											if($children4['name']) $menu_structure[$menu_name.':'.$children4_mlid] = '---------- '.$children4['name'];

											if(isset($children4['childrens'])){

												foreach($children4['childrens'] as $children5_mlid => $children5)
												{
													if($children5['name']) $menu_structure[$menu_name.':'.$children5_mlid] = '------------ '.$children5['name'];

													if(isset($children5['childrens'])){

														foreach($children5['childrens'] as $children6_mlid => $children6)
														{
															if($children6['name']) $menu_structure[$menu_name.':'.$children6_mlid] = '-------------- '.$children6['name'];

															if(isset($children6['childrens'])){

																foreach($children6['childrens'] as $children7_mlid => $children7)
																{
																	if($children7['name']) $menu_structure[$menu_name.':'.$children7_mlid] = '-------------- '.$children7['name'];
																}
															}

														}
													}

												}
											}

										}
									}

								}
							}
						}

					}
				}
			}
		}
	}

	return $menu_structure;
}
 

anonymous

+11

ini_set("memory_limit",1024*1024*64); //512MB
 

+10

--   This business function gives you a lot of rope, also enought of rope to hang yourself...
 

anonymous

+9

SELECT k.nzw1 as kontrahent, d.ndok||d.nrdk as numer_dok, d.dtsp as data, k.nakw, d.sndk as wartosc_netto,
               ( SELECT sum(p.cnsp*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr ) asx   
                 wartosc_netto_sp, 
                ( SELECT sum( (p.cnsp-p.ppr_cnzn)*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr ) 
                as marza, 
                ( SELECT count(dd.ndrz) FROM drz dd WHERE dd.nknt_dla=k.nknt and dd.dtsp<'2012-06-01' ) as ile_dok, 
                ( SELECT sum(p.cnsp*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr AND t.anmr is 
                  not null ) as wartosc_netto_sp_leki, 
                ( SELECT sum( (p.cnsp-p.ppr_cnzn)*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr 
                  AND t.anmr is not null ) as marza_leki, 
                ( SELECT sum(p.cnsp*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr AND t.anmr is 
                   null AND t.npst=4) as wartosc_netto_sp_zoo, 
                 ( SELECT sum( (p.cnsp-p.ppr_cnzn)*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr 
                   AND t.anmr is null AND t.npst=4) as marza_zoo, 
                 ( SELECT sum(p.cnsp*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr AND t.anmr is 
                    null AND t.npst<>4) as wartosc_netto_sp_poz, 
                 ( SELECT sum( (p.cnsp-p.ppr_cnzn)*p.ilsp) FROM pro p,twr t WHERE p.ndrz=d.ndrz AND p.ntwr=t.ntwr 
                  AND t.anmr is null AND t.npst<>4) as marza_poz,
                   d.ndrz as id_dok, k.nknt as id_kontrah, d.uwg2 as uwagi, d.sbdk as wartosc_brutto, d.opis 
FROM DRZ d,knt k WHERE d.nknt_dla=k.nknt AND d.rezr<>'T' AND d.nrdk<>'-' AND to_date(d.dtsp,'YYYY-MM-DD') between '2012-07-01' and '2012-07-15' and k.nknt in (4103,6433,5980,6504,6440,6442,6426,6652,6161,6431,6675,6598,5868,6493,6132,6162,6668,6457,5979,6577,6622,6456,6235,6643,6087,5982,7242,7264,7402,7676,7802,7865,7986,8354,8824,6985,6818,6078,9618,9706,9824,9913,9953,10013,10167,10418,10556,10601,10832,11011,11156,11201,11355,11384,11577,12039,12100,12156,6966,12421,12270,12243,12609,6304,12683,12745,12506,13021,5969,6462,5976,12939,12679,5963,12460,10629,12345,12429,11256,12752,12790,13050,12185,10155,13031,12436,12966,12801,13047) ORDER BY d.dtsp,d.ndok
 

-4

            row_dict = {
                'data1'     : row['r_data1'],
                'data2'     : row['c_data1'],
                'data3'     : row['c_data2'],
                'data4'     : row['cfs_data1'],
                'data5'     : row['cfs_data2'],
                'data6'     : row['cfs_data3'],
                'data7'     : row['p_data1'],
                'data8'     : row['p_data2'],
                'data9'     : row['s_data1'],
                'data10'    : row['s_data2'],
            }