状态转换，动作为SHIFT

动作为SHIFT，但保存第二大可能的动作，当一列动作都是SHIFT时，执行概率最大的第二大动作

@param action
第二大可能的动作
@param prob
第二大可能的动作的概率
435697
public void next(Action action, float prob) {
		probsOfBuild[leftFocus] = prob;
		actionsOfBuild[leftFocus] = action;
		leftFocus++;

		if (leftFocus >= trees.size() - 1) {
			if (!isUpdated) {
				int maxIndex = 0;
				float maxValue = 0;
				for (int i = 0; i < probsOfBuild.length; i++)
					if (probsOfBuild[i] > maxValue) {
						maxValue = probsOfBuild[i];
						maxIndex = i;
					}
				leftFocus = maxIndex;
				next(actionsOfBuild[leftFocus]);
			}

			back();
		}
	}
46208
private static UnitResponse doStrictCheck(WhereAction action, Map map) {
        LOG.debug("db执行安全检查..." + map);
        for (String whereFragment : action.searchConditions()) {
            if (action.ignoreWhereFragment(whereFragment, map)) {
                LOG.info(String.format("WARN-安全检查不通过...检查where语句%s发现它是一个全表操作!参数=%s", whereFragment, map));
                return UnitResponse.createError(DaoGroup.CODE_LACK_OF_PARAMETER, JdbcPatternUtil.getCamelKeys(whereFragment), "缺少参数");
            }
        }
        return UnitResponse.createSuccess();
    }
1049600
public void configure(Action action) {
        Assert.notNull(action, "The swing action to configure is required");
        action.putValue(Action.NAME, getText());
        action.putValue(Action.MNEMONIC_KEY, new Integer(getMnemonic()));
        action.putValue(Action.SMALL_ICON, getIcon());
        action.putValue("LargeIcon", getLargeIcon());
        action.putValue(Action.ACCELERATOR_KEY, getAccelerator());
        action.putValue(Action.SHORT_DESCRIPTION, caption);
        action.putValue(Action.LONG_DESCRIPTION, description);
    }
821043
public CmsListDefaultAction removeDefaultAction(String actionId) {

        Iterator<CmsListDefaultAction> it = m_defaultActions.iterator();
        while (it.hasNext()) {
            CmsListDefaultAction action = it.next();
            if (action.getId().equals(actionId)) {
                it.remove();
                return action;
            }
        }
        return null;
    }
644100
void transit(State source, Action act, State target)
    {
        int deprel = 0;
        int[] deprel_inference = new int[]{deprel};
        if (ActionUtils.is_shift(act))
        {
            target.shift(source);
        }
        else if (ActionUtils.is_left_arc(act, deprel_inference))
        {
            deprel = deprel_inference[0];
            target.left_arc(source, deprel);
        }
        else if (ActionUtils.is_right_arc(act, deprel_inference))
        {
            deprel = deprel_inference[0];
            target.right_arc(source, deprel);
        }
        else
        {
            System.err.printf("unknown transition in transit: %d-%d", act.name(), act.rel());
        }
    }
428913
function(action) {
            // if the action is a direction
            if(RL.Util.DIRECTIONS_4.indexOf(action) !== -1){
                var offsetCoord = RL.Util.getOffsetCoordsFromDirection(action),
                    moveToX = this.x + offsetCoord.x,
                    moveToY = this.y + offsetCoord.y;
                return this.move(moveToX, moveToY);
            }

            if(action === 'wait'){
                this.wait();
                return true;
            }

            return false;
        }
1313971
private void checkDuplicateStdOutOutput(DumpProcessingAction newAction) {
		if (newAction.useStdOut()) {
			if (this.quiet) {
				logger.warn("Multiple actions are using stdout as output destination.");
			}
			this.quiet = true;
		}
	}
951185
public void setAction(String action) throws ApplicationException {
	action = action.toLowerCase().trim();
	if (action.equals("get")) this.action = GET;
	else if (action.equals("put")) this.action = PUT;

	else if (action.equals("cache")) this.action = CACHE;
	else if (action.equals("clientcache")) this.action = CACHE_CLIENT;
	else if (action.equals("servercache")) this.action = CACHE_SERVER;
	else if (action.equals("flush")) this.action = FLUSH;
	else if (action.equals("optimal")) this.action = CACHE;

	else if (action.equals("client-cache")) this.action = CACHE_CLIENT;
	else if (action.equals("client_cache")) this.action = CACHE_CLIENT;

	else if (action.equals("server-cache")) this.action = CACHE_SERVER;
	else if (action.equals("server_cache")) this.action = CACHE_SERVER;

	else if (action.equals("content")) this.action = CONTENT;
	else if (action.equals("content_cache")) this.action = CONTENT;
	else if (action.equals("contentcache")) this.action = CONTENT;
	else if (action.equals("content-cache")) this.action = CONTENT;
	else throw new ApplicationException("invalid value for attribute action for tag cache [" + action + "], "
		+ "valid actions are [get,put,cache, clientcache, servercache, flush, optimal, contentcache]");

	// get: get an object from the cache.
	// put: Add an object to the cache.

    }
824889
int transform(Action act)
    {
        int deprel = 0;
        int[] deprel_inference = new int[]{deprel};
        if (ActionUtils.is_shift(act))
        {
            return 0;
        }
        else if (ActionUtils.is_left_arc(act, deprel_inference))
        {
            deprel = deprel_inference[0];
            return 1 + deprel;
        }
        else if (ActionUtils.is_right_arc(act, deprel_inference))
        {
            deprel = deprel_inference[0];
            return L + 1 + deprel;
        }
        else
        {
            System.err.printf("unknown transition in transform(Action): %d-%d", act.name(), act.rel());
        }
        return -1;
    }
1335783
function(event, action) {
        var data = window.kelmu.data[id];
        var stepsLeft = Math.max(+(action.parameter || 1), 1);
        var stepsToRun = 0;

        var proceed = function() {
          this('skip', stepsToRun);
        };

        while (stepsLeft > 0) {

          var subSteps = (data.definitions['step' + data.stepNumber] || [null]).length - 1;
          var currentSub = data.subStepNumber;
          var canIncrease = subSteps - currentSub;

          if (canIncrease < stepsLeft) {

            data.stepNumber += 1;
            data.subStepNumber = 0;
            stepsToRun += 1;
            stepsLeft -= canIncrease + 1;

          } else if (canIncrease > 0) {

            if (stepsToRun > 0) {
              $.each(window.kelmu.callbacks[id], proceed);
              stepsToRun = 0;
              clearAnnotations();
              originalStep(event);
            }

            stepsLeft -= canIncrease;
            data.subStepNumber = data.subStepNumber + canIncrease;
          } else {
            data.stepNumber += 1;
            stepsToRun += 1;
            stepsLeft -= 1;
          }

        }

        if (stepsToRun > 0) {
          $.each(window.kelmu.callbacks[id], proceed);
          stepsToRun = 0;
          clearAnnotations();
          originalStep(event);

          if (!window.kelmu.data[id].animationReadyAvailable) {
            setTimeout(function() {
              createAnnotations();
              if (window.kelmu.data[id].actions.updateEditor) {
                window.kelmu.data[id].actions.updateEditor();
              }
            }, window.kelmu.data[id].settings.animationLength);
          }

        } else {
          createAnnotations();
        }

        window.kelmu.data[id].undoStack.splice(window.kelmu.data[id].undoStackPointer + 1, window.kelmu.data[id].undoStack.length);
        window.kelmu.data[id].undoStack.push([window.kelmu.data[id].stepNumber, window.kelmu.data[id].subStepNumber]);
        window.kelmu.data[id].undoStackPointer += 1;

      }
100575
public void setAction(final Action action) {
		MenuItemModel model = getOrCreateComponentModel();
		model.action = action;
		model.url = null;
	}
289070
public void add(final AtomicAction action) {
        if (action instanceof Action) {
            Action a = (Action)action;
            peforms.addAll(a.peforms);
            backouts.addAll(a.backouts);
            cleanUps.addAll(a.cleanUps);
        } else {
            add(new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.perform();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.backout();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.cleanup();
                }
            });
        }
    }
896794
public void setActionSequence (String action)
    {
        // sanity check
        if (action == null) {
            log.warning("Refusing to set null action sequence " + this + ".", new Exception());
            return;
        }

        // no need to noop
        if (action.equals(_action)) {
            return;
        }
        _action = action;
        updateActionFrames();
    }
995908
@Trivial
    private void performAction(Runnable action, boolean addToQueue) {
        ExecutorService exec = executorService.getService();

        if (exec == null) {
            // If we can't find the executor service, we have to run it in place.
            action.run();
        } else {
            // If we can find the executor service, we'll add the action to the queue.
            // If the actionFuture is null (no pending actions) and the configFuture is null (no
            // pending configuration updates), we'll submit the actionsRunner to the executor
            // service to drain the queue
            //
            // configFuture is used to avoid bouncing the endpoint multiple times because of a
            // single configuration update.
            //
            // actionFuture is only set to a non-null value by kicking off the executor service here.
            // actionsRunner syncs on actionQueue, so we can't add any new actions while we are
            // draining the queue. When the queue is empty, actionFuture is explicitly set to null.
            //
            // Long story short, it prevents us from kicking off multiple executors which could run in
            // random order.
            if (addToQueue) {
                synchronized (actionQueue) {
                    actionQueue.add(action);
                    if ((actionFuture == null) && (configFuture == null)) {
                        actionFuture = exec.submit(actionsRunner);
                    }
                }
            } else {
                // Schedule immediately
                exec.submit(action);
            }
        }
    }
452215
def insert_action(self, action, prev_action):
        
        if isinstance(prev_action, QtWidgets.QAction):
            index = self._actions.index(prev_action)
        else:
            index = prev_action
        action.setShortcutContext(QtCore.Qt.WidgetShortcut)
        self._actions.insert(index, action)
25892
protected void executeAction(Action action) {
        ProcessContext context = new ProcessContext(getProcessInstance().getKnowledgeRuntime());
        context.setNodeInstance(this);
        try {
            action.execute(context);
        } catch (Exception e) {
            String exceptionName = e.getClass().getName();
            ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance)
                resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, exceptionName);
            if (exceptionScopeInstance == null) {
                throw new WorkflowRuntimeException(this, getProcessInstance(), "Unable to execute Action: " + e.getMessage(), e);
            }
            
            exceptionScopeInstance.handleException(exceptionName, e);
            cancel();
        }
    }
706259
private void insertAction(final Element subTree, final QName attName, final Action action) {
        if (subTree == null || action == null) {
            return;
        }

        final LinkedList<Element> queue = new LinkedList<>();

        // Skip the sub-tree root because it has been added already.
        NodeList children = subTree.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
                queue.offer((Element)children.item(i));
            }
        }

        while (!queue.isEmpty()) {
            final Element node = queue.poll();
            children = node.getChildNodes();
            for (int i = 0; i < children.getLength(); i++) {
                if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
                    queue.offer((Element)children.item(i));
                }
            }
            if (SUBJECTSCHEME_SUBJECTDEF.matches(node)) {
                final String key = node.getAttribute(ATTRIBUTE_NAME_KEYS);
                if (key != null && !key.trim().isEmpty()) {
                    final FilterKey k = new FilterKey(attName, key);
                    if (!filterMap.containsKey(k)) {
                        filterMap.put(k, action);
                    }
                }
            }
        }
    }