----------------------------------------------------------------------
554366
public function getCanvasOps()
        {
            $ops = array();
            
            foreach ($this->paths as $path) {
                switch ($path[0]) {
                    case QR_AREA_PATH:
                            $pNum = 0;
                            
                            foreach($path[1] as $pathDetails) {
                                if ($pNum == 0) {
                                    $ops[] = 'S';
                                } else if ($pNum > 0) {
                                    $ops[] = 'W';
                                }
                                
                                $ops[] = 'B';
                                
                                $px = array_shift($pathDetails);
                                $py = array_shift($pathDetails);
                                
                                $ops[] = 'M';
                                $ops[] = $px;
                                $ops[] = $py;
                                
                                $rle_steps = array_shift($pathDetails);
                                
                                $lastOp = '';
                                
                                while(count($rle_steps) > 0) {
                                
                                    $delta = 1;
                                    
                                    $operator = array_shift($rle_steps);
                                    if (($operator != 'R') && ($operator != 'L') && ($operator != 'T') && ($operator != 'B')) {
                                        $delta = (int)$operator;
                                        $operator = array_shift($rle_steps);
                                    }
                                    
                                    if ($operator == 'R') $px += $delta;
                                    if ($operator == 'L') $px -= $delta;
                                    if ($operator == 'T') $py -= $delta;
                                    if ($operator == 'B') $py += $delta;
                                    
                                    if ($lastOp != 'T')
                                        $ops[] = 'T';
                                        
                                    $ops[] = $px;
                                    $ops[] = $py;
                                    
                                    $lastOp = 'T';
                                }
                                
                                $ops[] = 'E';
                                
                                $pNum++;
                            }
    
                        break;
                    case QR_AREA_POINT:
                                
                                $symb = array_shift($path);
                                
                                $ops[] = 'S';
                                
                                $lastOp = '';
                                
                                while(count($path) > 0) {
                                    $px = array_shift($path);
                                    $py = array_shift($path);
                                    
                                    if ($lastOp != 'P')
                                        $ops[] = 'P';
                                        
                                    $ops[] = $px;
                                    $ops[] = $py;
                                    
                                    $lastOp = 'P';
                                }
                                
                        break;
                        
                    case QR_AREA_RECT:
                                
                                $symb = array_shift($path);
                                
                                $ops[] = 'S';
                                
                                $lastOp = '';
                                
                                while(count($path) > 0) {
                                    $px = array_shift($path);
                                    $py = array_shift($path);
                                    $ex = array_shift($path);
                                    $ey = array_shift($path);
                                    
                                    if ($lastOp != 'R')
                                        $ops[] = 'R';
                                        
                                    $ops[] = $px;
                                    $ops[] = $py;
                                    $ops[] = $ex-$px;
                                    $ops[] = $ey-$py;
                                    
                                    $lastOp = 'R';
                                }
                                
                        break;                      
                        
                    case QR_AREA_LSHAPE:
                                
                                $symb = array_shift($path);
                                
                                while(count($path) > 0) {
                                    $px = array_shift($path);
                                    $py = array_shift($path);
                                    $mode = (int)array_shift($path);
                                    
                                    $pxd = ($mode % 2)?1:0;
                                    $pyd = ($mode > 1)?1:0;
                                    
                                    $ops[] = 'S';
                                    $ops[] = 'R';
                                    $ops[] = $px;
                                    $ops[] = $py;
                                    $ops[] = 2;
                                    $ops[] = 2;
                                    
                                    $ops[] = 'W';
                                    $ops[] = 'P';
                                    $ops[] = $px+$pxd;
                                    $ops[] = $py+$pyd;
                                }
                                
                        break;  
                        
                    case QR_AREA_TRACKER:
                                
                                $symb = array_shift($path);
                                
                                $px = array_shift($path);
                                $py = array_shift($path);
                                    
                                $ops[] = 'S';
                                $ops[] = 'O';
                                $ops[] = $px;
                                $ops[] = $py;
                                    
                        break;  
                }
            }
            
            return self::compactCanvasCommands($ops);
        }
97386
public function init()
    {
        if (!$this->getQuery()) {
            throw new \RuntimeException('Uninitialized QueryBuilder');
        }

        $this->resetIterator();
        $this->setNbResults($this->computeNbResult());

        if (0 == $this->getPage() || 0 == $this->getMaxPerPage() || 0 == $this->getNbResults()) {
            $this->setLastPage(0);
            $this->getQuery()->setFirstResult(0);
            $this->getQuery()->setMaxResults(0);
        } else {
            $offset = ($this->getPage() - 1) * $this->getMaxPerPage();
            $this->setLastPage(ceil($this->getNbResults() / $this->getMaxPerPage()));
            $this->getQuery()->setFirstResult($offset);
            $this->getQuery()->setMaxResults($this->getMaxPerPage());
        }
    }
289667
public function init() {

		parent::init();

		// Views
		$this->setViewPath( '@cmsgears/module-community/admin/views/group/member' );

		// Permission
		$this->crudPermission = CmnGlobal::PERM_GROUP_ADMIN;

		// Services
		$this->modelService = Yii::$app->factory->get( 'groupMemberService' );

		$this->parentService = Yii::$app->factory->get( 'groupService' );

		$this->userService		= Yii::$app->factory->get( 'userService' );
		$this->memberService	= Yii::$app->factory->get( 'siteMemberService' );

		$this->roleService	= Yii::$app->factory->get( 'roleService' );

		// Super Admin
		$superRole = $this->roleService->getBySlugType( CoreGlobal::ROLE_SUPER_ADMIN, CoreGlobal::TYPE_SYSTEM );

		$this->superRoleId = isset( $superRole ) ?$superRole->id : null;
	}
1009299
public function join($element)
	{
		if($element->slave!==null)
			$this->join($element->slave);
		if(!empty($element->relation->select))
			$this->selects[]=$element->getColumnSelect($element->relation->select);
		$this->conditions[]=$element->relation->condition;
		$this->orders[]=$element->relation->order;
		$this->joins[]=$element->getJoinCondition();
		$this->joins[]=$element->relation->join;
		$this->groups[]=$element->relation->group;
		$this->havings[]=$element->relation->having;

		if(is_array($element->relation->params))
		{
			if(is_array($this->params))
				$this->params=array_merge($this->params,$element->relation->params);
			else
				$this->params=$element->relation->params;
		}
		$this->elements[$element->id]=true;
	}
168113
@Override
  public void aggregate()
  {
    final IndexedInts keys = keySelector.getRow();
    for (int i = 0; i < valueSelectors.length; i++) {
      values[i] = valueSelectors[i].getDouble();
    }
    synchronized (this) {
      for (int i = 0, keysSize = keys.size(); i < keysSize; i++) {
        final String key = keySelector.lookupName(keys.get(i));
        sketch.update(key, values);
      }
    }
  }
836330
public function next()
    {
        if (!$this->stack->isEmpty()) {
            $this->stack->last()->next();
            $this->discardInvalid();
        }
    }
245242
private function init()
    {
        /** @var $genericDevice \Wurfl\Device\ModelDeviceInterface */
        $genericDevice = $this->getDevice(WurflConstants::GENERIC);

        if (!is_null($genericDevice)) {
            $this->capabilitiesName       = array_keys($genericDevice->getCapabilities());
            $this->groupIDCapabilitiesMap = $genericDevice->getGroupIdCapabilitiesNameMap();
        }
    }
1306724
public function initialize()
    {
        if (null !== $this->collection) {
            return;
        }

        if (empty($this->dbOptions['database'])) {
            throw new \RuntimeException('The option "database" must be set');
        }
        if (empty($this->dbOptions['collection'])) {
            throw new \RuntimeException('The option "collection" must be set');
        }

        $this->collection = $this
            ->mongo
            ->selectDB($this->dbOptions['database'])
            ->selectCollection($this->dbOptions['collection']);
    }
6957
private void init() {
        quantiles = new double[data.length][8];
        for (int i = 0; i < data.length; i++) {
            int n = data[i].length;
            Arrays.sort(data[i]);
            quantiles[i][1] = data[i][n / 4];
            quantiles[i][2] = data[i][n / 2];
            quantiles[i][3] = data[i][3 * n / 4];
            quantiles[i][5] = quantiles[i][3] - quantiles[i][1]; // interquartile range
            quantiles[i][6] = quantiles[i][1] - 1.5 * quantiles[i][5];
            quantiles[i][7] = quantiles[i][3] + 1.5 * quantiles[i][5];
            quantiles[i][0] = quantiles[i][6] < data[i][0] ? data[i][0] : quantiles[i][6];
            quantiles[i][4] = quantiles[i][7] > data[i][data[i].length - 1] ? data[i][data[i].length - 1] : quantiles[i][7];
        }
    }
536938
public function initialize()
    {

        $this->length = null;
        $this->life = null;
        $this->autoApprove = false;
        $this->expires = null;

    }
379123
public function initialize()
    {
        $this->initializeConnections();
        $this->_table and $this->setSource($this->_table);
        $this->keepSnapshots(true);
    }
807856
public function init()
    {
        parent::init();

        $this->configs = array_replace_recursive($this->configs, ['dataProvider' => $this->dataProvider]);
        $this->configs = array_replace_recursive($this->configs, ['columns' => $this->columns]);
        $this->configs = array_replace_recursive($this->configs, ['dataProvider' => $this->dataProvider]);
        $this->configs = array_replace_recursive($this->configs, ['filterModel' => $this->filterModel]);
        $this->configs = array_replace_recursive($this->configs, ['filterModel' => $this->pjax]);

        if ('' != $this->id) {
            $this->configs = array_replace_recursive($this->configs, ['id' => $this->id]);
        }

        GridViewAsset::register($this->getView());
    }
1232986
private void init() {
        if (initialized.compareAndSet(false, true)) {
            final RowSorter<? extends TableModel> rowSorter = table.getRowSorter();
            rowSorter.toggleSortOrder(1); // sort by date
            rowSorter.toggleSortOrder(1); // descending
            final TableColumnModel columnModel = table.getColumnModel();
            columnModel.getColumn(1).setCellRenderer(dateRenderer);
            columnModel.getColumn(2).setCellRenderer(sizeRenderer);
        }
    }
848488
public function defineMethods()
    {
        parent::defineMethods();

        if (static::class === self::class) {
            return;
        }

        // Set up accessors for joined items
        if ($manyMany = $this->manyMany()) {
            foreach ($manyMany as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getManyManyComponents');
            }
        }
        if ($hasMany = $this->hasMany()) {
            foreach ($hasMany as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getComponents');
            }
        }
        if ($hasOne = $this->hasOne()) {
            foreach ($hasOne as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getComponent');
            }
        }
        if ($belongsTo = $this->belongsTo()) {
            foreach (array_keys($belongsTo) as $relationship) {
                $this->addWrapperMethod($relationship, 'getComponent');
            }
        }
    }
701946
public function initRuntime()
    {
        $this->runtimeInitialized = true;

        foreach ($this->getExtensions() as $extension) {
            $extension->initRuntime($this);
        }
    }
1155837
public function init(): void
    {
        if ($this->sourcePath !== null) {
            $this->sourcePath = $this->findPath($this->sourcePath);
        }
        if ($this->basePath !== null) {
            $this->basePath = $this->findPath($this->basePath);
        }
        if ($this->baseUrl !== null) {
            $this->baseUrl = rtrim(Yii::getAlias($this->baseUrl), '/');
        }
    }
1024039
public function initializeObject()
    {
        if ($this->cache->has('rulesets') && $this->cache->has('rulesetsIndices')) {
            $this->rulesets = $this->cache->get('rulesets');
            $this->rulesetsIndices = $this->cache->get('rulesetsIndices');
        } else {
            $this->generateRulesets();
            $this->cache->set('rulesets', $this->rulesets);
            $this->cache->set('rulesetsIndices', $this->rulesetsIndices);
        }
    }