Sets the current query rule for this widget, updating its widget \
        editor if the types do not match.
        
        :param      rule | <QueryRule> || None
175331
def setCurrentRule( self, rule ):
        
        curr_rule = self.currentRule()
        if ( curr_rule == rule ):
            return
        
        self._currentRule = rule
        
        curr_op     = self.uiOperatorDDL.currentText()
        self.uiOperatorDDL.blockSignals(True)
        self.uiOperatorDDL.clear()
        if ( rule ):
            self.uiOperatorDDL.addItems(rule.operators())
            index = self.uiOperatorDDL.findText(curr_op)
            if ( index != -1 ):
                self.uiOperatorDDL.setCurrentIndex(index)
                
        self.uiOperatorDDL.blockSignals(False)
        
        self.updateEditor()
403074
def fw_rule_update(self, data, fw_name=None):
        
        LOG.debug("FW Update Debug")
        self._fw_rule_update(fw_name, data)
654655
def exec_rule(self, rule):
        
        print("running Rule: {0}".format(rule.__name__))
        ant = rule()
        ant.start()
4629
private void updateRuleIndexes(CQIE rule) {
		Function head = rule.getHead();
		ruleIndex.put(head.getFunctionSymbol(), rule);
		updateRuleIndexByBodyPredicate(rule);
	}
990593
def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
        
        self._defer(lambda app: app.add_url_rule(rule,
                                                 endpoint=endpoint,
                                                 view_func=view_func,
                                                 **options))
333771
protected function setDefaultRule()
    {
        if (Yii::$app->getAuthManager()->getRule(RouteRule::RULE_NAME) === null) {
            Yii::$app->getAuthManager()->add(new RouteRule());
        }
    }
454969
public ResultHandlerContext<D, O> check(final Rule<D, O>... rules) {
        if (rules != null) {
            Collections.addAll(registeredRules, rules);
        }
        return this;
    }
866094
protected function setDefaultRule()
    {
        if (RBACHelper::getAuthManager()->getRule(RouteRule::RULE_NAME) === null) {
            RBACHelper::getAuthManager()->add(new RouteRule());
        }
    }
72973
public void setRules(java.util.Collection<Rule> rules) {
        if (rules == null) {
            this.rules = null;
            return;
        }

        this.rules = new java.util.ArrayList<Rule>(rules);
    }
1336585
function(rule) {
      var ans = arguments[1] !== undefined ? [arguments[1]] : [],
          state;
      while (true) {
        state = this.bt.current_state();
        try { ans.push(rule.call(this)) } 
        catch (f) {
          this.bt.catch_mismatch(f);
          this.bt.restore(state);
          break;
        }
      }
      return ans
    }
758436
public void updateRuleBasicInfo(ValidationRule rule) {
        this.orderIdx = rule.orderIdx;
        this.parentDependency = rule.parentDependency;
        this.standardValueType = rule.standardValueType;
        this.validationCheck = rule.validationCheck;
        this.overlapBanRuleName = rule.overlapBanRuleName;
        this.assistType = rule.assistType;
    }
984147
public function setRule($rule)
	{
		if(null === $rule)
		{
			$rule = Dispatch::module() . '/' . Dispatch::control() . '/' . Dispatch::action();
		}
		$this->rule = $rule;
	}
383838
def set_default(cls, rules):
    """"""
    if not isinstance(rules, JarRules):
      raise ValueError('The default rules must be a JarRules instance.')
    cls._DEFAULT = rules
402147
function(rule) {
      var state = this.bt.current_state();
      try { return rule.call(this); } 
      catch(f) {
        this.bt.catch_mismatch(f);
        this.bt.restore(state);
      }
    }
829802
def on_rule(self, *args):
        """"""
        if self.rule is None:
            return
        self.rule.connect(self._listen_to_rule)
486246
def store_rule(self, rule_id, rule):
        
        if rule_id not in self.rules:
            self.rules[rule_id] = rule
            self.rule_cnt += 1
94383
def _set_rules(self, rules: dict, overwrite=True):
        """"""

        if not isinstance(rules, dict):
            raise TypeError('rules must be an instance of dict or Rules,'
                            'got %r instead' % type(rules))

        if overwrite:
            self.rules = Rules(rules, self.default_rule)
        else:
            self.rules.update(rules)