Ustawienia parametrów poszczególnych kolumn
325262
public function ajax()
    {
        $builder = $this->prepare()
                ->filterColumn('field_1', function($query, $keyword) {
                    $keywordLower = mb_strtolower($keyword);
                    $keywordUpper = mb_strtoupper($keyword);
                    return $query->where('value', 'like', "%$keywordLower%")->orWhere('value', 'like', "%$keywordUpper%");
                })
                ->filterColumn('field_2', function($query, $keyword) {
            $keywordLower = mb_strtolower($keyword);
            $keywordUpper = mb_strtoupper($keyword);
            return $query->where('value', 'like', "%$keywordLower%")->orWhere('value', 'like', "%$keywordUpper%");
        });
        if (!auth()->guest() && !auth()->user()->hasRoles('member')) {
            $builder->editColumn('user_id', function($row) {
                $user = $row->user;
                return is_null($user) ? '---' : HTML::link(handles('antares/foundation::users/' . $user->id), '#' . $user->id . ' ' . $user->fullname);
            });
        }

        return $builder->editColumn('field_1', $this->getFieldOneColumnValue())
                        ->editColumn('field_2', $this->getFieldRow('field_2'))
                        ->addColumn('action', function($row) {
                            return $this->rowActions($row);
                        })->make(true);
    }
67032
def _param_grad_helper(self, dL_dK, X, X2, target):
        """"""
        if X2 is None: X2 = X
        dist = np.abs(X - X2.T)

        ly=1/self.lengthscaleY
        lu=np.sqrt(3)/self.lengthscaleU
        #ly=self.lengthscaleY
        #lu=self.lengthscaleU

        dk1theta1 = np.exp(-ly*dist)*2*(-lu)/(lu+ly)**3
        #c=np.sqrt(3)
        #t1=c/lu
        #t2=1/ly
        #dk1theta1=np.exp(-dist*ly)*t2*( (2*c*t2+2*t1)/(c*t2+t1)**2 -2*(2*c*t2*t1+t1**2)/(c*t2+t1)**3   )
        
        dk2theta1 = 1*( 
            np.exp(-lu*dist)*dist*(-ly+2*lu-lu*ly*dist+dist*lu**2)*(ly-lu)**(-2) + np.exp(-lu*dist)*(-2+ly*dist-2*dist*lu)*(ly-lu)**(-2) 
            +np.exp(-dist*lu)*(ly-2*lu+ly*lu*dist-dist*lu**2)*2*(ly-lu)**(-3) 
            +np.exp(-dist*ly)*2*(ly-lu)**(-2)
            +np.exp(-dist*ly)*2*(2*lu-ly)*(ly-lu)**(-3)
            )
      
        dk3theta1 = np.exp(-dist*lu)*(lu+ly)**(-2)*((2*lu+ly+dist*lu**2+lu*ly*dist)*(-dist-2/(lu+ly))+2+2*lu*dist+ly*dist)

        dktheta1 = self.varianceU*self.varianceY*(dk1theta1+dk2theta1+dk3theta1)




        dk1theta2 = np.exp(-ly*dist) * ((lu+ly)**(-2)) * (  (-dist)*(2*lu+ly)  +  1  +  (-2)*(2*lu+ly)/(lu+ly)  )

        dk2theta2 = 1*(
            np.exp(-dist*lu)*(ly-lu)**(-2) * ( 1+lu*dist+(-2)*(ly-2*lu+lu*ly*dist-dist*lu**2)*(ly-lu)**(-1) )
            +np.exp(-dist*ly)*(ly-lu)**(-2) * ( (-dist)*(2*lu-ly) -1+(2*lu-ly)*(-2)*(ly-lu)**(-1) )
            )

        dk3theta2 = np.exp(-dist*lu) * (-3*lu-ly-dist*lu**2-lu*ly*dist)/(lu+ly)**3

        dktheta2 = self.varianceU*self.varianceY*(dk1theta2 + dk2theta2 +dk3theta2)



        k1 = np.exp(-ly*dist)*(2*lu+ly)/(lu+ly)**2
        k2 = (np.exp(-lu*dist)*(ly-2*lu+lu*ly*dist-lu**2*dist) + np.exp(-ly*dist)*(2*lu-ly) ) / (ly-lu)**2 
        k3 = np.exp(-lu*dist) * ( (1+lu*dist)/(lu+ly) + (lu)/(lu+ly)**2 )
        dkdvar = k1+k2+k3

        target[0] += np.sum(self.varianceY*dkdvar * dL_dK)
        target[1] += np.sum(self.varianceU*dkdvar * dL_dK)
        target[2] += np.sum(dktheta1*(-np.sqrt(3)*self.lengthscaleU**(-2)) * dL_dK)
        target[3] += np.sum(dktheta2*(-self.lengthscaleY**(-2)) * dL_dK)
882702
function evaluateTypedParameters(node, msg, param, type) {
        console.log('eval - p:%s, t:%s', param, type);
        let prop;
        if (type === 'jsonata') {
            prop = RED.util.evaluateJSONataExpression(param, msg);
        } else {
            prop = RED.util.evaluateNodeProperty(param, type, node, msg);
        }
        return prop;
    }
440377
public function getGrouppedAttributeValues()
    {
        $grouppedByAttributeKey = new \Mmi\DataObject();
        //wyszukiwanie wartości
        foreach ($this->getAttributeValues() as $record) {
            //pobieranie klucza atrybutu (w celu zgrupowania
            $key = $record->getJoined('cms_attribute')->key;
            if ($record->getJoined('cms_attribute_type')->multiple) {
                if (!$grouppedByAttributeKey->$key) {
                    $grouppedByAttributeKey->$key = new \Mmi\Orm\RecordCollection;
                }
                $grouppedByAttributeKey->$key->append($record);
                continue;
            }
            //atrybut to uploader
            if ($record->getJoined('cms_attribute_type')->uploader) {
                //dołączanie plików
                $grouppedByAttributeKey->$key = \Cms\Orm\CmsFileQuery::byObject($record->value, $this->_objectId)->find();
                continue;
            }
            //atrybut zwykły
            $grouppedByAttributeKey->$key = $record->value;
        }
        //zwrot zgrupowanych wartości atrybutów
        return $grouppedByAttributeKey;
    }
80559
public function getMvcPreviewParamsAsRequest()
    {
        $mvcParams = [];
        //parsowanie ciągu
        parse_str($this->mvcPreviewParams, $mvcParams);
        return new \Mmi\Http\Request($mvcParams);
    }
883621
def _initParams(self, init_method=None):
        
        if self.bgRE:
            if init_method=='random':
                params0 = {'covar': sp.randn(self._gpNull.covar.getNumberParams())}
            else:
                if self.P==1:
                    params0 = {'covar':sp.sqrt(0.5) * sp.ones(2)}
                else:
                    cov = 0.5*sp.cov(self.Y.T) + 1e-4*sp.eye(self.P)
                    chol = la.cholesky(cov, lower=True)
                    params = chol[sp.tril_indices(self.P)]
                    params0 = {'covar': sp.concatenate([params, params])}
        else:
            if self.P==1:
                params_cn = sp.array([1.])
            else:
                cov = sp.cov(self.Y.T) + 1e-4*sp.eye(self.P)
                chol = la.cholesky(cov, lower=True)
                params_cn = chol[sp.tril_indices(self.P)]
            params0 = {'covar': params_cn}
        return params0
320522
def p_parameter_1(p):
    
    args = {}
    if len(p) == 4:
        args['is_array'] = True
        args['array_size'] = p[3]
    p[0] = CIMParameter(p[2], p[1], **args)
193905
protected function _createTempFiles()
    {
        //jeśli już są pliki tymczasowe, to wychodzimy
        if ((new \Cms\Orm\CmsFileQuery)
            ->byObject('tmp-' . $this->getUploaderObject(), $this->getUploaderId())
            ->count()) {
            return true;
        }
        $objectId = null;
        if ($this->_form->hasRecord()) {
            $objectId = $this->_form->getRecord()->getPk();
        }
        //tworzymy pliki tymczasowe - linki do oryginałów
        \Cms\Model\File::link($this->getUploaderObject(), $objectId, 'tmp-' . $this->getUploaderObject(), $this->getUploaderId());
        return true;
    }
1057314
public function thumbnailAction()
    {
        if (!$this->getPost()->cmsFileId) {
            return $this->_jsonError(179);
        }
        //szukamy rekordu pliku
        if (null !== $record = (new CmsFileQuery)->findPk($this->getPost()->cmsFileId)) {
            //sprawdzenie czy obrazek
            if ($record->class === 'image') {
                try {
                    $thumb = new \Cms\Mvc\ViewHelper\Thumb();
                    $url = $thumb->thumb($record, 'scaley', '60');
                    if (!empty($url)) {
                        return json_encode(['result' => 'OK', 'url' => $url]);
                    }
                } catch (\Exception $ex) {
                    
                }
            }
        }
        return $this->_jsonError(179);
    }
257468
def params
      {}.
      merge!(base_params).
      merge!(tracker_default_params).
      merge!(global_options_params).
      merge!(hit_params).
      merge!(custom_dimensions).
      merge!(custom_metrics).
      merge!(measurement_params).
      reject {|_,v| v.nil?}
    end
616397
def _param_grad_helper(self, dL_dK, X, X2, target):
        """"""
        self._K_computations(X, X2)
        self._dK_computations(dL_dK)
        if X2==None:
            gmapping = self.mapping.df_dtheta(2*self._dL_dl[:, None], X)
        else:
            gmapping = self.mapping.df_dtheta(self._dL_dl[:, None], X)
            gmapping += self.mapping.df_dtheta(self._dL_dl_two[:, None], X2)

        target+= np.hstack([(dL_dK*self._K_dvar).sum(), gmapping])
310072
public function handleRequest()
    {
        //obsługa danych z POST
        $post = FrontController::getInstance()->getRequest()->getPost();
        //brak posta
        if ($post->isEmpty()) {
            return;
        }
        //niedozwolone na ACL (w edycji na polu operacje)
        if ($this->_checkbox->getGrid()->getColumn('_operation_') && !(new AclAllowed)->aclAllowed($this->_checkbox->getGrid()->getColumn('_operation_')->getOption('editParams'))) {
            return;
        }
        if ($this->_changeRecord($post)) {
            exit;
        }
    }
1343350
public function beforeSave()
    {
        $mvcParams = [];
        //parsowanie mvcParams
        parse_str($this->getElement('mvcParams')->getValue(), $mvcParams);
        //zapis do obiektu
        $this->getRecord()->module = isset($mvcParams['module']) ? $mvcParams['module'] : null;
        $this->getRecord()->controller = isset($mvcParams['controller']) ? $mvcParams['controller'] : null;
        $this->getRecord()->action = isset($mvcParams['action']) ? $mvcParams['action'] : null;
    }
181488
@Override
	public void executeTemplate(String templateName, Map<String, Object> properties, String workDir) {
		// Pobieranie definicji szablonu do użycia:
		Template<?> template = templateProvider.get(templateName, null, null, null);
		if(template == null) {
			throw new RuntimeException("Nie znaleziono szablonu " + templateName);
		}
		if(template.isAbstract()) {
			throw new AbstractTemplateException(templateName);
		}

		// Weryfikowanie definicji szablonu, szablonu nadrzędnego i wszystkich
		// szablonów używanych. Sprawdzanie dostępność klas silników generatorów.
		templateVerifier.verifyTemplate(template, templateProvider);

		MapStack<String, Object> propertiesStack = new SimpleMapStack<String,Object>();
		propertiesStack.push(new HashMap<String, Object>(properties));
		doExecuteTemplate(template, propertiesStack, workDir);
		propertiesStack.pop();
	}
362004
public function pluploadAction()
    {
        set_time_limit(5 * 60);
        //obiekt handlera plupload
        $pluploadHandler = new Model\PluploadHandler();
        //jeśli wystąpił błąd
        if (!$pluploadHandler->handle()) {
            return $this->_jsonError($pluploadHandler->getErrorCode(), $pluploadHandler->getErrorMessage());
        }
        //jeśli wykonać operację po przesłaniu całego pliku i zapisaniu rekordu
        if ($this->getPost()->afterUpload && null !== $record = $pluploadHandler->getSavedCmsFileRecord()) {
            $this->_operationAfter($this->getPost()->afterUpload, $record);
        }
        return json_encode(['result' => 'OK', 'cmsFileId' => $pluploadHandler->getSavedCmsFileId()]);
    }
979044
def p_param(self, p):
        ''
        paramlist = [Parameter(rname, rvalue, lineno=p.lineno(2))
                     for rname, rvalue in p[2]]
        p[0] = Decl(tuple(paramlist), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
617749
public function routeStartup()
    {
        //iteracja po pluginach
        foreach (FrontController::getInstance()->getPlugins() as $plugin) {
            //wykonywanie routeStartup() na kolejnych pluginach
            $plugin->routeStartup(FrontController::getInstance()->getRequest());
        }
        //profiler
        FrontController::getInstance()->getProfiler()->event('Mvc\Dispatcher: plugins route startup');
    }