Action statt plan
175149
def server(*names, &block)
            names.each do |name|
                server = @tool.provide_server(name)
                scope = Scope.new(self, server)
                if not block.nil? then
                    Docile.dsl_eval(scope, &block)
                end
            end
        end
1255393
public function frm($txt, $att = '', $a = '', $m = '', $e = '')
    {
        $attList = array();
        if (!empty($a)) {
            $attList['action'] = $a;
        }
        if (!empty($m)) {
            $attList['method'] = $m;
        }
        if (!empty($e)) {
            $attList['enctype'] = $e;
        }
        $newatt = $this->addAttributes($attList, $att);

        return $this->tag('form', $txt, $newatt);
    }
1349603
function(action, weight) {
      if(weight===undefined) {
        weight=0;
      }
      this.tasks.push({ name: action, weight: weight});
    }
1105252
def _execActions(self, type, msg):
        
        for action in self.ACTIONS:
            action(type, msg)
912950
public function action() {
		$this->load->language('information/gdpr');

		$json = array();

		if (isset($this->request->post['email'])) {
			$email = $this->request->post['email'];
		} else {
			$email = '';
		}

		if (isset($this->request->post['action'])) {
			$action = $this->request->post['action'];
		} else {
			$action = '';
		}

		// Validate E-Mail
		if ((utf8_strlen($email) > 96) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
			$json['error']['email'] = $this->language->get('error_email');
		}

		// Validate Action
		$allowed = array(
			'export',
			'remove'
		);

		if (!in_array($action, $allowed)) {
			$json['error']['action'] = $this->language->get('error_action');
		}

		if (!$json) {
			// Added additional check so people are not spamming requests
			$status = true;

			$this->load->model('account/gdpr');

			$results = $this->model_account_gdpr->getGdprsByEmail($email);

			foreach ($results as $result) {
				if ($result['action'] == $action) {
					$status = false;

					break;
				}
			}

			if ($status) {
				$this->model_account_gdpr->addGdpr(token(), $email, $action);
			}

			$json['success'] = $this->language->get('text_success');
		}

		$this->response->addHeader('Content-Type: application/json');
		$this->response->setOutput(json_encode($json));
	}
312475
private void createScheduledAction(final Collection<Target> targets, final DistributionSet distributionSet,
            final ActionType actionType, final Long forcedTime, final Rollout rollout,
            final RolloutGroup rolloutGroup) {
        // cancel all current scheduled actions for this target. E.g. an action
        // is already scheduled and a next action is created then cancel the
        // current scheduled action to cancel. E.g. a new scheduled action is
        // created.
        final List<Long> targetIds = targets.stream().map(Target::getId).collect(Collectors.toList());
        deploymentManagement.cancelInactiveScheduledActionsForTargets(targetIds);
        targets.forEach(target -> {

            assertActionsPerTargetQuota(target, 1);

            final JpaAction action = new JpaAction();
            action.setTarget(target);
            action.setActive(false);
            action.setDistributionSet(distributionSet);
            action.setActionType(actionType);
            action.setForcedTime(forcedTime);
            action.setStatus(Status.SCHEDULED);
            action.setRollout(rollout);
            action.setRolloutGroup(rolloutGroup);
            actionRepository.save(action);
        });
    }
1053120
def Action(act, *args, **kw):
    """"""
    # Really simple: the _do_create_* routines do the heavy lifting.
    _do_create_keywords(args, kw)
    if is_List(act):
        return _do_create_list_action(act, kw)
    return _do_create_action(act, kw)
528102
function (list, location, ext, sequence, perms, title, src) {
			var actions = list.get_userCustomActions();

			var action = actions.add();

			action.set_title(title);
			action.set_location(location);
			action.set_commandUIExtension(ext);
			action.set_sequence(sequence || 0);
			(src && action.set_scriptSrc(src));
			if (perms)
				action.set_rights(perms);
			action.update();
			ctx.load(action);
			var dfd = $.Deferred();

			ctx.executeQueryAsync(function () {
				trace.log("addCustomAction.done");
				dfd.resolve(action);
			}, function (r, a) { ns.sp.reqFailure(r, a, "addCustomAction", dfd); });

			return dfd.promise();
		}
232508
SortedSet<Action> findActions( String actionName, Properties properties ) {

		Pattern pattern = Pattern.compile( actionName + "\\.(\\d)+\\.(.*)", Pattern.CASE_INSENSITIVE );
		SortedSet<Action> result = new TreeSet<Action>( new ActionComparator());
		for( Map.Entry<Object,Object> entry : properties.entrySet()) {
			String key = String.valueOf( entry.getKey()).toLowerCase();
			Matcher m = pattern.matcher( key );
			if( ! m.matches())
				continue;

			int position = Integer.parseInt( m.group( 1 ));
			ActionType actionType = ActionType.which( m.group( 2 ));
			String parameter = String.valueOf( entry.getValue());
			result.add( new Action( position, actionType, parameter ));
		}

		return result;
	}
730515
function(elem, action) {
			var inst = this._getInst(elem);
			if (!$.isEmptyObject(inst) && !this.isDisabled(elem)) {
				var commands = inst.options.commands;
				if (commands[action] && commands[action].enabled.apply(elem, [inst])) {
					commands[action].action.apply(elem, [inst]);
				}
			}
		}
1041164
def build_action(self, runnable, regime, action):
        

        if isinstance(action, StateAssignment):
            return self.build_state_assignment(runnable, regime, action)
        if isinstance(action, EventOut):
            return self.build_event_out(action)
        if isinstance(action, Transition):
            return self.build_transition(action)
        else:
            return ['pass']
662591
def action(act, config):
    
    if not config:
        pass
    elif act is "list":
        do_list()
    else:
        config_dir = os.path.join(CONFIG_ROOT, config)
        globals()["do_" + act](config, config_dir)
19008
public void actionPerformed(ActionEvent evt)
    {
        Component component = (Component)evt.getSource();
        String strMessage = component.getName();
        if (strMessage == null)
        {
            strMessage = evt.getActionCommand();
            Action action = ActionManager.getActionManager().getActionFromCommand(strMessage);
            if (action instanceof BaseAction)
                strMessage = ((BaseAction)action).getActionKey();
        }
        if ((strMessage != null) && (strMessage.length() > 0))
            BaseApplet.handleAction(strMessage, this, this, 0);
    }
361730
def perform(action_name, container, **kwargs):
    
    cf = container_fabric()
    cf.call(action_name, container, **kwargs)
613332
def _file_stat(self, mode, infostr, stat):
        
        action_str = mode.upper()
        info_str = infostr

        if stat == 'OK':
            self.action_st_panel.SetBackgroundColour('#00FF00')
        else:  # ERR
            self.action_st_panel.SetBackgroundColour('#FF0000')
        self.action_st.SetLabel(action_str)
        if info_str is None:
            info_str = 'Undefined File'
        self.info_st.SetLabel(info_str)
        if self.info_st.IsEllipsized():
            self.info_st.SetToolTip(wx.ToolTip(info_str))

        self.log.append({'stat': stat,
                         'logstr':
                             "[{ts}] {acts:<10s} : {infs}".format(ts=time.strftime(
                                 "%Y/%m/%d-%H:%M:%S", time.localtime()),
                                 acts=action_str,
                                 infs=info_str)})
348240
def _tree_stat(self, mode, infostr, stat):
        
        action_str = mode.upper()
        info_str = infostr
        if stat == 'OK':
            self.action_st_panel.SetBackgroundColour('#00FF00')
        else:  # ERR
            self.action_st_panel.SetBackgroundColour('#FF0000')
        self.action_st.SetLabel(action_str)
        if info_str is None:
            pass
        if stat == 'OK':
            child_cnt_0 = self.mainview_tree.GetChildrenCount(
                self.mainview_tree.GetRootItem(),
                recursively=False)
            child_cnt_1 = self.mainview_tree.GetChildrenCount(
                self.mainview_tree.GetRootItem(),
                recursively=True)
            self.info_st.SetLabel("{0} ({1} elements.)".format(info_str, child_cnt_0))
            self.log.append({'stat': stat,
                             'logstr':
                                 "[{ts}] {acts:<10s} : {infs} ({cnt1}|{cnt2})".format(
                                     ts=time.strftime("%Y/%m/%d-%H:%M:%S",
                                                      time.localtime()),
                                     acts=action_str,
                                     infs=info_str,
                                     cnt1=child_cnt_0,
                                     cnt2=child_cnt_1), })
        else:
            self.info_st.SetLabel("{0} (0 elements.)".format(info_str))
            self.log.append({'stat': stat,
                             'logstr':
                                 "[{ts}] {acts:<10s} : {infs} ({cnt1}|{cnt2})".format(
                                     ts=time.strftime("%Y/%m/%d-%H:%M:%S",
                                                      time.localtime()),
                                     acts=action_str,
                                     infs=info_str,
                                     cnt1=0,
                                     cnt2=0), })

        if self.info_st.IsEllipsized():
            self.info_st.SetToolTip(wx.ToolTip(info_str))
498493
def actions(self, req_action):
    """"""
    if FLAGS.sc2_log_actions:
      for action in req_action.actions:
        sys.stderr.write(str(action))
        sys.stderr.flush()

    return self._client.send(action=req_action)