/*!
Actually executes the function and its children (in processed mode).
177554
function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace )
    {
        /*
        {foreach <array> as [$keyVar =>] $itemVar
                 [sequence <array> as $sequenceVar]
                 [offset <offset>]
                 [max <max>]
                 [reverse]
        }
        */

        //eZDebug::writeDebug( $functionParameters, '$functionParameters' );

        $loop = new eZTemplateLoop( eZTemplateForeachFunction::FUNCTION_NAME,
                                    $functionParameters, $functionChildren, $functionPlacement,
                                    $tpl, $textElements, $rootNamespace, $currentNamespace );

        if ( !$loop->initialized() )
            return;

        $loop->parseParamValue( 'array', $array );
        if ( !is_array( $array ) )
        {
            $tpl->error( eZTemplateForeachFunction::FUNCTION_NAME, "Missing/malformed array to iterate through.", $functionPlacement );
            return;
        }

        $loop->parseParamVarName( 'item_var', $itemVarName );
        if ( !$itemVarName )
        {
            $tpl->error( eZTemplateForeachFunction::FUNCTION_NAME, "Missing/malformed item variable name.", $functionPlacement );
            return;
        }

        $loop->parseParamVarName( 'key_var', $keyVarName );
        $loop->parseParamValue( 'max',      $max     );
        $loop->parseParamValue( 'offset',   $offset  );
        $loop->parseParamValue( 'reverse',  $reverse );

        /*
         * run the loop itself
         */

        /*
            $offset and $max parameters must meet the following requirements:
             -  $offset + $max <= $nItems
             -  $offset >= 0
             -  $max    >= 0
            Otherwise they are not considered.
        */

        $arrayKeys       = array_keys( $array );
        $nItems          = count( $arrayKeys );
        $nItemsProcessed = 0;

        // do nothing in case of empty array
        if ( !$nItems )
            return;

        // fix definitely incorrect offset
        if ( $offset === null )
            $offset = 0;
        elseif ( $offset < 0 || $offset >= $nItems )
        {
            if ( $nItems || $offset < 0 )
            {
                $tpl->warning( eZTemplateForeachFunction::FUNCTION_NAME, "Invalid 'offset' parameter specified.", $functionPlacement );
            }
            $offset = ( $offset < 0 ) ? 0 : $nItems;
        }

        // fix definitely incorrect max
        if ( $max === null )
            $max = $nItems - $offset;
        elseif ( $max < 0 || $offset+$max > $nItems )
        {
            if ( $max <0 )
                $tpl->warning( eZTemplateForeachFunction::FUNCTION_NAME, "Invalid 'max' parameter specified.", $functionPlacement );
            $max = $nItems - $offset;
        }

        // process 'reverse' parameter
        if ( $reverse === null )
            $reverse = false;
        if ( $reverse )
        {
            $firstVal = $nItems - 1 - $offset;
            $lastVal  = 0;
        }
        else
        {
            $firstVal = $offset;
            $lastVal  = $nItems - 1;
        }

        if ( $firstVal < $lastVal )
        {
            if ( $keyVarName && !$tpl->hasVariable( $keyVarName, $rootNamespace ) )
            {
                $loop->initLoopVariable( $keyVarName );
            }
            if ( !$tpl->hasVariable( $itemVarName, $rootNamespace ) )
            {
                $loop->initLoopVariable( $itemVarName );
            }
        }

        for ( $i = $firstVal; $nItemsProcessed < $max && ( $reverse ? $i >= $lastVal : $i <= $lastVal ); )
        {
            $key =& $arrayKeys[$i];
            $val =& $array[$key];

            if ( $keyVarName )
                $tpl->setVariable( $keyVarName, $key, $rootNamespace );
            $tpl->setVariable( $itemVarName, $val, $rootNamespace );

            $loop->setSequenceVar(); // set sequence variable (if specified)
            $loop->processDelimiter( $i );
            $loop->resetIteration();

            // process loop body
            if ( $loop->processChildren() )
                break;

            // increment loop counter here for delimiter to be processed correctly
            $reverse ? $i-- : $i++;

            $loop->incrementSequence();
            $nItemsProcessed++;
        }

        $loop->cleanup();
    }
699510
function run()
    {
        // Load Modules Within Event Execution Wrapper that can handle errors
        // with failure callable of event
        $self = $this; $modules = $this->modules_enabled;
        $this->event()->then(function() use ($self, $modules) {
            $self->moduleManager()->loadModules($modules);
        });

        // each error during execution of sapi event listeners must handled within sapi
        // handle errors when modules loaded successfully!
        $this->event()
            ->onFailure(function($exception, $event) {
                /** @var $event EventHeapOfSapi */
                $this->_run_handleException($exception, $event);
                $event->shutdown();
            })
            ->trigger(EventHeapOfSapi::EVENT_APP_BOOTSTRAP)
            ->trigger(EventHeapOfSapi::EVENT_APP_MATCH_REQUEST)
            ->trigger(EventHeapOfSapi::EVENT_APP_DISPATCH)
            ->trigger(EventHeapOfSapi::EVENT_APP_RENDER)
            ->trigger(EventHeapOfSapi::EVENT_APP_FINISH)
        ;
    }
1134873
function run(commands, done) {
  var children = [];
  var pending = commands.length || 1;
  var err;
  each(commands, function(command, next) {
    children.push(childProcess.spawn(shell[0], [shell[1], command], {
      stdio: ['pipe', process.stdout, process.stderr]
    }).on('exit', function(code) {
      if (!err && code > 0) {
        err = new Error('`' + command + '` failed with exit code ' + code);
        children.forEach(function(child) {
          if (child.connected) child.kill();
        });
      }
      pending -= 1;
      if (pending === 0) done(err);
    }));
    next();
  });
}
94121
public function process(Smarty_Internal_Template $_template, $update = false)
    {
        if ($this->handler->process($_template, $this, $update) === false) {
            $this->valid = false;
        }
        if ($this->valid) {
            $this->processed = true;
        } else {
            $this->processed = false;
        }
    }
1110780
function exec (cmd, callback) {
  debug('executing cmd', cmd)
  child_process.exec(cmd, function (err, stdout, stderr) {
    debug('command completed')
    if (err) {
      if (callback) {
        callback(err)
      }
    } else {
      if (callback) {
        callback(null, stdout, stderr)
      }
    }
  })
}
1079885
public function execute()
    {
        if (defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && is_string(PSI_PLUGIN_PSSTATUS_PROCESSES)) {
            if (preg_match(ARRAY_EXP, PSI_PLUGIN_PSSTATUS_PROCESSES)) {
                $processes = eval(PSI_PLUGIN_PSSTATUS_PROCESSES);
            } else {
                $processes = array(PSI_PLUGIN_PSSTATUS_PROCESSES);
            }
            if ((PSI_OS == 'WINNT') && (strtolower(PSI_PLUGIN_PSSTATUS_ACCESS) == 'command')) {
                foreach ($processes as $process) {
                    $this->_result[] = array($process, $this->process_inarray(strtolower($process), $this->_filecontent));
                }
            } else {
                foreach ($processes as $process) {
                    $this->_result[] = array($process, $this->process_inarray($process, $this->_filecontent));
                }
            }
        }
    }
935129
function exec (cmd) {
  debug('executing cmd', cmd)
  child_process.exec(cmd, function (err, stdout, stderr) {
    debug('command completed')
  })
}
1182158
public function processRequest($function = null)
    {
        if ($function) {
            $this->$function();
            $this->dispatchEvent(new AfterRequestProcessedEvent);
        } else {
            $sQAdd = $this->_getQuery();

            // formatting SQL queries
            $sQ = $this->_getDataQuery($sQAdd);
            $sCountQ = $this->_getCountQuery($sQAdd);

            $this->_outputResponse($this->_getData($sCountQ, $sQ));
        }
    }
1149181
public function execute()
    {
        switch ($this->called) {
        case 'textarea':
            $Tag = new HTML\Tag($this->called, array($this->args[0], $this->args[1]), array('generate', 'inlineInner'));
            break;
        default:
            $Tag = new HTML\Tag($this->called, array($this->args[0]), array('generate'));
            break;
        }

        if ($this->called == 'checkbox' && isset($this->args[2])
            && ($this->args[2] === true || $this->args[2] === 'on' || $this->args[2] === 1
                || $this->args[2] === $Tag->attributes['id']
                || (is_array($this->args[2]) && in_array($Tag->attributes['id'], $this->args[2]))
            )
        ) {
            $Tag->setAttrs(array('checked' => null));
        }

        if ($this->_label !== false) {
            $Label = HTML\Generator::getLabel($this->_label, $Tag);

            HTML\Generator::appendLabel($Label, $Tag, $this->_label);
        } else {
            echo $Tag;
        }
    }
165184
public function execute()
    {
        if (empty($this->_filecontent)) {
            return;
        }
        $items = array();
        foreach ($this->_filecontent as $roworig) {
            $row = preg_split("/[\s]+/", trim($roworig), 5);
            if (count($row) != 5) {
                break;
            }
            foreach ($row as $key=>$val) {
                $items[$row[0]][$key] = $val;
            }
            if ($row[1] !== $row[0]) {
                $items[$row[1]]['childs'][$row[0]] = &$items[$row[0]];
            }
        }
        foreach ($items as $item) { //find zombie
            if (!isset($item[0])) {
                foreach ($item["childs"] as $subitem) {
                    $zombie = $subitem[1];
                    if ($zombie != 0) {
                        $items[$zombie]["0"] = $zombie;
                        $items[$zombie]["1"] = "0";
                        $items[$zombie]["2"] = "0";
                        $items[$zombie]["3"] = "0";
                        $items[$zombie]["4"] = "unknown";
                        $items[0]['childs'][$zombie] = &$items[$zombie];
                    }
                    break; //first is sufficient
                }
            }
        }
        if (isset($items[0])) {
            $this->_result = $items[0];
        } else {
            $this->_result = array();
        }
    }
543241
function run()
    {
        if (strpos($this->cmd, ':') !== false) {
            $tmp = explode(':', $this->cmd);
            $this->cmd = $tmp[0];
            $this->subCmd = $tmp[1];
        } else {
            $this->subCmd = false;
        }

            //Select
        switch ($this->cmd) {
            case 'css':
                $this->cmdCss();
                break;

            case 'js':
                $this->cmdJs();
                break;
            
            case 'all':
                $this->cmdAll();
                break;

            case 'jss':
                $this->cmdJss();
                break;

            default:
                echo "\n\n  Command \"optimize:".$this->cmd."\" not exists!";
                exit(Main::help());
            break;
        }
            return;
    }
562367
function click(d) {
      if (d.children) {
        d._children = d.children;
        d.children = null;
      } else {
        d.children = d._children;
        d._children = null;
      }
      update(d);
    }
1049943
public function execute()
    {
        if (!empty($this->args[1])) {
            $this->args[0] .= "', '".str_replace('\'', '"', $this->args[1]);
        }

        HTML\Generator::call(
            'script',
            array(
                str_replace(':UA:', $this->args[0], self::JS)
            ),
            array(
                'compress',
                'inlineInner',
                'noCache'
            )
        );
    }
556945
function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace )
    {
        $params = $functionParameters;
        switch ( $functionName )
        {
            case $this->BlockName:
            {
                $viewMode = "full";
                $name = $currentNamespace;
                // Read ini file
                $toolbarIni = eZINI::instance( "toolbar.ini" );

                if ( isset( $functionParameters["view"] ) )
                {
                    $viewMode = $tpl->elementValue( $functionParameters["view"], $rootNamespace, $currentNamespace, $functionPlacement );
                }

                if ( isset( $functionParameters["name"] ) )
                {
                    reset( $params );
                    $whatParamsShouldBeUnset = array();
                    $whatParamsShouldBeReplaced = array();
                    while ( ( $key = key( $params ) ) !== null )
                    {
                        $item =& $params[$key];
                        switch ( $key )
                        {
                            case "name":
                            case "view":
                                break;

                            default:
                            {
                                if ( !$tpl->hasVariable( $key, $name ) )
                                {
                                    $whatParamsShouldBeUnset[] = $key; // Tpl vars should be removed after including
                                }
                                else
                                {
                                    $whatParamsShouldBeReplaced[$key] = $tpl->variable( $key, $name ); // Tpl vars should be replaced after including
                                }

                                $item_value = $tpl->elementValue( $item, $rootNamespace, $currentNamespace, $functionPlacement );
                                $tpl->setVariable( $key, $item_value, $name );
                            } break;
                        }
                        next( $params );
                    }
                    $toolbarPosition = $tpl->elementValue( $functionParameters["name"], $rootNamespace, $currentNamespace, $functionPlacement );
                    $definedVariables = array();
                    $toolbarName = "Toolbar_" . $toolbarPosition;
                    $toolArray = $toolbarIni->variable( $toolbarName, 'Tool' );

                    if ( !is_array( $toolArray ) )
                        $toolArray = array();

                    $actionParameters = array();
                    foreach ( array_keys( $toolArray ) as $toolKey )
                    {
                        $definedVariables = array();
                        $tool = $toolArray[$toolKey];
                        $placement = $toolKey + 1;
                        if ( $toolbarIni->hasGroup( "Tool_" . $tool ) )
                        {
                            $actionParameters = $toolbarIni->group( "Tool_" . $tool );
                        }
                        if ( $toolbarIni->hasGroup( "Tool_" . $toolbarPosition . "_" . $tool . "_" . $placement ) )
                        {
                            $actionParameters = array_merge( $actionParameters, $toolbarIni->group( "Tool_" . $toolbarPosition . "_" . $tool . "_" . $placement ) );
                        }
                        foreach ( array_keys( $actionParameters ) as $key )
                        {
                            $itemValue = $actionParameters[$key];
                            $tpl->setVariable( $key, $itemValue, $name );
                            $definedVariables[] = $key;
                        }
                        $toolIDValue =  "Tool_" . $toolbarPosition . "_" . $tool . "_" . $placement;
                        $tpl->setVariable( "tool_id", $toolIDValue, $name );
                        $definedVariables[] = "tool_id";
                        $toolOffset = $placement;
                        $tpl->setVariable( "offset", $toolOffset, $name );
                        $definedVariables[] = "offset";
                        $uri = "design:toolbar/$viewMode/$tool.tpl";

                        if ( $placement == 1 )
                        {
                            if ( count( $toolArray ) == 1 )
                            {
                                $tpl->setVariable( "first", true );
                                $tpl->setVariable( "last", true );
                                $tpl->setVariable( "placement", "last" );
                                $definedVariables[] = "first";
                                $definedVariables[] = "last";
                                $definedVariables[] = "placement";
                            }
                            else
                            {
                                $tpl->setVariable( "first", true );
                                $tpl->setVariable( "last", false );
                                $tpl->setVariable( "placement", "first" );
                                $definedVariables[] = "first";
                                $definedVariables[] = "last";
                                $definedVariables[] = "placement";
                            }
                        }
                        else if ( $placement == count( $toolArray ) )
                        {
                            $tpl->setVariable( "first", false );
                            $tpl->setVariable( "last", true );
                            $tpl->setVariable( "placement", "last" );
                            $definedVariables[] = "first";
                            $definedVariables[] = "last";
                            $definedVariables[] = "placement";
                        }
                        else
                        {
                            $tpl->setVariable( "first", false );
                            $tpl->setVariable( "last",  false );
                            $tpl->setVariable( "placement", "" );
                            $definedVariables[] = "placement";
                        }
                        $tpl->processURI( $uri, true, $extraParameters, $textElements, $name, $name );
                        // unset var
                        foreach ( $whatParamsShouldBeUnset as $key )
                        {
                            $tpl->unsetVariable( $key, $name );
                        }
                        // replace var
                        foreach ( $whatParamsShouldBeReplaced as $key => $item_value )
                        {
                            $tpl->setVariable( $key, $item_value, $name );
                        }
                    }
                }
            }
        }
    }
888436
function doFunction( $name, $func_obj, $nspace, $current_nspace )
    {
        $func = $this->Functions[$name];
        if ( is_array( $func ) )
        {
            $this->loadAndRegisterFunctions( $this->Functions[$name] );
            $func = $this->Functions[$name];
        }
        if ( isset( $func ) and
             is_object( $func ) )
        {
            return $func->process( $this, $name, $func_obj, $nspace, $current_nspace );
        }
        else
        {
            $this->warning( "", "Function \"$name\" is not registered" );
            return false;
        }
    }
400389
function() {
		// Make sure that the DOM is not already loaded
		if ( !jQuery.isReady ) {
			// Remember that the DOM is ready
			jQuery.isReady = true;

			// If there are functions bound, to execute
			if ( jQuery.readyList ) {
				// Execute all of them
				jQuery.each( jQuery.readyList, function(){
					this.call( document, jQuery );
				});

				// Reset the list of functions
				jQuery.readyList = null;
			}

			// Trigger any bound ready events
			jQuery(document).triggerHandler("ready");
		}
	}
1066410
function(f) {
        return function(e) {
            var child = e.relatedTarget;
            if (this === child || $$.isChildElement(this, child)) {
                return;
            }
            f.call(this, e);
        };
    }