Set absolute limit on number of images to return, or set to None to return
    as many results as needed; default 50 posts.
488111
def limit(self, limit):
    
    params = join_params(self.parameters, {"limit": limit})

    return self.__class__(**params)
333978
def _submit_results(self):
        
        if self._cur_res_id and self._cur_values:
            # Setting DefaultResult just because it is obligatory.
            self._addRawResult(self._cur_res_id, self._cur_values)
            self._reset()
449171
def items(self, limit=0):
        """"""
        i = ItemIterator(self.iterator)
        i.limit = limit
        return i
1219538
def limit_records(records)
      offset = self.offset
      limit  = self.limit
      size   = records.size

      if offset > size - 1
        []
      elsif (limit && limit != size) || offset > 0
        records[offset, limit || size] || []
      else
        records.dup
      end
    end
217449
def limit(self, limit):
        """"""
        clone = self._clone()

        if isinstance(limit, int):
            clone._limit = limit

        return clone
51406
def _enforce_size_limit(self, capacity):
        """"""
        while len(self._cache) > capacity:
            key, value = self._cache.popitem(last=False)
            if self._on_evict is not None:
                self._on_evict(key, value)
751747
protected function validateLimit(): void
    {
        $limit = $this->getArrayValue($this->joryArray, ['lmt', 'limit']);

        // No limit set, that's ok. return.
        if ($limit === null) {
            return;
        }

        if (! is_int($limit)) {
            throw new JoryException('The limit parameter should be an integer value. (Location: '.$this->address.'limit)');
        }
    }
628211
def limit(self, limit: int) -> "QuerySet":
        
        queryset = self._clone()
        queryset._limit = limit
        return queryset
766273
public function limitResultsToPage($results = array())
    {
        $posIndexedResults = array();
        foreach ($results as $ignoredKey => $result) {
            $posIndexedResults[] = $result;
        }
        $limitedResults = array();
        $start = $this->result_offset;
        $end = $this->result_offset + $this->page_size;
        //echo 	$start.' '.	$end.'<Br>';
        for ($pos = $start; $pos < $end; ++$pos) {
            if (!$posIndexedResults[$pos]) {
                continue;
            }
            $limitedResults[] = $posIndexedResults[$pos];
        }

        return $limitedResults;
    }
512436
@Override
    public void registerLimit(final long limit) {

        if (queues.size() > 0) {
            if (unlimited.get(currentQueue())
                         .get())
                limits.get(currentQueue())
                      .set(0);

            limits.get(currentQueue())
                  .addAndGet(limit);
            unlimited.get(currentQueue())
                     .set(false);

            queues.stream()
                  .forEach(this::closeQueueIfFinishedStateless);

        }
    }
668003
def limit=(limit)

      if !limit.nil? && limit > 200
        fail ArgumentError, "invalid value for 'limit', must be smaller than or equal to 200."
      end

      if !limit.nil? && limit < 1
        fail ArgumentError, "invalid value for 'limit', must be greater than or equal to 1."
      end

      @limit = limit
    end
295016
public void resetLimits() {
        maxLength = Long.MAX_VALUE;
        timeoutMs = Long.MAX_VALUE;
        maxRateBytesPerMs = Long.MAX_VALUE;
    }
1327563
def enumerate_query_by_limit(q, limit=1000):
    
    for offset in count(0, limit):
        r = q.offset(offset).limit(limit).all()

        for row in r:
            yield row

        if len(r) < limit:
            break
623532
def set_per_page(self, entries=100):
        
        if isinstance(entries, int) and entries <= 200:
            self.per_page = int(entries)
            return self
        else:
            raise SalesKingException("PERPAGE_ONLYINT", "Please set an integer <200 for the per-page limit");
644190
def set_max_clients(limit):
    
    global _dirty, _max_clients

    LOGGER.debug('Setting maximum client limit to %i', limit)
    _dirty = True
    _max_clients = limit
1059195
def limit(self, value):
        
        self._query = self._query.limit(value)

        return self
777412
def results(self, limit=100):
        
        limited = True if self.high_mark is not None else False
        rmax = self.high_mark - self.low_mark if limited else None
        rnum = 0

        params = self.get_params()
        params["offset"] = self.low_mark
        params["limit"] = limit

        while not limited and rmax is None or rnum < rmax:
            if limited or rmax is not None:
                rleft = rmax - rnum
                params["limit"] = rleft if rleft < limit else limit

            r = self.resource._meta.api.http_resource("GET", self.resource._meta.resource_name, params=params)
            data = self.resource._meta.api.resource_deserialize(r.text)

            if not limited:
                rmax = data["meta"]["total_count"]

            if data["meta"]["total_count"] < rmax:
                rmax = data["meta"]["total_count"]

            params["offset"] = data["meta"]["offset"] + data["meta"]["limit"]

            for item in data["objects"]:
                rnum += 1
                yield item