Injects Geocoder related services in the application.
547533
protected function injectServices(Container $app)
    {
        if (isset($app['profiler'])) {
            $app['geocoder.logger'] = function($app) {
                return new \Geocoder\Logger\GeocoderLogger();
            };

            $app['geocoder'] = function($app) {
                $geocoder = new \Geocoder\LoggableGeocoder();
                $geocoder->setLogger($app['geocoder.logger']);
                $geocoder->registerProvider($app['geocoder.provider']);

                return $geocoder;
            };
        } else {
            $app['geocoder'] = function($app) {
                $geocoder = new \Geocoder\Geocoder();
                $geocoder->registerProvider($app['geocoder.provider']);

                return $geocoder;
            };
        }

        $app['geocoder.provider'] = function($app) {
            return new \Geocoder\Provider\FreeGeoIpProvider($app['geocoder.adapter']);
        };

        $app['geocoder.adapter'] = function($app) {
            return new \Geocoder\HttpAdapter\CurlHttpAdapter();
        };
    }
903317
function inject(target, source) {
    for (var k in source.prototype) {
        target.prototype[k] = source.prototype[k];
    }
}
61281
private static void _register (@Nonnull @Nonempty final String sCountryCode, @Nonnull final EContinent... aContinents)
  {
    final Locale aCountry = CountryCache.getInstance ().getCountry (sCountryCode);
    if (s_aMap.containsKey (aCountry))
      throw new IllegalArgumentException ("Country code '" + sCountryCode + "' is already registered!");
    for (final EContinent eContinent : aContinents)
      s_aMap.putSingle (aCountry, eContinent);
  }
905254
private void injectCache(IntConsumer cacheAware) {
      if (cacheAware instanceof CacheAware) {
         ((CacheAware) cacheAware).injectCache(registry.getComponent(Cache.class));
      }
   }
1138589
function HereGeocoder(httpAdapter, options) {
  this.options = ['appId', 'appCode', 'language', 'politicalView', 'country', 'state'];

  HereGeocoder.super_.call(this, httpAdapter, options);

  if (!this.options.appId || !this.options.appCode) {
    throw new Error('You must specify appId and appCode to use Here Geocoder');
  }
}
579116
private void createProxies() {
    source = createProxy(sourceType);
    destination = createProxy(destinationType);

    for (VisitedMapping mapping : visitedMappings) {
      createAccessorProxies(source, mapping.sourceAccessors);
      createAccessorProxies(destination, mapping.destinationAccessors);
    }
  }
308941
function()
    {
        var _this = this;

        _(api.services).each(function(service, key) {
            _this._addService(service);
        });
    }
426353
private Map<String, Map<String, String>> buildInjectionMap(NamingResources namingResources) {
        Map<String, Map<String, String>> injectionMap = new HashMap<String, Map<String, String>>();
        for (Injectable resource: namingResources.findLocalEjbs()) {
            addInjectionTarget(resource, injectionMap);
        }
        for (Injectable resource: namingResources.findEjbs()) {
            addInjectionTarget(resource, injectionMap);
        }
        for (Injectable resource: namingResources.findEnvironments()) {
            addInjectionTarget(resource, injectionMap);
        }
        for (Injectable resource: namingResources.findMessageDestinationRefs()) {
            addInjectionTarget(resource, injectionMap);
        }
        for (Injectable resource: namingResources.findResourceEnvRefs()) {
            addInjectionTarget(resource, injectionMap);
        }
        for (Injectable resource: namingResources.findResources()) {
            addInjectionTarget(resource, injectionMap);
        }
        for (Injectable resource: namingResources.findServices()) {
            addInjectionTarget(resource, injectionMap);
        }
        return injectionMap;
    }
1026321
protected function registerBindings()
    {
        // TODO: Change to bind the implementation to the interface instead.
        $this->app->bind(CorsService::class, function () {
            return new CorsService(config(self::CONFIG_KEY));
        });

        $this->app->alias(CorsService::class, CorsServiceContract::class);
    }
1296269
public static Function<Client<HttpRequest, HttpResponse>, HttpDecodingClient> newDecorator(
            Iterable<? extends StreamDecoderFactory> decoderFactories) {
        return client -> new HttpDecodingClient(client, decoderFactories);
    }
200810
private static void injectExplicitly(Injector.Configuration config) {
		
		ExplicitInjectors.APPLICATION.inject(config);
		ExplicitInjectors.RESOURCES.inject(config);
		ExplicitInjectors.SYSTEM_SERVICES.inject(config);
		ExplicitInjectors.ICKLE_SERVICES.inject(config);
		ExplicitInjectors.POJOS.inject(config);
	}
1129680
def geocode(self, commit=False, force=False):
        
        if self.need_geocoding() or force:
            result = get_cached(getattr(self, self.geocoded_by), provider='google')
            if result.status == 'OK':
                for attribute, components in self.required_address_components.items():
                    for component in components:
                        if not getattr(self, attribute) or force:
                            attr_val = getattr(result, component, None)
                            if attr_val:
                                setattr(self, attribute, attr_val)

            if commit:
                self.save()
604765
static void inject(SpanContext spanContext, Headers headers,
      Tracer tracer) {
    tracer.inject(spanContext, Format.Builtin.TEXT_MAP,
        new HeadersMapInjectAdapter(headers, false));
  }
1180370
function (mappingObject) {
			this.writeDebug('mapping',arguments);
			var _this = this;
			var orig_lat, orig_lng, geocodeData, origin, originPoint, page;
			if (!this.isEmptyObject(mappingObject)) {
				orig_lat = mappingObject.lat;
				orig_lng = mappingObject.lng;
				geocodeData = mappingObject.geocodeResult;
				origin = mappingObject.origin;
				page = mappingObject.page;
			}

			// Set the initial page to zero if not set
			if ( _this.settings.pagination === true ) {
				if (typeof page === 'undefined' || originalOrigin !== addressInput ) {
					page = 0;
				}
			}

			// Data request
			if (typeof origin === 'undefined' && this.settings.nameSearch === true) {
				dataRequest = _this._getData();
			}
			else {
				// Setup the origin point
				originPoint = new google.maps.LatLng(orig_lat, orig_lng);

				// If the origin hasn't changed use the existing data so we aren't making unneeded AJAX requests
				if ((typeof originalOrigin !== 'undefined') && (origin === originalOrigin) && (typeof originalData !== 'undefined')) {
					origin = originalOrigin;
					dataRequest = originalData;
				}
				else {
					// Do the data request - doing this in mapping so the lat/lng and address can be passed over and used if needed
					dataRequest = _this._getData(olat, olng, origin, geocodeData, mappingObject);
				}
			}

			// Check filters here to handle selected filtering after page reload
			if (_this.settings.taxonomyFilters !== null && _this.hasEmptyObjectVals(filters)) {
				_this.checkFilters();
			}
			/**
			 * Process the location data
			 */
			// Raw data
			if ( _this.settings.dataRaw !== null ) {
				_this.processData(mappingObject, originPoint, dataRequest, page);
			}
			// Remote data
			else {
				dataRequest.done(function (data) {
					_this.processData(mappingObject, originPoint, data, page);
				});
			}
		}
1152038
def geocode(self, address_data, **kwargs):
        
        if isinstance(address_data, list):
            return self.batch_geocode(address_data, **kwargs)

        return self.geocode_address(address_data, **kwargs)
1304506
private function registerGeoIpManager()
    {
        $this->singleton(Contracts\DriverFactory::class, function ($app) {
            return new DriverManager($app);
        });

        $this->singleton(Contracts\GeoIPDriver::class, function ($app) {
            /** @var  \Arcanedev\GeoIP\Contracts\DriverFactory  $manager */
            $manager = $app[Contracts\DriverFactory::class];

            return $manager->driver();
        });
    }
943159
function GoogleGeocoder(httpAdapter, options) {
  this.options = ['language', 'apiKey', 'clientId', 'region', 'excludePartialMatches', 'channel'];

  GoogleGeocoder.super_.call(this, httpAdapter, options);

  if (this.options.clientId && !this.options.apiKey) {
    throw new Error('You must specify a apiKey (privateKey)');
  }

  if (this.options.apiKey && !httpAdapter.supportsHttps()) {
    throw new Error('You must use https http adapter');
  }
}