Default location method
542949
function() {
			this.writeDebug('defaultLocation');
			var _this = this,
				distance = null,
				$distanceInput = $('#' + this.settings.maxDistanceID),
				originAddress;

			// Query string parameters
			if (this.settings.querystringParams === true) {
				// Check for distance query string parameters
				if (this.getQueryString(this.settings.maxDistanceID)){
					distance = this.getQueryString(this.settings.maxDistanceID);

					if ($distanceInput.val() !== '') {
						distance = $distanceInput.val();
					}
				}
				else {
					// Get the distance if set
					if (this.settings.maxDistance === true) {
						distance = $distanceInput.val() || '';
					}
				}
			}
			else {
				// Get the distance if set
				if (this.settings.maxDistance === true) {
					distance = $distanceInput.val() || '';
				}
			}

			// The address needs to be determined for the directions link
			var r = new this.reverseGoogleGeocode(this);
			var latlng = new google.maps.LatLng(this.settings.defaultLat, this.settings.defaultLng);
			r.geocode({'latLng': latlng}, function (data) {
				if (data !== null) {
					originAddress = addressInput = data.address;
					olat = mappingObj.lat = _this.settings.defaultLat;
					olng = mappingObj.lng = _this.settings.defaultLng;
					mappingObj.distance = distance;
					mappingObj.origin = originAddress;
					_this.mapping(mappingObj);
				} else {
					// Unable to geocode
					_this.notify(_this.settings.addressErrorAlert);
				}
			});
		}
266320
def default_database(ctx: click.Context, _param: Parameter, value: Optional[str]):
    """"""
    if value:
        return value

    if ctx.params["repository"]:
        return os.path.join(ctx.params["repository"], DB.DEFAULT_DB_FILE)

    raise click.BadParameter("Could not guess a database location")
291231
function defaultWindowsLocation() {
  var files = [
    process.env['PROGRAMFILES'] || 'C:\\Program Files',
    process.env['PROGRAMFILES(X86)'] || 'C:\\Program Files (x86)'
  ].map(function(prefix) {
    return path.join(prefix, 'Mozilla Firefox\\firefox.exe');
  });
  return io.exists(files[0]).then(function(exists) {
    return exists ? files[0] : io.exists(files[1]).then(function(exists) {
      return exists ? files[1] : null;
    });
  });
}
866666
def locate(command, on):
    """"""
    location = find_page_location(command, on)
    click.echo(location)
1282534
def get_default_location(self):
        
        res = []
        for location in self.distdefault:
            res.extend(self.get_location(location))
        return res
1359169
def location(self):
        """"""
        location, _, revision = self.expression.partition('#')
        return location if location and revision else None
1081491
def randomLocation(cls, radius, width, height, origin=None):
        '''
        
        '''
        return cls(width,
                   height,
                   Point.randomLocation(radius, origin))
449685
function Location(base, somePath) {
  if (base == null) {
    throw new Error('base == null');
  }
  this.base = base;
  this.path = somePath;
}
1033802
def set_default(nick, location, session, send, apikey):
    """"""
    if valid_location(location, apikey):
        send("Setting default location")
        default = session.query(Weather_prefs).filter(Weather_prefs.nick == nick).first()
        if default is None:
            default = Weather_prefs(nick=nick, location=location)
            session.add(default)
        else:
            default.location = location
    else:
        send("Invalid or Ambiguous Location")
1127935
def list_locations(self):
        
        known = self.defaults.get_known_locations()
        for default in self.defaults.distdefault:
            if default not in known:
                known.add(default)
        if not known:
            err_exit('No locations', 0)
        for location in sorted(known):
            if location in self.defaults.distdefault:
                print(location, '(default)')
            else:
                print(location)
        sys.exit(0)
769836
public void setPropertiesLocation(String location) {
        Properties properties = load(null, new PathMatchingResourcePatternResolver(), location);
        if (properties != null && properties.size() > 0) {
            configure(properties);
        }
    }
741433
private void setLocation(String _location) {

        String res = null;
        File resFile = null;

        boolean relativePath = true;
        boolean defaultPath = false;

        // try as "absolute" resource (contains symbol, or absolute path)
        try {
            res = cfgSvc.resolveString(_location);
            resFile = new File(res);
            relativePath = !resFile.isAbsolute();
        } catch (IllegalStateException e) {
            // ignore
        }

        if (resFile == null || (!resFile.isFile() && relativePath)) {
            // look for resource in server config location
            try {
                res = cfgSvc.resolveString(LibertyConstants.DEFAULT_CONFIG_LOCATION + _location);
                resFile = new File(res);
            } catch (IllegalStateException e) {
                // ignore
            }

            if (resFile == null || !resFile.isFile()) {
                // fall back to creating for resource in shared output location
                try {
                    res = cfgSvc.resolveString(LibertyConstants.DEFAULT_OUTPUT_LOCATION + _location);
                    resFile = new File(res);
                    defaultPath = true;
                } catch (IllegalStateException e) {
                    // ignore
                }
            }
        }

        // Work against the symbol in the original location
        // The original location may be been
        if (isDefault && (defaultPath || locationInOutputDir(_location))) {
            this.initializeAtStartup = true;
        }

        // reset location w/ resolved value
        // isDefault tested because the default path's file may not exists (and that's OK)
        if ((res != null && resFile.isFile()) || isDefault) {
            this.location = res;
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Found store under [" + location + "]");
            }
        } else {
            // If it wasn't found then it's likely going to trigger
            // the load.error later. Issue a warning to explain the file
            // could not be found.
            Tr.warning(tc, "ssl.keystore.not.found.warning", res, name);
        }
    }
1118166
def location
      st = Position.new(0, 0)
      en = Position.from_offset(code, code.length)
      range = Range.new(st, en)
      Location.new(filename, range)
    end
750500
function locate (methods) {
  var found = []
  var i = -1

  while (++i < methods.length) {
    if (methods[i] && methods[i].match(/FrontMatter$/)) {
      found.push(methods[i])
    }
  }

  return found
}
618225
def get_home_location():
    
    config = SafeConfigParser()
    config_filename = ONTOSPY_LOCAL + '/config.ini'

    if not os.path.exists(config_filename):
        config_filename = 'config.ini'

    config.read(config_filename)
    try:
        _location = config.get('models', 'dir')
        if _location.endswith("/"):
            return _location
        else:
            return _location + "/"
    except:
        # FIRST TIME, create it
        config.add_section('models')
        config.set('models', 'dir', ONTOSPY_LIBRARY_DEFAULT)
        with open(config_filename, 'w') as f:
            # note: this does not remove previously saved settings
            config.write(f)

        return ONTOSPY_LIBRARY_DEFAULT
441151
def setDirection(self, outputLocation, inputLocation):
        
        self.setOutputLocation(outputLocation)
        self.setInputLocation(inputLocation)
743676
public function setDefaultLocation(Location $defaultLocation)
    {
        $this->defaultLocation = $defaultLocation;
        $this->setLatitude($defaultLocation->getLatitude());
        $this->setLongitude($defaultLocation->getLongitude());
    }