helping functions
555846
function reserveWorker(workerType, callback) {
        var debug = false,
            execArgv = process.execArgv.filter(function (arg) {
                if (arg.indexOf('--debug-brk') === 0) {
                    debug = '--debug-brk';
                } else if (arg.indexOf('--debug') === 0) {
                    debug = '--debug';
                } else if (arg.indexOf('--inspect-brk') === 0) {
                    debug = '--inspect-brk';
                } else if (arg.indexOf('--inspect') === 0) {
                    debug = '--inspect';
                } else {
                    return true;
                }

                return false;
            }),
            childProcess;

        // http://stackoverflow.com/questions/16840623/how-to-debug-node-js-child-forked-process
        // For some reason --debug-brk is given here..
        if (debug) {
            execArgv.push(debug + '=' + debugPort.toString());
            logger.info('Child debug port: ' + debugPort.toString());
            debugPort += 2;
        }

        logger.debug('execArgv for main process', process.execArgv);
        logger.debug('execArgv for new child process', execArgv);

        childProcess = Child.fork(CONNECTED_WORKER_JS, [], {execArgv: execArgv});

        _workers[childProcess.pid] = {
            childProcess: childProcess,
            state: CONSTANTS.workerStates.initializing,
            type: workerType,
            cb: null
        };

        logger.debug('workerPid forked ' + childProcess.pid);
        childProcess.on('message', function (msg) {
            messageHandling(msg);

            // FIXME: Do we really need the "initialize" in addition to "initialized"?
            // FIXME: Why couldn't the worker start the initializing at spawn? (It can load the gmeConfig itself)
            if (msg.type === CONSTANTS.msgTypes.initialized && typeof callback === 'function') {
                callback();
                callback = null;
            }
        });

        childProcess.on('exit', function (code, signal) {
            logger.debug('worker has exited: ' + childProcess.pid);
            // When killing child-process the code is undefined and the signal SIGINT.
            if (code !== 0 && signal !== 'SIGINT') {
                logger.warn('worker ' + childProcess.pid + ' has exited abnormally with code ' + code +
                    ', signal', signal);
                if (typeof callback === 'function') {
                    callback(new Error('worker ' + childProcess.pid + ' exited abnormally with code ' + code));
                }
            } else {
                logger.debug('worker ' + childProcess.pid + ' was terminated.');
            }

            if (workerType === CONSTANTS.workerTypes.connected) {
                self.connectedWorkerId = null;
            }

            delete _workers[childProcess.pid];
            reserveWorker(workerType);
        });
    }
240172
def grant_assistance(self, column=None, value=None, **kwargs):
        """"""
        return self._resolve_call('GIC_GRANT_ASST_PGM', column, value, **kwargs)
501673
def show_help(self):
        
        self.s.move(1,0)
        self.s.clrtobot()
        self.set_header('Help'.center(self.pad_w))
        self.set_footer(' ESC or \'q\' to return to main menu')
        self.s.refresh()
        self.current_pad = 'help'
        self.refresh_current_pad()
1199036
def help(rest):
	""""""
	rs = rest.strip()
	if rs:
		# give help for matching commands
		for handler in Handler._registry:
			if handler.name == rs.lower():
				yield '!%s: %s' % (handler.name, handler.doc)
				break
		else:
			yield "command not found"
		return

	# give help for all commands
	def mk_entries():
		handlers = (
			handler
			for handler in Handler._registry
			if type(handler) is pmxbot.core.CommandHandler
		)
		handlers = sorted(handlers, key=operator.attrgetter('name'))
		for handler in handlers:
			res = "!" + handler.name
			if handler.aliases:
				alias_names = (alias.name for alias in handler.aliases)
				res += " (%s)" % ', '.join(alias_names)
			yield res
	o = io.StringIO(" ".join(mk_entries()))
	more = o.read(160)
	while more:
		yield more
		time.sleep(0.3)
		more = o.read(160)
466770
public function help() {
		$this->out('Inflector Shell');
		$this->out('');
		$this->out('This shell uses the Inflector class to inflect any word(s) you wish');
		$this->hr();
		$this->out('Usage: cake inflect');
		$this->out('       cake inflect methodName');
		$this->out('       cake inflect methodName word');
		$this->out('       cake inflect methodName words to inflect');
		$this->out('');
	}
774197
def help(cls, task=None):
        """"""
        if task is None:
            usage_list = []
            for task in iter(cls._tasks):
                task_func = getattr(cls, task)
                usage_string = "  %s %s" % (cls._prog, task_func.usage)
                desc = task_func.__doc__.splitlines()[0]
                usage_list.append((usage_string, desc))
            max_len = functools.reduce(lambda m, item: max(m, len(item[0])), usage_list, 0)
            print("Tasks:")
            cols = int(os.environ.get("COLUMNS", 80))
            for line, desc in usage_list:
                task_func = getattr(cls, task)
                if desc:
                    line = "%s%s  # %s" % (line, " " * (max_len - len(line)), desc)
                if len(line) > cols:
                    line = line[:cols - 3] + "..."
                print(line)
        else:
            task_func = getattr(cls, task)
            print("Usage:")
            print("  %s %s" % (cls._prog, task_func.usage))
            print("")
            print(task_func.__doc__)
1043020
def _do_help(self, cmd, args):
        
        print(self.doc_string())
        print()

        # Create data of the commands table.
        data_unsorted = []
        cls = self.__class__
        for name in dir(cls):
            obj = getattr(cls, name)
            if iscommand(obj):
                cmds = []
                for cmd in getcommands(obj):
                    cmds.append(cmd)
                cmd_str = ','.join(sorted(cmds))
                doc_str = textwrap.dedent(obj.__doc__).strip() if obj.__doc__ else \
                        '(no doc string available)'
                data_unsorted.append([cmd_str, doc_str])
        data_sorted = sorted(data_unsorted, key = lambda x: x[0])
        data = [['COMMANDS', 'DOC STRING']] + data_sorted

        # Create the commands table.
        table_banner = 'List of Available Commands'
        table = terminaltables.SingleTable(data, table_banner)
        table.inner_row_border = True
        table.inner_heading_row_border = True
        print(table.table)
413541
private void helpAction(String arg) {
        if (arg == null) {
            printMainUsage();
            return;
        }

        String helpTarget = arg.toLowerCase();

        if (helpTarget.equals(ACTION_VIEW)) {
            printViewUsage();
        } else if (helpTarget.equals(ACTION_COPY)) {
            printCopyUsage();
        } else if (helpTarget.equals(ACTION_LISTINSTANCES)) {
            printListInstancesUsage();
        } else {
            printMainUsage();
        }
    }
1201342
def help(self):
        ''''''
        # This returns a help string for a given task of the form:
        #
        # ==================================================
        # <name>
        # ============================== (If supplied)
        # <docstring>
        # ============================== (If overrides other tasks)
        # Overrides <other task file>
        # ==============================
        # From <file> on <line>
        # ==============================
        # <name>(Argspec)
        result = [
            '=' * 50,
            self.name
        ]

        # And the doc, if it exists
        if self.doc:
            result.extend([
                '=' * 30,
                self.doc
            ])

        override = self.overrides
        while override:
            if isinstance(override, Shovel):
                result.append('Overrides module')
            else:
                result.append('Overrides %s' % override.file)
            override = override.overrides

        # Print where we read this function in from
        result.extend([
            '=' * 30,
            'From %s on line %i' % (self.file, self.line),
            '=' * 30,
            '%s%s' % (self.name, str(Args(self.spec)))
        ])
        return os.linesep.join(result)
330240
def helper_method(name, *args, &block)
      if name.match /_path$/
        helpers.send(name, *args, &block)
      elsif (const_get([name, 'engine'].join('/').classify) rescue nil)
        helpers.send(name, *args, &block)
      else
        current_arbre_element.add_child helpers.send(name, *args, &block)
      end
    end
205936
def do_help(self, line):
        
        command, = self._split_args(line, 0, 1)
        if command is None:
            return self._print_help()
        cmd.Cmd.do_help(self, line)
509795
def help(self, *args, **kwargs):
        """"""
        if len(args) > 0 or len(kwargs) > 0:
            import pydoc

            pydoc.help(*args, **kwargs)
        else:
            hstr = helpstr
            for i in hstr.split("\n"):
                self.logger.info(i)
        return True
109950
function(input) {
  if (!input)
    return show_help();

  switch (input[0]) {

    case 'help':
      show_help(input[1])
      break;

    case 'command':
      agent.commands.perform(input[1]);
      break;

    default:
      say('Unknown command: ' + input[0]);
  }
}
623287
def needs_manager_helps():
    

    message = m.Message()
    message.add(m.Brand())
    message.add(heading())
    message.add(content())
    return message
905201
function outputHelpIfNecessary(cmd, options) {
  options = options || [];
  for (var i = 0; i < options.length; i++) {
    if (options[i] == '--help' || options[i] == '-h') {
      process.on('exit', function() {
        consoleFlush(cmd.helpInformation());
        cmd.emit('--help');
        consoleFlush("");
      });
      process.exit();
    }
    
    return true;
  }
}
1322760
def help(self):
        """"""
        if not self.fv.gpmon.has_plugin('WBrowser'):
            self._help_docstring()
            return

        self.fv.start_global_plugin('WBrowser')

        # need to let GUI finish processing, it seems
        self.fv.update_pending()

        obj = self.fv.gpmon.get_plugin('WBrowser')
        obj.show_help(plugin=self, no_url_callback=self._help_docstring)
385360
def help(handler):
    
    data = {'operation': 'describe'}
    response = handler.invoke(data, raw=True)
    description = response.data
    lines = []
    lines.append('# {}'.format(handler.lambda_fn))
    lines.append('## Handler Info')
    lines.append('**Cruddy version**: {}'.format(
        description['cruddy_version']))
    lines.append('')
    lines.append('**Table name**: {}'.format(description['table_name']))
    lines.append('')
    lines.append('**Supported operations**:')
    lines.append('')
    for op in description['supported_operations']:
        lines.append('* {}'.format(op))
    lines.append('')
    lines.append('**Prototype**:')
    lines.append('')
    lines.append('```')
    lines.append(str(description['prototype']))
    lines.append('```')
    lines.append('')
    lines.append('## Operations')
    for op_name in description['operations']:
        op = description['operations'][op_name]
        lines.append('### {}'.format(op_name))
        lines.append('')
        lines.append(_build_signature_line(
            op_name, description['operations'][op_name]['argspec']))
        lines.append('')
        if op['docs'] is None:
            lines.append('')
        else:
            lines.append(op['docs'])
        lines.append('')
    click.echo('\n'.join(lines))