Add the default help, color and log options
765740
protected function registerDefaultOptions()
    {
        $this->options->registerOption(
            'help',
            'Display this help screen and exit immediately.',
            'h'
        );
        $this->options->registerOption(
            'no-colors',
            'Do not use any colors in output. Useful when piping output to other tools or files.'
        );
        $this->options->registerOption(
            'loglevel',
            'Minimum level of messages to display. Default is ' . $this->colors->wrap($this->logdefault, Colors::C_CYAN) . '. ' .
            'Valid levels are: debug, info, notice, success, warning, error, critical, alert, emergency.',
            null,
            'level'
        );
    }
266834
def function_options_help():
    

    message = m.Message()
    message.add(m.Brand())
    message.add(heading())
    message.add(content())
    return message
809511
def add_options(self):
        
        # These options need to be conflict-free to the containing
        # script, i.e. avoid short options if possible.
        self.script.add_bool_option("-i", "--interactive",
            help="interactive mode (prompt before changing things)")
        self.script.add_bool_option("--yes",
            help="positively answer all prompts (e.g. --delete --yes)")
289636
function configureDefaultMode (outputFolder) {
  const logfile = path.join(outputFolder, 'thumbsup.log')
  const stream = fs.createWriteStream(logfile, { flags: 'a' })
  overrideDebugFormat()
  debug.enable('thumbsup:error,thumbsup:warn')
  debug.useColors = () => false
  debug.log = function () {
    const line = util.format.apply(util, arguments) + '\n'
    stream.write(line)
  }
}
889780
protected function handleDefaultOptions()
    {
        if ($this->options->getOpt('no-colors')) {
            $this->colors->disable();
        }
        if ($this->options->getOpt('help')) {
            echo $this->options->help();
            exit(0);
        }
    }
751935
function helpPlugin() {
  return function(app) {

    // style to turn `[ ]` strings into
    // colored strings with backticks
    app.style('codify', function(msg) {
      var re = /\[([^\]]*\[?[^\]]*\]?[^[]*)\]/g;
      return msg.replace(re, function(str, code) {
        return this.red('`' + code + '`');
      }.bind(this));
    });

    // style and format a single help command
    app.style('helpCommand', function(command) {
      var msg = '';
      msg += this.bold(command.name.substr(0, 1).toUpperCase() +
                       command.name.substr(1) + ': ');
      msg += this.bold(command.description);
      return msg;
    });

    // style and format an array of help commands
    app.style('helpCommands', function(commands) {
      return commands
        .map(this.helpCommand)
        .join('\n\n');
    });

    // style and format a single example
    app.style('helpExample', function(example) {
      var msg = '';
      msg += ' ' + this.gray('# ' + example.description) + '\n';
      msg += ' ' + this.white('$ ' + example.command);
      return msg;
    });

    // style and format an array of examples
    app.style('helpExamples', function(examples) {
      return examples
        .map(this.helpExample)
        .join('\n\n');
    });

    // style and format a single option
    app.style('helpOption', function(option) {
      var msg = '';
      msg += ' ' + (option.flag ? this.bold(option.flag) : '  ');
      msg += ' ' + this.bold(option.name);
      msg += ' ' + this.bold(this.codify(option.description));
      return msg;
    });

    // style and format an array of options
    app.style('helpOptions', function(options) {
      return options
        .map(this.helpOption)
        .join('\n');
    });

    // style and formation a help text object using
    // other styles to break up responibilities
    app.emitter('help', function(help) {
      var msg = '\n';
      msg += this.bold('Usage: ') + this.cyan(help.usage) + '\n\n';
      msg += this.helpCommands(help.commands);

      if (help.examples && help.examples.length) {
        msg += this.bold('Examples:\n\n');
        msg += this.helpExamples(help.examples);
      }

      if (help.options && help.options.length) {
        msg += this.bold('Options:\n\n');
        msg += this.helpOptions(help.options);
      }
      return msg + '\n';
    });
  };
}
58226
private void addDefaults()
    {
        this.issueCategories.putIfAbsent(MANDATORY, new IssueCategory(MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Mandatory", MANDATORY, 1000, true));
        this.issueCategories.putIfAbsent(OPTIONAL, new IssueCategory(OPTIONAL, IssueCategoryRegistry.class.getCanonicalName(), "Optional", OPTIONAL, 1000, true));
        this.issueCategories.putIfAbsent(POTENTIAL, new IssueCategory(POTENTIAL, IssueCategoryRegistry.class.getCanonicalName(), "Potential Issues", POTENTIAL, 1000, true));
        this.issueCategories.putIfAbsent(CLOUD_MANDATORY, new IssueCategory(CLOUD_MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Cloud Mandatory", CLOUD_MANDATORY, 1000, true));
        this.issueCategories.putIfAbsent(INFORMATION, new IssueCategory(INFORMATION, IssueCategoryRegistry.class.getCanonicalName(), "Information", INFORMATION, 1000, true));
    }
193361
private void addSettingsButton() {

        Button button = CmsToolBar.createButton(
            FontOpenCms.SETTINGS,
            CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_LOGSETTINGS_TOOL_NAME_SHORT_0));
        button.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                Window window = CmsBasicDialog.prepareWindow(CmsBasicDialog.DialogWidth.wide);
                window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_LOGVIEW_SETTINGS_SHORT_0));
                window.setContent(new CmsLogFileViewSettings(window));
                window.addCloseListener(new CloseListener() {

                    private static final long serialVersionUID = -7058276628732771106L;

                    public void windowClose(CloseEvent e) {

                        m_fileView.updateView();
                    }
                });
                A_CmsUI.get().addWindow(window);
            }
        });
        m_uiContext.addToolbarButton(button);
    }
191227
protected function addDefaultCommands() {
        $this->addCommands([
            new GlobalVersionCommand(),
            new GlobalFormatCommand(),
            new GlobalSilentModeCommand(),
            new GlobalNoInteractionCommand(),
            new GlobalHelpCommand(),
            new GlobalVerbosityCommand(),
            new GlobalPassthroughCommand(),
            new ListCommand(),
            new HelpCommand(),
        ]);
    }
1120510
def get_default_config_help(self):
        
        config = super(GraphitePickleHandler, self).get_default_config_help()

        config.update({
        })

        return config
1205890
public void applyDefaults() {
		if (fillColor == null) {
			fillColor = "#ffffff"; // white
		}
		if (strokeColor == null) {
			strokeColor = "#000000"; // black
		}
		if (strokeOpacity == -1) {
			strokeOpacity = 1; // fully opaque by default
		}
		if (fillOpacity == -1) {
			fillOpacity = .5f; // 50% transparent by default
		}
		if (strokeWidth == -1) {
			strokeWidth = 1; // white
		}
	}
1099088
def help(cls):
        """"""
        print("for named colors use :")
        for c in sorted(list(cls.colors.items())):
            print("{:10} {}".format(*c))
586319
function addOptions() {
		if ( is_array( $this->options ) )
			extract( $this->options, EXTR_SKIP );

		global $themecolors;

		if ( empty($bg) )
			$bg = isset( $themecolors['bg'] ) ? $themecolors['bg'] : 'transparent';
		if ( empty($fg) )
			$fg = isset( $themecolors['text'] ) ? $themecolors['text'] : '000000';

		if ( empty( $method ) )
			$method = 'Automattic_Latex_WPCOM';

		if ( empty( $css ) )
			$css = 'img.latex { vertical-align: middle; border: none; background: none; }';

		if ( empty( $wrapper ) )
			$wrapper = false;

		$this->options = compact( 'bg', 'fg', 'method', 'css', 'wrapper' );
		update_option( 'pb_latex', $this->options );
	}
215355
function() {
    this.setHelpUrl(Blockly.Msg.COLOUR_BLEND_HELPURL);
    this.setColour(Blockly.Blocks.colour.HUE);
    this.appendValueInput('COLOUR1')
        .setCheck('Colour')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_BLEND_TITLE)
        .appendField(Blockly.Msg.COLOUR_BLEND_COLOUR1);
    this.appendValueInput('COLOUR2')
        .setCheck('Colour')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_BLEND_COLOUR2);
    this.appendValueInput('RATIO')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_BLEND_RATIO);
    this.setOutput(true, 'Colour');
    this.setTooltip(Blockly.Msg.COLOUR_BLEND_TOOLTIP);
  }
568709
public function help()
    {
        echo PHP_EOL;
        $output = new Output;
        $output->write('Available Commands', [
            'color'     => 'red',
            'bold'      => true,
            'underline' => true,
        ]);
        echo PHP_EOL;

        $maxlen = 0;
        foreach ($this->supportedArgs as $key => $description) {
            $len = strlen($key);
            if ($len > $maxlen) {
                $maxlen = $len;
            }

        }

        foreach ($this->supportedArgs as $key => $description) {
            $len = strlen($key);
            $output->write(' ')
                ->write($key, ['color' => 'yellow'])
                ->write(str_repeat(' ', $maxlen - $len))
                ->write(' - ')
                ->write($description);

            echo PHP_EOL;
        }

        echo PHP_EOL;

    }
315171
def set_global_defaults(**kwargs):
    """"""

    valid_options = [
        'active', 'selected', 'disabled', 'on', 'off',
        'on_active', 'on_selected', 'on_disabled',
        'off_active', 'off_selected', 'off_disabled',
        'color', 'color_on', 'color_off',
        'color_active', 'color_selected', 'color_disabled',
        'color_on_selected', 'color_on_active', 'color_on_disabled',
        'color_off_selected', 'color_off_active', 'color_off_disabled',
        'animation', 'offset', 'scale_factor',
        ]

    for kw in kwargs:
        if kw in valid_options:
            _default_options[kw] = kwargs[kw]
        else:
            error = "Invalid option '{0}'".format(kw)
            raise KeyError(error)
113722
function (console) {

            var loggers = [
                {
                    name  : 'log',
                    color : 'white'
                },
                {
                    name  : 'info',
                    color : 'cyan'
                },
                {
                    name  : 'error',
                    color : 'red'
                },
                {
                    name  : 'warning',
                    color : 'yellow'
                },
                {
                    name  : 'dir',
                    color : 'white'
                }
            ];

            loggers.forEach(function (logger) {
                console.addLogger(logger.name, logger.color);
            });
        }