Returns a string for an application transition state
771927
def getApplicationsTransitionStateNameFromEnum(self, state):
        """"""

        fn = self.function_table.getApplicationsTransitionStateNameFromEnum
        result = fn(state)
        return result
174907
def transition_state(state)
      authorize @contribution
      @initiative = @contribution.initiative
      @user = @contribution.user
      state = state.to_sym
      transition = @contribution.transition_by_state(state)
      initial_state = @contribution.state_name
      resource_name = @contribution.class.model_name.human
      if @contribution.send("can_#{transition}?")
        begin
          if @contribution.state_on_gateway != state
            if @contribution.update_state_on_gateway!(state)
              @contribution.send("#{transition}!")
            else
              flash[:alert] = t('flash.actions.update.alert', resource_name: resource_name)
            end
          else
            @contribution.send("#{transition}!")
          end
        rescue
          flash[:alert] = t('flash.actions.update.alert', resource_name: resource_name)
        end
      else
        flash[:alert] = t('flash.actions.update.alert', resource_name: resource_name)
      end
      if flash[:alert].present?
        render 'initiatives/contributions/show'
      else
        if initial_state == :pending
          flash[:notice] = t('flash.actions.create.notice', resource_name: resource_name)
        else
          flash[:notice] = t('flash.actions.update.notice', resource_name: resource_name)
        end
        redirect_to initiative_contribution_path(@contribution.initiative.id, @contribution)
      end
    end
1332774
def current_state_str(self):
        """"""
        if self.sample_ok:
            msg = ''
            temperature = self._get_value_opc_attr('temperature')
            if temperature is not None:
                msg += 'Temp: %s ºC, ' % temperature
            humidity = self._get_value_opc_attr('humidity')
            if humidity is not None:
                msg += 'Humid: %s %%, ' % humidity
            pressure = self._get_value_opc_attr('pressure')
            if pressure is not None:
                msg += 'Press: %s mb, ' % pressure
            light_level = self._get_value_opc_attr('light_level')
            if light_level is not None:
                msg += 'Light: %s lux, ' % light_level
            return msg[:-2]
        else:
            return "Bad sample"
1045327
public int getTransitionSelectivity()
    {
        int count = 0;
        for (Transition<DFAState<T>> t : transitions.values())
        {
            CharRange range = t.getCondition();
            count += range.getTo()-range.getFrom();
        }
        return count/transitions.size();
    }
1114279
function getCSSTransitionString(element) {
                    var transitionStr = VENDORS._cssProperty('transition');
                    var assembledValue = element.css(transitionStr);
                    if(assembledValue)
                        return assembledValue;
                    var regExpString = '\\s*(' + '([^,(]+(\\(.+?\\))?)+' + ')[\\s,]*';
                    var regExpMain = new RegExp(regExpString);
                    var regExpValidate = new RegExp('^(' + regExpString + ')+$');
                    var properties = 'property duration timing-function delay'.split(' ');
                    var result = [ ];
                    var strResult;
                    var valueArray;
                    var i = 0;
                    var j;
                    var splitCssStyleByComma = function(str) {
                        strResult = [ ];
                        if (!str.match(regExpValidate))
                            return str;
                        while (str.match(regExpMain)) {
                            strResult.push(RegExp.$1);
                            str = str.replace(regExpMain, _strEmpty);
                        }

                        return strResult;
                    };
                    for (; i < properties[LEXICON.l]; i++) {
                        valueArray = splitCssStyleByComma(element.css(transitionStr + '-' + properties[i]));
                        for (j = 0; j < valueArray[LEXICON.l]; j++)
                            result[j] = (result[j] ? result[j] + _strSpace : _strEmpty) + valueArray[j];
                    }
                    return result.join(', ');
                }
1176846
function (name) {
      var route = _containerOwner.getOwner(this).lookup('route:' + name);

      if (!route) {
        return {};
      }

      var transition = this.router.router.activeTransition;
      var state = transition ? transition.state : this.router.router.state;

      var params = {};
      _emberMetalAssign.default(params, state.params[name]);
      _emberMetalAssign.default(params, getQueryParamsFor(route, state));

      return params;
    }
416266
public Set<Integer> getTransitions(int state, int inputIdx) { // TODO: replace by primitive specialization
        Set<Integer> transition = transitions[toMemoryIndex(state, inputIdx)];

        return transition == null ? Collections.emptySet() : transition;
    }
719443
public String getState()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getState");
    String state = 
      index.getState(aliasDest).toString();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getState");
    return state;
  }
1183464
function generateTransitionHelpers(currentState, parsedStates) {
  const buildFnBody = state => (...args) => {
    return PossibleStatesContainer({current: state, data: zip(state.data, args), allStates: parsedStates})
  }

  return parsedStates.reduce(
    (transitions, state) => ({...transitions, [buildFnName('to', state.name)]: buildFnBody(state)}),
    {}
  )
}
495336
def _get_state(inspect_results):
    '''
    
    '''
    if inspect_results.get('State', {}).get('Paused', False):
        return 'paused'
    elif inspect_results.get('State', {}).get('Running', False):
        return 'running'
    else:
        return 'stopped'
1056946
public Transition<S> getTransition(S fromState, T transition){
		Transition<S> transitionDef = transitions.get(new DoubleValueBean<S, T>(fromState, transition));
		if (transitionDef == null){
			throw new IllegalArgumentException("Transition '" + transition + "' from state '" + fromState + "' has not been defined.");
		}
		return transitionDef;
	}
932294
function() {
        if (!this.transitions) return

        var leaveState, event, transitions = this.transitions
        for (leaveState in transitions)
          for (event in transitions[leaveState])
            this.transition(leaveState, event, transitions[leaveState][event])

        if (!(transitions.hasOwnProperty(INIT_STATE)
          || transitions.hasOwnProperty(ANY_STATE)) && typeof console !== 'undefined')
          console.warn('there is no transition from state "init" to another state.')
      }
1298858
protected final synchronized void transitionState(OperationState newState) {
    getLogger().debug("Transitioned state from %s to %s", state, newState);
    state = newState;
    // Discard our buffer when we no longer need it.
    if(state != OperationState.WRITE_QUEUED
        && state != OperationState.WRITING) {
      cmd = null;
    }
    if (state == OperationState.COMPLETE) {
      callback.complete();
    }
  }
791384
public Transition getTransition(Long id) {
        for (Transition transition : getTransitions()) {
            if (transition.getId().equals(id))
                return transition;
        }
        return null; // not found
    }
851425
public Set<T> getTransitions(S state) {
		getStateId(state);
		return validTransitions.get(state);
	}
679060
def allowed_transitions():
    """"""
    try:
        sdp_state = SDPState()
        return sdp_state.allowed_target_states[sdp_state.current_state]
    except KeyError:
        LOG.error("Key Error")
        return dict(state="KeyError", reason="KeyError")
1135679
def generate_application_string(cls, test):
        

        app_env = 'test'
        if hasattr(test, 'env'):
            app_env = test.env
        elif hasattr(test, 'environment'):
            app_env = test.environment

        start_time = int(time.time() * 1000)

        return "%s.%s" % (app_env, start_time)