Represents the deployment state of the chain.
@alias module:blockchain.DeploymentState
@constructor
@property {VerifyFlags} flags
@property {LockFlags} lockFlags
@property {Boolean} bip34
961604
function DeploymentState() {
  if (!(this instanceof DeploymentState))
    return new DeploymentState();

  this.flags = Script.flags.MANDATORY_VERIFY_FLAGS;
  this.flags &= ~Script.flags.VERIFY_P2SH;
  this.lockFlags = common.lockFlags.MANDATORY_LOCKTIME_FLAGS;
  this.bip34 = false;
  this.bip91 = false;
  this.bip148 = false;
}
1023969
function State(state) {
    if ( state === void 0 ) state = {};

    Object.defineProperty(this, "_", {
        value: new Subscriber()
    });
    this.update(state);
}
77140
def transition(start_states, end_states)
      # Convert end_states into canonical hash form.
      canonical_end_states = canonical_hash_form(end_states)

      Array(start_states).each do |start_state|
        # Validate start state.
        unless self.valid_states.include?(start_state)
          abort "Invalid state :#{start_state}. Must be one of the symbols #{self.valid_states.map{|x| ":#{x}"}.join(', ')}"
        end

        # Create a new metric to hold the task, end states, and conditions.
        m = Metric.new(self, canonical_end_states)

        if block_given?
          # Let the config file define some conditions on the metric.
          yield(m)
        else
          # Add an :always condition if no block was given.
          m.condition(:always) do |c|
            c.what = true
          end
        end

        # Populate the condition -> metric directory.
        m.conditions.each do |c|
          self.directory[c] = m
        end

        # Record the metric.
        self.metrics[start_state] ||= []
        self.metrics[start_state] << m
      end
    end
764396
private void stateCheckMark() {
        StackEntry e = stack[stk];
        int x = stateCheckPos(e.getStatePStr(), ((SCStackEntry)e).getStateCheck());
        stateCheckBuff[x / 8] |= (1 << (x % 8));
    }
28643
def show_lowstate(queue=False, **kwargs):
    '''
    
    '''
    conflict = _check_queue(queue, kwargs)
    if conflict is not None:
        assert False
        return conflict

    opts = salt.utils.state.get_sls_opts(__opts__, **kwargs)
    try:
        st_ = salt.state.HighState(opts,
                                   proxy=__proxy__,
                                   initial_pillar=_get_initial_pillar(opts))
    except NameError:
        st_ = salt.state.HighState(opts,
                                   initial_pillar=_get_initial_pillar(opts))

    errors = _get_pillar_errors(kwargs, pillar=st_.opts['pillar'])
    if errors:
        __context__['retcode'] = salt.defaults.exitcodes.EX_PILLAR_FAILURE
        raise CommandExecutionError('Pillar failed to render', info=errors)

    st_.push_active()
    try:
        ret = st_.compile_low_chunks()
    finally:
        st_.pop_active()
    return ret
618792
function(state){
			var match = this.model.get('data');

			var countryA = match.teamA ? match.teamA.country : null;
			this.setFlagsState(state, countryA, this.$('.flag-3d-left'));

			var countryB = match.teamB ? match.teamB.country : null;
			this.setFlagsState(state, countryB, this.$('.flag-3d-right'));
		}
190302
def _get_state(pkg):
    '''
    
    '''
    cmd = ['opkg', 'status']
    cmd.append(pkg)
    out = __salt__['cmd.run'](cmd, python_shell=False)
    state_flag = ''
    for line in salt.utils.itertools.split(out, '\n'):
        if line.startswith('Status'):
            _status, _state_want, state_flag, _state_status = line.split()

    return state_flag
938530
function pushLoadingState(xhrEvent, stateName, modelOrCollection, context, force) {
        var currentLoads = getState(stateName, context),
            currentlyLoading = currentLoads && currentLoads.length;
        if (!currentLoads) {
            currentLoads = [];
        }
        if (_.isArray(currentLoads)) {
            if (_.indexOf(currentLoads, xhrEvent) >= 0) {
                if (!force) {
                    return;
                }
                
            } else {
                currentLoads.push(xhrEvent);
            }
            
            if (!currentlyLoading) {
                var toSet = {};
                toSet[stateName] = currentLoads;
                setState(toSet, context);
            }

            xhrEvent.on('complete', function() {
                popLoadingState(xhrEvent, stateName, modelOrCollection, context);
            });
        }
    }
299156
void     flagTaggedStates() {
           List<RBBINode> tagNodes = new ArrayList<RBBINode>();
           RBBINode    tagNode;
           int     i;
           int     n;

           fRB.fTreeRoots[fRootIx].findNodes(tagNodes, RBBINode.tag);
           for (i=0; i<tagNodes.size(); i++) {                   // For each tag node t (all of 'em)
               tagNode = tagNodes.get(i);

               for (n=0; n<fDStates.size(); n++) {              //    For each state  s (row in the state table)
                   RBBIStateDescriptor sd = fDStates.get(n);
                   if (sd.fPositions.contains(tagNode)) {       //       if  s include the tag node t
                       sd.fTagVals.add(Integer.valueOf(tagNode.fVal));
                   }
               }
           }
       }
1247185
function setHeadsetState(newState){

    if (newState){

        appPlaying = true;
        appActive = true;

    }else{

        if (removeHeadsetPausesPlay)
            appPlaying = false;

    }


}
1192556
protected function establishCSRFTokenState() {
    if ($this->state === null) {
      $this->state = md5(uniqid(mt_rand(), true));
      $this->setPersistentData('state', $this->state);
    }
  }
1017417
private KeyValueState<String, CheckPointState> loadCheckpointState(Map conf, TopologyContext ctx) {
        String namespace = ctx.getThisComponentId() + "-" + ctx.getThisTaskId();
        KeyValueState<String, CheckPointState> state =
                (KeyValueState<String, CheckPointState>) StateFactory.getState(namespace, conf, ctx);
        if (state.get(TX_STATE_KEY) == null) {
            CheckPointState txState = new CheckPointState(-1, CheckPointState.State.COMMITTED);
            state.put(TX_STATE_KEY, txState);
            state.commit();
            LOG.debug("Initialized checkpoint spout state with txState {}", txState);
        } else {
            LOG.debug("Got checkpoint spout state {}", state.get(TX_STATE_KEY));
        }
        return state;
    }
247697
function () {
                /*  determine parameters  */
                var params = $cs.params("migrate", arguments, {
                    comps:     { pos: "...", req: true    },
                    sync:      {             def: false   },
                    completed: {             def: $cs.nop }
                });

                /*  iterate over all components to migrate  */
                var n = 0;
                var parent = this;
                _cs.foreach(params.comps, function (comp) {
                    if (params.sync) {
                        /*  migrate synchronously  */
                        var state_old = comp.state();
                        comp.state({ state: "created", sync: true });
                        comp.detach();
                        comp.attach(parent);
                        comp.state(state_old);
                    }
                    else {
                        /*  migrate asynchronously  */
                        (function (comp, state_old) {
                            comp.state({ state: "created", sync: false, callback: function (/* state_new */) {
                                this.detach();
                                this.attach(parent);
                                this.state({ state: state_old, sync: false, callback: function (/* state_old */) {
                                    n--;
                                    if (n === 0)
                                        params.completed.call(null);
                                }});
                            }});
                        })(comp, comp.state());
                        n++;
                    }
                });
            }
246594
function isValidState(state, isBee) {
  const validStates = isBee ? BEE_STATES : BULL_STATES;
  return _.includes(validStates, state);
}
654141
function(state) {
    if (state == self.LOADING || self.readyState !== state) {
      self.readyState = state;

      if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) {
        self.dispatchEvent("readystatechange");
      }

      if (self.readyState === self.DONE && !errorFlag) {
        self.dispatchEvent("load");
        // @TODO figure out InspectorInstrumentation::didLoadXHR(cookie)
        self.dispatchEvent("loadend");
      }
    }
  }
1054556
function(isLoaded) {
    var self = this;
    var isLoading = !isLoaded;
    var state = self.state;
    var prev = state.loadingStatus;

    isLoading = isLoading || false;
    state.loadingStatus = isLoading;

    self._notifyParentLoadingStatus(prev, !self.isLoaded());
  }
1176792
public void initTraceState(Map<String, Object> state) {
        Object traceId = state.get(Constants.HAWKULAR_APM_TRACEID);
        Object transaction = state.get(Constants.HAWKULAR_APM_TXN);
        Object level = state.get(Constants.HAWKULAR_APM_LEVEL);
        if (traceId != null) {
            setTraceId(traceId.toString());
        } else {
            log.severe("Trace id has not been propagated");
        }
        if (transaction != null) {
            setTransaction(transaction.toString());
        }
        if (level != null) {
            setReportingLevel(ReportingLevel.valueOf(level.toString()));
        }
    }