Return the first first art url starting on the most specific for that item.
197350
def artUrl(self):
        
        art = self.firstAttr('art', 'grandparentArt')
        return self._server.url(art, includeToken=True) if art else None
486690
public function setFirst($first)
    {
        $this->_links[self::FIRST][self::HREF] = $first;
        $this->removeEmptyLinks();

        return $this;
    }
379882
def where_earliest(cls, user_id):
        
        return cls.query.filter_by(user_id=user_id)\
            .order_by(cls.created_at.asc()).first()
655671
def FindFirst(params, ctxt, scope, stream, coord, interp):
    
    global FIND_MATCHES_ITER
    FIND_MATCHES_ITER = _find_helper(params, ctxt, scope, stream, coord, interp)

    try:
        first = six.next(FIND_MATCHES_ITER)
        return first.start() + FIND_MATCHES_START_OFFSET
    except StopIteration as e:
        return -1
1099796
def getSearchUrl(self, album, artist):
    
    # build request url
    params = collections.OrderedDict()
    params["gbv"] = "2"
    params["q"] = "\"%s\" \"%s\" front cover" % (artist, album)
    if abs(self.target_size - 500) < 300:
      params["tbs"] = "isz:m"
    elif self.target_size > 800:
      params["tbs"] = "isz:l"

    return __class__.assembleUrl(__class__.BASE_URL, params)
237107
def first(*args)
      if args.any?
        if args.first.kind_of?(Integer) || (loaded? && !args.first.kind_of?(Hash))
          limit(*args).to_a
        else
          apply_finder_options(args.first).first
        end
      else
        find_first
      end
    end
1238731
public function FirstLink()
    {
        return HTTP::setGetVar(
            $this->getPaginationGetVar(),
            0,
            ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null
        );
    }
1095991
def starter(cls):
        """"""
        archive = cls.url + 'archive.html'
        data = getPageContent(archive, cls.session)
        search = compile(tagre("a", "href", r"(\d\d\d\d-\d\d.html)"))
        archivepages = search.findall(data)
        return cls.url + archivepages[-1]
1025937
public function getFirst()
    {
        $first = null;

        if (count($this->objects) > 0) {
            $first = reset($this->objects);
        }

        return $first;
    }
12160
def start_index(self):
        """"""
        paginator = self.paginator
        # Special case, return zero if no items.
        if paginator.count == 0:
            return 0
        elif self.number == 1:
            return 1
        return (
            (self.number - 2) * paginator.per_page + paginator.first_page + 1)
1107637
public long getFirst(long size)
    {
        if (first<0)
        {
            long tf=size-last;
            if (tf<0)
                tf=0;
            return tf;
        }
        return first;
    }
77358
def get_first(self, status):
        

        items = self.get_all(status)

        if items:
            return list(items.items())[0][1]

        return None
677479
def getPrevUrl(self, url, data):
        """"""
        prevUrl = None
        if self.prevSearch:
            try:
                prevUrl = self.fetchUrl(url, data, self.prevSearch)
            except ValueError as msg:
                # assume there is no previous URL, but print a warning
                out.warn(u"%s Assuming no previous comic strips exist." % msg)
            else:
                prevUrl = self.prevUrlModifier(prevUrl)
                out.debug(u"Found previous URL %s" % prevUrl)
                getHandler().comicPageLink(self.getName(), url, prevUrl)
        return prevUrl
897830
def first_image(self):
        
        # loop through image fields and grab the first non-none one
        for model_field in self._meta.fields:
            if isinstance(model_field, ImageField):
                if model_field.name is not 'thumbnail_override':
                    field_value = getattr(self, model_field.name)
                    if field_value.id is not None:
                        return field_value

        # no non-none images, return None
        return None
790190
public function getFirstPageParams()
    {
        $limit = $this->limit <= 0 ? $this->count : $this->limit;
        $first_url = $this->offset_key . '0' . $this->limit_key . $limit;

        return $first_url;
    }
454447
def getSearchUrl(self, album, artist):
    
    # build request url
    params = collections.OrderedDict()
    params["method"] = "album.getinfo"
    params["api_key"] = __class__.API_KEY
    params["album"] = album
    params["artist"] = artist

    return __class__.assembleUrl(__class__.BASE_URL, params)
1351486
def first(self, default=None, as_dict=False, as_ordereddict=False):
        """"""

        # Try to get a record, or return/raise default.
        try:
            record = self[0]
        except IndexError:
            if isexception(default):
                raise default
            return default

        # Cast and return.
        if as_dict:
            return record.as_dict()
        elif as_ordereddict:
            return record.as_dict(ordered=True)
        else:
            return record