Sets variables to calculate the statistic measures
@return array $var Return the array with the variables
338435
static public function setStatVariables(array $ngram, int $totalNgrams)
    {
        $var['jointFrequency']          = $ngram[0];       # n111 whole trigram freq
        $var['firstFrequency']          = $ngram[1];       # n1pp single freq of first word
        $var['secondFrequency']         = $ngram[2];       # np1p single freq of second word
        $var['thirdFrequency']          = $ngram[3];       # npp1 single freq of third word
        $var['firstSecondFrequency']   = $ngram[4];       # n11p freq of first with the second word
        $var['firstThirdFrequency']    = $ngram[5];       # n1p1 freq of second with the third word
        $var['secondThirdFrequency']   = $ngram[6];       # np11 freq of first with the third word

        $var['n112'] = $var['firstSecondFrequency'] - $var['jointFrequency'];
        $var['n211'] = $var['secondThirdFrequency'] - $var['jointFrequency'];
        $var['n212'] = $var['secondFrequency'] - $var['jointFrequency'] - $var['n112'] - $var['n211'];

	    $var['n121'] = $var['firstThirdFrequency'] - $var['jointFrequency'];
        $var['n122'] = $var['firstFrequency'] - $var['jointFrequency'] - $var['n112'] - $var['n121'];
        $var['n221'] = $var['thirdFrequency'] - $var['jointFrequency'] - $var['n211'] - $var['n121'];
        $var['nppp'] = $totalNgrams;
	    $var['n222'] = $var['nppp'] - ($var['jointFrequency'] + $var['n112'] + $var['n121'] + $var['n122'] + $var['n211'] + $var['n212'] + $var['n221']);
    	$var['n2pp'] = $var['nppp'] - $var['firstFrequency'];
        $var['np2p'] = $var['nppp'] - $var['secondFrequency'];
        $var['npp2'] = $var['nppp'] - $var['thirdFrequency'];

        $var['e111'] = $var['firstFrequency'] * $var['secondFrequency'] * $var['thirdFrequency']/($var['nppp']**2);
        $var['e112'] = $var['firstFrequency'] * $var['secondFrequency'] * $var['npp2']/($var['nppp']**2);
        $var['e121'] = $var['firstFrequency'] * $var['np2p'] * $var['thirdFrequency']/($var['nppp']**2);
        $var['e122'] = $var['firstFrequency'] * $var['np2p'] * $var['npp2']/($var['nppp']**2);
        $var['e211'] = $var['n2pp'] * $var['secondFrequency'] * $var['thirdFrequency']/($var['nppp']**2);
        $var['e212'] = $var['n2pp'] * $var['secondFrequency'] * $var['npp2']/($var['nppp']**2);
        $var['e221'] = $var['n2pp'] * $var['np2p'] * $var['thirdFrequency']/($var['nppp']**2);
        $var['e222'] = $var['n2pp'] * $var['np2p'] * $var['npp2']/($var['nppp']**2);

        return $var;
    }
311755
public function getVariableRefs()
	{
		$variableRefs = array();

		if ( $this->dataTypes )
		{
			if ( isset( $this->dataTypes['qnameXPath2Expressions'] ) && $this->dataTypes['qnameXPath2Expressions'] )
			foreach ( $this->dataTypes['qnameXPath2Expressions'] as $qnameXPath2Expression )
			{
				$variableRefs = array_merge( $variableRefs, $qnameXPath2Expression->getParameterQNames() );
			}
		}

		return $variableRefs;
	}
753503
public function showVars()
    {
        $what = $this->getParameter('scope');
        switch ( $what ) {
            case 'global':
            case 'globals':
            case 'system':
            case 'systems':
                $debug = $this->getGlobals();
                break;

            default:
                $debug = $this->getLocals();
                break;
        }

        return '<pre>' . JSONUtils::encode($debug, true, false) . '</pre>';
    }
213030
public function getVariables()
    {
        if (!$this->variables->count()) {
            return array();
        }

        // If credentials are not globally defined,
        // check if an action have credentials
        if (null === $this->getVariable('credentials')) {
            $this->variables->set('credentials', false);
            foreach (array_merge(array_values($this->getObjectActions()), array_values($this->getBatchActions())) as $action) {
                if ($action->getCredentials()) {
                    $this->variables->set('credentials', true);
                    break;
                }
            }
        }

        return parent::getVariables();
    }
474967
public function getVariables() 
	{
		if(isset($this->attributes['class'])) {
			$this->attributes['class'] = trim($this
			->attributes['class'].' form-control');
		} else {
			$this->attributes['class'] = 'form-control';
		}
		
		return array(
			'attributes' 	=> $this->attributes,
			'items'			=> $this->items,
			'selected'		=> $this->value);
	}
591521
public function scriptVariables()
    {
        $data = json_encode([
            'locale' => $this->get('locale'),
            'app_name' => $this->get('app_name'),
            'app_skin' => $this->get('app_skin'),
            'app_theme' => $this->get('app_theme'),
            'app_url' => $this->get('app_url'),
        ]);

        if (JSON_ERROR_NONE !== json_last_error()) {
            throw new \RuntimeException(json_last_error_msg());
        }

        return $data;
    }
319211
def variables(self):
        """"""
        variables = set([])
        for node in self.nodes:
            variables.add(node.variable)
        return sorted(variables)
669552
protected function getVariables()
    {
        $reflection = new ReflectionClass($this);
        foreach ($reflection->getProperties(
            ReflectionProperty::IS_PROTECTED |
            ReflectionProperty::IS_PRIVATE |
            ReflectionProperty::IS_STATIC
        ) as $property) {
            $ignore[] = $property->name;
        }
        $values = [];
        foreach ($this as $prop => $value) {
            if (!in_array($prop, $ignore)) {
                if (is_object($value)) {
                    if (method_exists($value, 'jsonSerialize')) {
                        $value = $value->jsonSerialize();
                    } elseif (method_exists($value, 'getArrayCopy')) {
                        $value = $value->getArrayCopy();
                    }
                }
                $values[$prop] = $value;
            }
        }
        return $values;
    }
424625
public function getChannelVariables()
    {
        if ($this->channelVariablesInstance === false) {
            $this->channelVariablesInstance = new ChannelVariablesFacade(
                $this->variables,
                $this->arguments
            );
        }
        return $this->channelVariablesInstance;
    }
510802
public function getNotificationVars()
    {
        $vars = [
            'name'     => $this->name,
            'email'    => $this->email,
            'username' => $this->username,
            'login'    => $this->getLogin(),
            'password' => $this->getOriginalHashValue('password')
        ];

        /*
         * Extensibility
         */
        $result = Event::fire('rainlab.user.getNotificationVars', [$this]);
        if ($result && is_array($result)) {
            $vars = call_user_func_array('array_merge', $result) + $vars;
        }

        return $vars;
    }
572618
public static function VARFunc()
    {
        $returnValue = PHPExcel_Calculation_Functions::DIV0();

        $summerA = $summerB = 0;

        // Loop through arguments
        $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args());
        $aCount = 0;
        foreach ($aArgs as $arg) {
            if (is_bool($arg)) {
                $arg = (integer) $arg;
            }
            // Is it a numeric value?
            if ((is_numeric($arg)) && (!is_string($arg))) {
                $summerA += ($arg * $arg);
                $summerB += $arg;
                ++$aCount;
            }
        }

        if ($aCount > 1) {
            $summerA *= $aCount;
            $summerB *= $summerB;
            $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1));
        }
        return $returnValue;
    }
1116508
public function prepareVars()
    {
        $this->vars['mode'] = $this->mode;
        $this->vars['stretch'] = $this->formField->stretch;
        $this->vars['size'] = $this->formField->size;
        $this->vars['name'] = $this->getFieldName();
        $this->vars['value'] = $this->getLoadValue();
    }
1119135
public function setVars($vars)
    {
        $context = $this->_context;

        $context->vars = array_merge($context->vars, $vars);

        return $this;
    }
80021
public function getVariableRefs()
	{
		$variableRefs = array();

		foreach ( $this->filters as $filter )
		{
			$variableRefs = array_merge( $variableRefs, $filter->getVariableRefs() );
		}

		return $variableRefs;
	}
597890
public function setVariables($variables)
    {
        $this->variables = [];
        foreach ($variables as $var => $value) {
            if ($value instanceof RationalNode) {
                $this->variables[$var] = $value;
            } elseif ($this->isInteger($value)) {
                $this->variables[$var] = new RationalNode(intval($value), 1);
            } else {
                $this->variables[$var] = $this->parseRational($value);
            }
        }
    }
1042202
protected function getParentVars()
    {
        $vars = array();
        $p = $this->getParent();
        while ($p) {
            $vars = array_merge($p->getVars(), $vars);
            $p = $p->getParent();
        }

        return $vars;
    }
1350026
public function getVariables()
    {
        $ret = [];
        foreach ($this->branchVariables as $branchId => $vars) {
            foreach ($vars as $var) {
                $ret[$var->getName()] = $var;
            }
        }

        return $ret;
    }