Increases revalidation counter

@param string $variableName
187496
public static function increaseRevalidationCounter(string $variableName = '_MF_SESSION_REVALIDATION_COUNTER_'): void
    {
        static::init();
        $variableName = (string)$variableName;
        $vHandler = Variables::getInstance();
        $vHandler->session->set($variableName, $vHandler->session->get($variableName, Variables::TYPE_INT) + 1);
    }
297064
final public function set($varname, $value)
    {

        //If its lock we can't edit
        if ($this->lock)
            return false;

        //Continue
        $previous = isset($this->data[$varname]) ? $this->data[$varname] : null;
        $this->data[$varname] = $value;

        //what to do with previous?

        return $this;
    }
1143270
function getCounterKey($username)
    {
        $k = $this->app['config']->get('cache.namespace');
        $k .= ':failed_login_counter.';
        $k .= $username;

        return $k;
    }
1044681
public void setNumberOfVars(final int num) {
    if (this.varnum != 0)
      throw new UnsupportedOperationException("Variable number is already set. Resetting it is not supported");
    if (num < 1 || num > MAXVAR)
      throw new IllegalArgumentException("Invalid variable number: " + num);
    this.vars = new int[num * 2];
    this.level2var = new int[num + 1];
    this.refstack = new int[num * 2 + 4];
    this.refstacktop = 0;
    while (this.varnum < num) {
      this.vars[this.varnum * 2] = pushRef(makeNode(this.varnum, 0, 1));
      this.vars[this.varnum * 2 + 1] = makeNode(this.varnum, 1, 0);
      popref(1);
      this.nodes[this.vars[this.varnum * 2]].refcou = MAXREF;
      this.nodes[this.vars[this.varnum * 2 + 1]].refcou = MAXREF;
      this.level2var[this.varnum] = this.varnum;
      this.varnum++;
    }
    this.nodes[0].level = num;
    this.nodes[1].level = num;
    this.level2var[num] = num;
    varResize();
  }
1219360
protected function iniGetBool($varname)
    {
        $varvalue = ini_get($varname);

        switch (strtolower($varvalue)) {
            case 'on':
            case 'yes':
            case 'true':
                return 'assert.active' !== $varname;
            case 'stdout':
            case 'stderr':
                return 'display_errors' === $varname;
            default:
                return (bool)(int)$varvalue;
        }
    }
1053701
public function CheckRequirements($ApplicationName) {
      $AvailableApplications = $this->AvailableApplications();
      $RequiredApplications = ArrayValue('RequiredApplications', ArrayValue($ApplicationName, $AvailableApplications, array()), FALSE);
      $EnabledApplications = $this->EnabledApplications();
      CheckRequirements($ApplicationName, $RequiredApplications, $EnabledApplications, 'application');
   }
438670
public void updateVariableName(String varName, String withName) {
        SDVariable oldVarNameRef = getVariable(varName);
        Variable v = variables.remove(varName);
        String oldVarName = varName;
        oldVarNameRef.setVarName(withName);
        v.setName(withName);
        variables.put(withName, v);

        for(SameDiffOp op : ops.values()){
            List<String> outputsOfOp = op.getOutputsOfOp();
            if(outputsOfOp != null && !outputsOfOp.isEmpty()) {
                for (int i = 0; i < outputsOfOp.size(); i++) {
                    if (outputsOfOp.get(i).equals(oldVarName)) {
                        outputsOfOp.set(i, withName);
                    }
                }
            }

            List<String> inputsToOp = op.getInputsToOp();
            if(inputsToOp != null && !inputsToOp.isEmpty()) {
                for (int i = 0; i < inputsToOp.size(); i++) {
                    if (inputsToOp.get(i).equals(oldVarName)) {
                        inputsToOp.set(i, withName);
                    }
                }
            }
        }

//        if (variableNameToArr.containsKey(oldVarName)) {
//            val arr = variableNameToArr.remove(oldVarName);
//            variableNameToArr.put(withName, arr);
//        }


        if (variableNameToShape.containsKey(oldVarName)) {
            val shape = variableNameToShape.remove(oldVarName);
            variableNameToShape.put(withName, shape);
        }

        if (forwardVarForGrad.containsKey(oldVarName)) {
            val forwardGrad = forwardVarForGrad.remove(oldVarName);
            forwardVarForGrad.put(withName, forwardGrad);
        }


        if (v.getInputsForOp() != null) {
            List<String> funcNames = v.getInputsForOp();
            for (String s : funcNames) {
                DifferentialFunction func = ops.get(s).getOp();
                if (func instanceof BaseOp) {
                    BaseOp baseOp = (BaseOp) func;
                    if (baseOp.getXVertexId() != null && baseOp.getXVertexId().equals(oldVarName)) {
                        baseOp.setXVertexId(withName);
                    }

                    if (baseOp.getYVertexId() != null && baseOp.getYVertexId().equals(oldVarName)) {
                        baseOp.setYVertexId(withName);
                    }

                    if (baseOp.getZVertexId() != null && baseOp.getZVertexId().equals(oldVarName)) {
                        baseOp.setZVertexId(withName);
                    }

                }
            }
        }


        if (v.getOutputOfOp() != null) {
            DifferentialFunction func = ops.get(v.getOutputOfOp()).getOp();
            if (func instanceof BaseOp) {
                BaseOp baseOp = (BaseOp) func;
                if (baseOp.getXVertexId() != null && baseOp.getXVertexId().equals(oldVarName)) {
                    baseOp.setXVertexId(withName);
                }

                if (baseOp.getYVertexId() != null && baseOp.getYVertexId().equals(oldVarName)) {
                    baseOp.setYVertexId(withName);
                }

                if (baseOp.getZVertexId() != null && baseOp.getZVertexId().equals(oldVarName)) {
                    baseOp.setZVertexId(withName);
                }
            }
        }
    }
58391
def increase_and_check_counter(self):
        '''  '''
        self.counter += 1
        self.counter %= self.period
        if not self.counter:
            return True
        else:
            return False
1260040
public function add($varname, $value)
    {
        if ($this->exists($varname)) {
            return false;
        }

        $this->_vars[$varname] = $value;
        return true;
    }
1333209
public function filterRequest($variableName) {
        if(!is_string($variableName)) {
            throw new \Exception('Variable name expected as string');
        }
        
        if(!isset($_REQUEST[$variableName])) {
            return null;
        }
        
        return $this->filter($_REQUEST[$variableName]);
    }
142339
public final int getVariableByName(String variableName) {
    int index = getVariableIndex(variableName);
    if (index == -1) {
      return index;
    } else {
      return nums[index];
    }
  }
758700
protected function setValueAndCheckIfModified($propertyName, $value)
    {
        if ($this->{$propertyName} !== $value) {
            $this->isModified = true;
        }

        $this->{$propertyName} = $value;
    }
831344
private function runIfNotCached($variableName, callable $function)
    {
        if (null === $this->{$variableName}) {
            // Only assign that don't returns
            if (null !== $result = $function()) {
                $this->{$variableName} = $result;
            }
        }
    }
886231
def increment(self, name, value):
        
        for counter in self._counters:
            counter.increment(name, value)
1140174
public function setVariable(Variable $variable)
    {
        $this->checkType($variable);
        $data = &$this->getDataPlaceHolder();
        $data[$variable->getIdentifier()] = $variable;
    }
738783
protected function expandEmptyFlag($varname) {
    $flagname = 'has'.ucfirst($varname);

    $this->expandVar($flagname, isset($this->templateVars->$varname) && !empty($this->templateVars->$varname));
  }
40065
public static function doesNeedRevalidation(string $variableName = '_MF_SESSION_REVALIDATED_AT_'): bool
    {
        static::init();
        $variableName = (string)$variableName;
        $vHandler = Variables::getInstance();
        $validationTS = $vHandler->session->get($variableName, $vHandler::TYPE_INT);
        return $validationTS < \time() - static::$revalidationTime ? true : false;
    }