Constructor: OpenLayers.Format.GPX
Create a new parser for GPX.

Parameters:
options - {Object} An optional object whose properties will be set on
this instance.
350897
function(options) {
        // GPX coordinates are always in longlat WGS84
        this.externalProjection = new OpenLayers.Projection("EPSG:4326");

        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
    }
359696
function setOptions(options) {
  var self = this
  var current = self.options
  var ruleRepetition
  var key

  if (options == null) {
    options = {}
  } else if (typeof options === 'object') {
    options = xtend(options)
  } else {
    throw new Error('Invalid value `' + options + '` for setting `options`')
  }

  for (key in defaults) {
    validate[typeof defaults[key]](options, key, current[key], maps[key])
  }

  ruleRepetition = options.ruleRepetition

  if (ruleRepetition && ruleRepetition < 3) {
    raise(ruleRepetition, 'options.ruleRepetition')
  }

  self.encode = encodeFactory(String(options.entities))
  self.escape = escapeFactory(options)

  self.options = options

  return self
}
694249
function formatter (options) {
  const line = [
    new Date().toISOString(),
    options.level
  ]

  if (options.message !== undefined) line.push(options.message)

  if (options.meta && Object.keys(options.meta).length) line.push(JSON.stringify(options.meta))

  return line.join(' ')
}
3922
function(options) {
        options = options || {};

        if(options.extractStyles !== false) {
            options.defaultStyle = {
                'externalGraphic': OpenLayers.Util.getImageLocation("marker.png"),
                'graphicWidth': 21,
                'graphicHeight': 25,
                'graphicXOffset': -10.5,
                'graphicYOffset': -12.5
            };
        }
        
        OpenLayers.Format.prototype.initialize.apply(this, [options]);
    }
1014956
def init_options_parser(options)
      OptionParser.new do |opts|
        opts.banner = "Usage:\n"\
        "\tsshez add <alias> (role@host) [options]\n"\
        "\tsshez connect <alias>\n"\
        "\tsshez remove <alias>\n\tsshez list\n"\
        "\tsshez reset\n"
        opts.separator ''
        opts.separator 'Specific options:'
        options_for_add(opts, options)
        # signals that we are in testing mode
        opts.on('-t', '--test', 'Writes nothing') {options.test = true}
        common_options(opts, options)
      end # OptionParser.new
    end
135631
function(options) {
      options = options || { };

      this.callSuper('initialize', options);

      this.set('rx', options.rx || 0);
      this.set('ry', options.ry || 0);

      this.set('width', this.get('rx') * 2);
      this.set('height', this.get('ry') * 2);
    }
1089444
function parseOptions(options) {
  let opts = {};

  _.each(nodecipher.defaults, (defaultVal, name) => {
    if (!_.isUndefined(options[name])) {
      opts[name] = options[name];
    }
  });

  return opts;
}
98710
function (parserOptions) {
            var me = this;
            if (parserOptions) {
                _gpfArrayForEach([
                    "header",
                    "separator",
                    "quote",
                    "newLine"
                ], function (optionName) {
                    if (parserOptions[optionName]) {
                        me["_" + optionName] = parserOptions[optionName];
                    }
                });
            }
        }
596183
function Options(opts) {

  //### Private properties

  var custfilt = [],
      varset   = {__FILE: '', $__FILE: '""'}

  //### Public Properties

  this.header1    = _defaults.header1
  this.headers    = _defaults.headers
  this.indent     = _defaults.indent
  this.eolType    = _defaults.eolType
  this.emptyLines = _defaults.emptyLines
  this.comments   = _defaults.comments
  this.filter     = _defaults.filter

  this.emitError  = procError     // error "handler"

  //### Public Methods

  this.invalid = function (msg, v) {
    this.emitError('Invalid ' + msg + ' ' + (v != null ? '"' + v + '"' : v))
  }

  this.getVars = function () {
    return varset
  }

  this.setFile = function (file) {
    varset.$__FILE = JSON.stringify(varset.__FILE = file)
  }

  this.def = function (s) {
    var m = s.match(RE_VARPAIR)

    if (m) {
      var k = m[1],
          v = m[2].trim()

      if (!RE_VARNAME.test(k))
        this.invalid('symbol name', k)
      else
        varset[k] = !v ? 1 :
          _fixValue(evalExpr(v, varset, this.emitError))
    }
    else
      this.invalid('symbol name or declaration', s) // only when starts with '='
  }

  this.undef = function (s) {
    var def = s.match(RE_VARNAME)

    if (def)
      delete varset[def[1]]
    else
      this.invalid('symbol name', s)
  }

  this.passFilter = function (str) {
    var i, f, filts

    for (i = 0; i < custfilt.length; ++i) {
      /* istanbul ignore else */
      if (custfilt[i].test(str)) return true
    }
    filts = this.filter
    if (filts === 'all')
      filts = Object.keys(_filters)
    for (i = 0; i < filts.length; ++i) {
      f = _filters[filts[i]]
      if (f.test(str)) return true
    }
    return false
  }

  this.merge = function (opt) {
    if (opt)
      merge.call(this, opt)
    return this
  }

  return this.merge(opts)

  //### Private methods

  // prepare a value for inclussion in the set of variables
  function _fixValue(v) {
    switch (typeof v) {
      case 'number':      // typeof NaN is 'number'
      case 'boolean':
      case 'undefined':
        break
      default:
        // date value returns 'new Date(NaN)' for null dates, ok
        v = v instanceof RegExp ? '' + v :
            v instanceof Date ? '(new Date(' + (+v) + '))' : // eslint-disable-line no-extra-parens
            v == null ? v : JSON.stringify(v)
        break
    }
    return v
  }

  // returns an array as-is or created from a delimited string
  function _split(v) {
    return Array.isArray(v) ? v : v.split(',')
  }

  // Enable filters for comments, 'all' enable all filters
  function _setFilter(filt) {
    filt = filt.trim()
    if (filt === 'all')
      this.filter = filt
    else if (filt in _filters) {
      if (this.filter !== 'all' && this.filter.indexOf(filt) < 0)
        this.filter.push(filt)
    }
    else this.invalid('filter', filt)
  }

  // Creates a custom filter
  function _createFilter(res) {
    for (var i = 0; i < res.length; ++i) {
      var f = res[i]

      if (f instanceof RegExp)
        custfilt.push(f)
      else {
        //console.log('--- creating regex with `' + str + '`')
        try {
          f = new RegExp(f)
          custfilt.push(f)
        }
        catch (e) {
          f = null
        }
        if (!f) this.invalid('custom filter', res[i])
      }
    }
  }

  function _formatHeader(str) {
    return !str ? '' :
      ('' + str)
      .replace(/\r\n?/g, '\n')
      .replace(/\^{1,2}/g, function (c) { return c[1] || '\n' })
  }

  function _setVars(set) {
    for (var k in set) {
      if (RE_VARNAME.test(k))
        varset[k] = _fixValue(set[k])
      else
        this.invalid('symbol name', k)
    }
  }

  /* eslint-disable guard-for-in, complexity */
  function merge(opt) {
    var k, v

    for (k in opt) {
      v = opt[k]

      switch (k) {
        case 'varset':
          _setVars.call(this, v)
          break
        case 'define':
        case 'set':
          _split(v).forEach(this.def, this)
          break
        case 'undef':
        case 'unset':
          _split(v).forEach(this.undef, this)
          break
        case 'filter':
          _split(v).forEach(_setFilter, this)
          break
        case 'customFilter':
          _createFilter(Array.isArray(v) ? v : [v])
          break
        case 'header1':
        case 'headers':
          this[k] = _formatHeader(v)
          break
        case 'emptyLines':
          this[k] = v | 0
          break
        case 'eolType':
          if (/^(?:win|mac|unix)$/.test(v))
            this[k] = v
          else
            this.invalid(k, v)
          break
        case 'comments':
          if (/^(?:all|none|filter)$/.test(v))
            this[k] = v
          else
            this.invalid(k + ' value', v)
          break
        case 'indent':
          if (/^\d+[ts]?/.test(v))
            this[k] = v
          else if (!v)
            this[k] = ''
          else
            this.invalid(k, v)
          break
        default:
          break
      }
      //else
      //  console.log('Ignoring option ' + k)
    }
  }
}
705208
def build_parser(line):
    # type: (Text) -> optparse.OptionParser
    
    parser = optparse.OptionParser(add_help_option=False)

    option_factories = SUPPORTED_OPTIONS + SUPPORTED_OPTIONS_REQ
    for option_factory in option_factories:
        option = option_factory()
        parser.add_option(option)

    # By default optparse sys.exits on parsing errors. We want to wrap
    # that in our own exception.
    def parser_exit(self, msg):
        # add offending line
        msg = 'Invalid requirement: %s\n%s' % (line, msg)
        raise RequirementsFileParseError(msg)
    # NOTE: mypy disallows assigning to a method
    #       https://github.com/python/mypy/issues/2427
    parser.exit = parser_exit  # type: ignore

    return parser
174897
def Options(**kwargs):
     
     construct = GPDOptions #IMPORTANT!  Set this
     names = construct._fields
     d = {}
     for name in names: d[name] = None #default values
     for k,v in kwargs.iteritems():
       if k in names: d[k] = v
       else: raise ValueError('Error '+k+' is not a property of these options')
     """Create a set of options based on the inputs"""
     return construct(**d)
1253037
function Parser(options) {
    this.options = options || {};
    this.h = this.options.h || function (tagName, properties, value) {
        return value;
    };
    this.renderer = Object.assign(renderer, this.options.renderer || {});
}
1150476
function(options) {
        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
        var options = {
            slideFactor: this.slideFactor,
            slideRatio: this.slideRatio
        };
        this.addControls([
            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH, options),
            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH, options),
            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST, options),
            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST, options)
        ]);
    }
555147
def create_parser(self):
        
        return OptionParser(prog=self.prog_name,
                            usage=self.usage(),
                            version='%%prog %s' % self.get_version(),
                            option_list=self.option_list)
56403
private String[] parseGeneralOptions(Options opts, Configuration conf, 
      String[] args) {
    opts = buildGeneralOptions(opts);
    CommandLineParser parser = new GnuParser();
    try {
      commandLine = parser.parse(opts, args, true);
      processGeneralOptions(conf, commandLine);
      return commandLine.getArgs();
    } catch(ParseException e) {
      LOG.warn("options parsing failed: "+e.getMessage());

      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp("general options are: ", opts);
    }
    return args;
  }
450493
def parse_options(options)
      options = Shellwords.split(options) unless options.is_a?(Array)
      parser = Thor::Options.new(self.class.class_options)
      parser.parse(options)
    end
252039
function(options) {
        // compile regular expressions once instead of every time they are used
        this.regExes = {
            trimSpace: (/^\s*|\s*$/g),
            removeSpace: (/\s*/g),
            splitSpace: (/\s+/),
            trimComma: (/\s*,\s*/g)
        };
        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
    }