-----------------------
 <state> maximum-prefix <limit> <threshold> <opt>

 <threshold> : optional
 <opt> : optional = [ restart <interval> | warning-only ]
6466
def max_prefix_get
      str = config_get('bgp_neighbor_af', 'max_prefix', @get_args)
      return nil if str.nil?

      regexp = Regexp.new('maximum-prefix (?<limit>\d+)' \
                          ' *(?<threshold>\d+)?' \
                          ' *(?<opt>restart|warning-only)?' \
                          ' *(?<interval>\d+)?')
      regexp.match(str)
    end
1135616
def start(self, max):
        
        try:
            self.widget.max = max
            display(self.widget)
        except:
            pass
1364894
private void signalNotFull() {
        final ReentrantLock putLock = this.putLock;
        putLock.lock();
        try {
            notFull.signal();
        } finally {
            putLock.unlock();
        }
    }
653835
def _limit_call_handler(self):
        
        # acquire a lock on our threading.Lock() object
        with self.limit_lock:
            # if we have no configured limit, exit.  the lock releases based on scope
            if self.limit_per_min <= 0:
                return

            now = time.time()
            # self.limits is a list of query times + 60 seconds.  In essence it is a list of times
            # that queries time out of the 60 second query window.

            # this check expires any limits that have passed
            self.limits = [l for l in self.limits if l > now]
            # and we tack on the current query
            self.limits.append(now + 60)

            # if we have more than our limit of queries (and remember, we call this before we actually
            # execute a query) we sleep until the oldest query on the list (element 0 because we append
            # new queries) times out.  We don't worry about cleanup because next time this routine runs
            # it will clean itself up.
            if len(self.limits) >= self.limit_per_min:
                time.sleep(self.limits[0] - now)
1125707
public static final void resetMaximumInputSize() {
    String maxInputSizeStr = System.getProperty(Protocol.MAX_INPUT_SIZE_KEY);

    if (maxInputSizeStr == null) {
      maxInputSize = Protocol.FALLBACK_MAX_INPUT_SIZE;
    } else {
      maxInputSize = Integer.parseInt(maxInputSizeStr);
    }
  }
504763
public void setMaxActiveSipApplicationSessions(int max) {
		int oldMaxActiveSipApplicationSessions = this.sipManagerDelegate.getMaxActiveSipApplicationSessions();
		this.sipManagerDelegate.setMaxActiveSipApplicationSessions(max);
		support
				.firePropertyChange(
						"maxActiveSipApplicationSessions",
						Integer.valueOf(oldMaxActiveSipApplicationSessions),
						Integer.valueOf(
								this.sipManagerDelegate.getMaxActiveSipApplicationSessions()));
	}
997829
function maxDurationMsPerTimelinePx(earliestTimestamp) {
  const durationMsLowerBound = minDurationMsPerTimelinePx();
  const durationMsUpperBound = moment.duration(3, 'days').asMilliseconds();
  const durationMs = availableTimelineDurationMs(earliestTimestamp) / 400.0;
  return clamp(durationMs, durationMsLowerBound, durationMsUpperBound);
}
178762
def limit(self, limit):
        
        if self._limit != limit:
            self.dirty = True
            self._limit = limit
        return self
367688
private void applyVerticalLimit()
    {
        if (mover.getY() < limitBottom && limitBottom != Integer.MIN_VALUE)
        {
            mover.teleportY(limitBottom);
        }
        else if (mover.getY() > limitTop && limitTop != Integer.MAX_VALUE)
        {
            mover.teleportY(limitTop);
        }
    }
968447
private void setLimits(Surface surface, int gridH, int gridV)
    {
        Check.notNull(surface);

        if (gridH == 0)
        {
            limitRight = 0;
        }
        else
        {
            limitRight = Math.max(0, surface.getWidth() - UtilMath.getRounded(width, gridH));
        }
        if (gridV == 0)
        {
            limitTop = 0;
        }
        else
        {
            limitTop = Math.max(0, surface.getHeight() - UtilMath.getRounded(height, gridV));
        }
        limitLeft = 0;
        limitBottom = 0;

        moveLocation(1.0, 0.0, 0.0);
    }
131706
def max_end(self):
        
        return max(len(self.input_string), self._max_end) if self.input_string else self._max_end
665174
@GuardedBy("evictionLock")
  void setMaximumSize(long maximum) {
    requireArgument(maximum >= 0);
    if (maximum == maximum()) {
      return;
    }

    long max = Math.min(maximum, MAXIMUM_CAPACITY);
    long window = max - (long) (PERCENT_MAIN * max);
    long mainProtected = (long) (PERCENT_MAIN_PROTECTED * (max - window));

    setMaximum(max);
    setWindowMaximum(window);
    setMainProtectedMaximum(mainProtected);

    setHitsInSample(0);
    setMissesInSample(0);
    setStepSize(-HILL_CLIMBER_STEP_PERCENT * max);

    if ((frequencySketch() != null) && !isWeighted() && (weightedSize() >= (max >>> 1))) {
      // Lazily initialize when close to the maximum size
      frequencySketch().ensureCapacity(max);
    }
  }
1242991
function Limiter (options) {
  options = options || {}

  this.prefix = options.prefix || 'LIMIT'
  this.max = options.max >= 1 ? Math.floor(options.max) : 2500
  this.duration = options.duration >= 100 ? Math.floor(options.duration) : 3600000
}
982251
def extent(self) -> Optional[Interval]:
        
        if not self.intervals:
            return None
        return Interval(self.start_datetime(), self.end_datetime())
612247
public static Timeout max(Timeout... timeouts)
	{
		Timeout max = null;

		for (Timeout timeout : timeouts)
		{
			if (timeout != null)
				if (max == null || max.getMilliseconds() < timeout.getMilliseconds())
					max = timeout;
		}

		if (max != null)
			return max;
		else
			throw new IllegalArgumentException("Must specify at least one non-null timeout!");
	}
548278
static long calcInterval(int segments, int start, int limit) {

        long range = limit - start;

        if (range < 0) {
            return 0;
        }

        int partSegment = (range % segments) == 0 ? 0
                                                  : 1;

        return (range / segments) + partSegment;
    }
50347
function Interval(sourceString, startIdx, endIdx) {
  this.sourceString = sourceString;
  this.startIdx = startIdx;
  this.endIdx = endIdx;
}