/*
start
node instances methods
558560
@Override
    public Collection<NodeInstanceDesc> getProcessInstanceHistoryActive(long processId, QueryContext queryContext) {
        return getProcessInstanceHistory(processId, false, queryContext);
    }
465450
public void start() {
        if (hasRedissonInstance) {
            redisson = Redisson.create(config);
        }
        
        retrieveAddresses();
        
        if (config.getRedissonNodeInitializer() != null) {
            config.getRedissonNodeInitializer().onStartup(this);
        }
        
        int mapReduceWorkers = config.getMapReduceWorkers();
        if (mapReduceWorkers != -1) {
            if (mapReduceWorkers == 0) {
                mapReduceWorkers = Runtime.getRuntime().availableProcessors();
            }
            redisson.getExecutorService(RExecutorService.MAPREDUCE_NAME).registerWorkers(mapReduceWorkers);
            log.info("{} map reduce worker(s) registered", mapReduceWorkers);
        }
        
        for (Entry<String, Integer> entry : config.getExecutorServiceWorkers().entrySet()) {
            String name = entry.getKey();
            int workers = entry.getValue();
            redisson.getExecutorService(name).registerWorkers(workers);
            log.info("{} worker(s) for '{}' ExecutorService registered", workers, name);
        }

        log.info("Redisson node started!");
    }
913122
function Node (config) {
    RED.nodes.createNode(this, config);
    var node = this;

    // Invoked when the node has received an input as part of a flow.
    this.on('input', function (msg) {
      processOnInput(msg, config, node);
    });
  }
1278450
function(root) {
      // establish $ instance variable
      var $ = this.$ = this.$ || {};
      // populate $ from nodes with ID from the LOCAL tree
      if (root) {
        var n$ = root.querySelectorAll("[id]");
        for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {
          $[n.id] = n;
        };
      }
    }
1234221
function start () {
  if (!node) {
    const options = {
      EXPERIMENTAL: {
        pubsub: true
      },
      repo: 'ipfs-' + Math.random(),
      config: {
        Addresses: {
          Swarm: ['/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star']
        }
      }
    }

    node = new IPFS(options)

    node.once('start', () => {
      node.id()
        .then((id) => {
          info = id
          updateView('ready', node)
          onSuccess('Node is ready.')
          setInterval(refreshPeerList, 1000)
          setInterval(sendFileList, 10000)
        })
        .catch((error) => onError(error))

      subscribeToWorkpsace()

      window.addEventListener('hashchange', workspaceUpdated)
    })
  }
}
514103
public void start() {
        if (!raftIntegration.isReady()) {
            raftIntegration.schedule(new Runnable() {
                @Override
                public void run() {
                    start();
                }
            }, RAFT_NODE_INIT_DELAY_MILLIS, MILLISECONDS);
            return;
        }

        if (logger.isFineEnabled()) {
            logger.fine("Starting raft node: " + localMember + " for " + groupId
                    + " with " + state.memberCount() + " members: " + state.members());
        }
        raftIntegration.execute(new PreVoteTask(this, 0));

        scheduleLeaderFailureDetection();
    }
1086394
def _is_start(event, node, tagName):  # pylint: disable=invalid-name
    """"""

    return event == pulldom.START_ELEMENT and node.tagName == tagName
497580
def start_node(self):
        
        return db.cypher_query("MATCH (aNode) "
                               "WHERE id(aNode)={nodeid} "
                               "RETURN aNode".format(nodeid=self._start_node_id),
                               resolve_objects = True)[0][0][0]
42752
function startServer() {
    // Print warnings, if any.
    printIgnoredOptions();

    console.log('nodeGame v.' + version);
    // Add nodeGame version (might be higher than server version) to options.
    options.nodeGameVersion = version;

    // Start server, options parameter is optional.
    sn = new ServerNode(options);

    sn.ready(function() {
        var channel;
        var i, phantoms;
        var startPhantom, handleGameover;
        var gameName, gameDir, queryString;
        var numFinished;

        // If there are not bots to add returns.
        if (!program.phantoms) return;

        gameName = program.phantoms;
        channel = sn.channels[gameName];
        if (!channel) {
            printErr('channel ' + gameName + ' was not found.');
            if (killServer) process.exit();
            return;
        }

        if (auth && !channel.gameInfo.auth.enabled) {
            printErr('auth option enabled, but channel does not support it.');
            process.exit();
        }

        gameDir = sn.channels[gameName].getGameDir();

        if (clientType) queryString = '?clientType=' + clientType;

        if (killServer || runTests) {
            handleGameover = function() {
                var command, testProcess;

                console.log();
                console.log(gameName + ' game has run successfully.');
                console.log();

                if (runTests) {
                    command = path.resolve(gameDir, 'node_modules', '.bin', 'mocha');
                    if (fs.existsSync(command)) {

                        // Write and backup settings file.
                        writeSettingsFile(gameDir);

                        command += ' ' + gameDir + 'test/ --colors';
                        testProcess = exec(command,
                                           function(err, stdout, stderr) {
                                               if (stdout) console.log(stdout);
                                               if (stderr) console.log(stderr);
                                               testProcess.kill();
                                               if (killServer) process.exit();
                                           });
                    }
                    else {
                        printErr('Cannot run tests, mocha not found: ',
                                 command);
                    }
                }
                else if (killServer) process.exit();
            };
        }

        
        startPhantom = function(i) {
            var str, config;
            str = 'Connecting phantom #' + (i+1) + '/' + nClients;
            if (codesDb) {
                config = { queryString: queryString, auth: codesDb[i] };
            }
            else {
                config = { queryString: queryString, auth: auth };
            }
            if (config.auth) {
                if (config.auth.id) {
                    str += ' id: ' + config.auth.id;
                    if (config.auth.pwd) str += ' pwd: ' + config.auth.pwd;
                }
                else {
                    str += ' ' + config.auth;
                }
            }
            console.log(str);
            phantoms[i] = channel.connectPhantom(config);
            if ('undefined' !== typeof handleGameover) {
                // Wait for all PhantomJS processes to exit, then stop server.
                phantoms[i].on('exit', function(code) {
                    numFinished ++;
                    if (numFinished === nClients) {
                        handleGameover();
                    }
                });
            }
        };

        phantoms = [], numFinished = 0;
        for (i = 0; i < nClients; ++i) {
            if (i > 0 && wait) {
                (function(i) { 
                    setTimeout(function() { startPhantom(i); }, wait * i);
                })(i);
            }
            else {
                startPhantom(i);
            }
        }

        // TODO: Listen for room creation instead of timeout.
        //setTimeout(function() {
        //    var node;
        //    node = sn.channels.ultimatum.gameRooms["ultimatum1"].node;
        //    node.events.ee.ng.on(
        //    'GAME_OVER', function() {console.log('The game is over now.');});
        //}, 5000);


    });

    return sn;
}
1264877
public void startRootElement() throws XMLException, IOException {
		start();
		while (!Type.START_ELEMENT.equals(event.type)) next();
	}
827177
function(e) {
      switch (e.data.action) {
        case 'start':
          init(
            new Float32Array(e.data.nodes),
            new Float32Array(e.data.edges),
            e.data.config
          );

          // First iteration(s)
          run(W.settings.startingIterations);
          break;

        case 'loop':
          NodeMatrix = new Float32Array(e.data.nodes);
          run(W.settings.iterationsPerRender);
          break;

        case 'config':

          // Merging new settings
          configure(e.data.config);
          break;

        case 'kill':

          // Deleting context for garbage collection
          __emptyObject(W);
          NodeMatrix = null;
          EdgeMatrix = null;
          RegionMatrix = null;
          self.removeEventListener('message', listener);
          break;

        default:
      }
    }
526039
function nodeExec() {
	var exitCode = nodeCLI.exec.apply(nodeCLI, arguments).code;
	if (exitCode > 0) {
		exit(1);
	}
}
530668
function nodeExec(args) {
	args = arguments; // make linting happy
	var code = nodeCLI.exec.apply(nodeCLI, args).code;
	if (code !== 0) {
		exit(code);
	}
}
930265
public void start() {
    instanceLock.writeLock().lock();
    try {
      for (final Map.Entry<MongoNamespace, NamespaceChangeStreamListener> streamerEntry :
          nsStreamers.entrySet()) {
        streamerEntry.getValue().start();
      }
    } finally {
      instanceLock.writeLock().unlock();
    }
  }
294170
def _start_instance(self):
        """"""
        instance = self._get_instance()
        self.compute_driver.ex_start_node(instance)
        self.compute_driver.wait_until_running(
            [instance],
            timeout=self.timeout
        )
413921
function BlynkClientNode(n) {
        // Create a RED node
        RED.nodes.createNode(this, n);
        var node = this;
        node.msg_callbacks = [];
        // Store local copies of the node configuration (as defined in the .html)
        node.path = n.path;
        node.key = n.key;

        node._inputNodes = []; // collection of nodes that want to receive events
        node._clients = {};
        // match absolute url
        node.closing = false;
        node.logged = false;

        node.setMaxListeners(100);

        node.pinger = setInterval(function() {
            //only ping if connected and working
            if (node.logged) {
                node.ping();
            }
        }, 5000);

        node.closing = false;

        function startconn() { // Connect to remote endpoint
            //should not start connection if no server or key
            node.log(RED._("Start connection: ") + node.path);
            node.logged = false;
            var socket = new ws(node.path);
            node.server = socket; // keep for closing
            socket.setMaxListeners(100);

            socket.on('open', function() {
                node.login(node.key);
            });

            socket.on('close', function() {
                node.log(RED._("Connection closed: ") + node.path);
                node.emit('closed');
                node.logged = false;
                if (!node.closing) {
                    clearTimeout(node.tout);
                    node.tout = setTimeout(function() {
                        startconn();
                    }, 5000); // try to reconnect every 5 secs... bit fast ?
                }
            });

            socket.on('message', function(data, flags) {
                var cmd = decodeCommand(data);
                if (cmd.type == MsgType.RESPONSE && cmd.msgId && cmd.msgId <= node.msg_callbacks.length) {
                    var err = null
                    if (cmd.status != MsgStatus.OK) {
                        err = cmd.status
                    }
                    node.msg_callbacks[cmd.msgId - 1](cmd, err)
                    node.msg_callbacks.splice(cmd.msgId - 1, 1);
                } else {
                    switch (cmd.type) {
                        case MsgType.HARDWARE:
                            switch (cmd.operation) {
                                //input nodes
                                case 'vw':
                                    node.handleWriteEvent(cmd);
                                    break;
                                case 'vr':
                                    node.handleReadEvent(cmd);
                                    break;
                                default:
                                    node.warn(RED._("Unhandled HARDWARE operation: ") + messageToDebugString(data));
                            }
                            break;
                        default:
                            node.warn(RED._("Unhandled operation type: ") + messageToDebugString(data));
                    }
                }
            });
            socket.on('error', function(err) {
                node.error(RED._("Socket error: ") + err);
                node.emit('erro');
                node.logged = false;
                if (!node.closing) {
                    clearTimeout(node.tout);
                    node.tout = setTimeout(function() {
                        startconn();
                    }, 5000); // try to reconnect every 5 secs... bit fast ?
                }
            });
        }

        node.on("close", function() {
            // Workaround https://github.com/einaros/ws/pull/253
            // Remove listeners from RED.server
            node.closing = true;
            node.logged = false;
            node.server.close();
            if (node.tout) {
                clearTimeout(node.tout);
            }
        });

        startconn(); // start outbound connection

    }
31247
function(nodes) {

        if (!nodes) {
            return;
        }

        var self = this;

        self.nodes = [];

        _.each(nodes, function(node) {
            self.nodes.push(new rackspace.Node(self, node));
        });

        self.nodeCount = self.nodes.length;
    }