/*
get_location

@description:
@since: 3.6
@created: 26/01/13
353663
function get_location( $location, $post_id )
	{
		// loaded by PHP already?
		if( !empty($location) )
		{
			return $location;	
		}
		
		
		// vars
		$groups = array();
		$group_no = 0;
		
		
		// get all rules
	 	$rules = get_post_meta($post_id, 'rule', false);
	 	
	 	
	 	if( is_array($rules) )
	 	{
		 	foreach( $rules as $rule )
		 	{
		 		// if field group was duplicated, it may now be a serialized string!
		 		$rule = maybe_unserialize($rule);
		 		
		 		
			 	// does this rule have a group?
			 	// + groups were added in 4.0.4
			 	if( !isset($rule['group_no']) )
			 	{
				 	$rule['group_no'] = $group_no;
				 	
				 	// sperate groups?
				 	if( get_post_meta($post_id, 'allorany', true) == 'any' )
				 	{
					 	$group_no++;
				 	}
			 	}
			 	
			 	
			 	// add to group
			 	$groups[ $rule['group_no'] ][ $rule['order_no'] ] = $rule;
			 	
			 	
			 	// sort rules
			 	ksort( $groups[ $rule['group_no'] ] );
	 	
		 	}
		 	
		 	// sort groups
			ksort( $groups );
	 	}
	 		 	
	 	
	 	// return fields
		return $groups;
	}
55149
def get_location(self):
        
        lat = None
        lon = None
        # note: always picks from first triple
        for _, _, o in self._graph.triples((None, GEO_NS.lat, None)):
            lat = float(o)
            break
        for _, _, o in self._graph.triples((None, GEO_NS.long, None)):
            lon = float(o)
            break

        return lat, lon
698107
def get_location(self, ip, detailed=False):
        
        seek = self._get_pos(ip)

        if seek > 0:
            return self._parse_location(seek, detailed=detailed)

        return False
1050966
function getSeedsAtLocation(location) {
  // load the file as JSON
  const result = require(location);

  // Ensure the output is an array
  if (Array.isArray(result)) {
    return _.forEach(result, unmarshalBuffer);
  } else {
    return [ unmarshalBuffer(result) ];
  }
}
1088480
def location
      @_location ||= begin
        if Alexa.configuration.location_permission_type == :full_address
          get_address
        elsif Alexa.configuration.location_permission_type == :country_and_postal_code
          get_address(only: :country_and_postal_code)
        end
      end
    end
421496
def get_location(dom, location):
    
    node = dom.documentElement
    for i in location:
        node = get_child(node, i)
        if not node:
            raise ValueError('Node at location %s does not exist.' % location) #TODO: line not covered
    return node
41770
def geo_location(c1, c2 = nil , c3 = nil)
      if c1.class != GeoLocationSelector
        # TODO: raise wrong number of arguments if c2 or c3 are nil
        selector = GeoLocationSelector.new
        selector.address do
          address c1
          city c2
          country c3
        end
      else
        selector = c1
      end

      soap_message = service.geo_location.get(credentials, selector.to_xml)
      add_counters(soap_message.counters)
    end
855670
def location_lookup(self, req_location):
        
        location = False
        try:
            location = self.samecodes[req_location['code']]
        except Exception:
            pass
        try:
            location = self.lookup_samecode(req_location['local'], req_location['state'])
        except Exception:
            pass
        return location
1006518
def get_location(self):
        
        if self._location:
            return succeed(self._location)
        if self.ip != 'unknown':
            self._location = NetLocation(self.ip)
        else:
            self._location = NetLocation(None)
        if not self._location.countrycode and self.ip != 'unknown':
            # see if Tor is magic and knows more...
            d = self.controller.get_info_raw('ip-to-country/' + self.ip)
            d.addCallback(self._set_country)
            d.addCallback(lambda _: self._location)
            return d
        return succeed(self._location)
712131
func (u *User) GetLocation() string {
	if u == nil || u.Location == nil {
		return ""
	}
	return *u.Location
}
62852
public static Location retrieve(String location) throws StripeException {
    return retrieve(location, (Map<String, Object>) null, (RequestOptions) null);
  }
658411
def get_location(self):
        
        image_string = self.__dict__['location']['image']
        image_ints = list(map(int, image_string.split(",")))
        return Location(*image_ints)
615265
private function loadLocation(): ?Location
    {
        if (!$this->context->has('ez_location_id')) {
            return null;
        }

        return $this->locationService->loadLocation(
            (int) $this->context->get('ez_location_id')
        );
    }
1363910
def location(key)
      location = locations.select { |l| l[:fulfillment_location] == key }.first

      return {} if location.nil?
      location
    end
213781
def position
      return @__position if defined? @__position
      return @__position = nil unless params['pos'] =~ /^([NS])(\d+)\.(\d+)\.(\d+\.\d+)([WE])(\d+)\.(\d+)\.(\d+\.\d+)$/

      raise 'Unsupported datum' if params['geo'] != 'wgs84'

      l = Jpmobile::Position.new
      l.lat = ((Regexp.last_match(1) == 'N') ? 1 : -1) * Jpmobile::Position.dms2deg(Regexp.last_match(2), Regexp.last_match(3), Regexp.last_match(4))
      l.lon = ((Regexp.last_match(5) == 'E') ? 1 : -1) * Jpmobile::Position.dms2deg(Regexp.last_match(6), Regexp.last_match(7), Regexp.last_match(8))
      l.options = params.select {|x, _| ['pos', 'geo', 'x-acr'].include?(x) }

      @__position = l
    end
806154
public function getLocation()
        {
            return isset($this->_data[self::PROFILE][self::LOCATION]) ? $this->_data[self::PROFILE][self::LOCATION] : null;
        }
266121
function allNodesAtLocation(location) {
        var nodes = [];
        exports.root.each(function each(n) {
            if (n.type === DOMNode.TYPE_ELEMENT && n.isAtLocation(location)) {
                nodes.push(n);
            }
        });
        return nodes;
    }