check if a position change event exceeds the limits
@param {?} positionChange - position change event data
@return {?} LimitException0
482380
function (positionChange) {
                var _this = this;
                /** @type {?} */
                var pointLimits = this.limitDirections.filter(function (direction) {
                    return !positionChange.roles.includes(direction);
                });
                /** @type {?} */
                var limitException = {
                    exceeds: false,
                    resetCoefficients: {
                        x: 0,
                        y: 0
                    },
                    resetCoordinates: {
                        x: positionChange.x,
                        y: positionChange.y
                    }
                };
                // limit directions are the opposite sides of the point's roles
                pointLimits.forEach(function (direction) {
                    /** @type {?} */
                    var directionAxis = _this.getDirectionAxis(direction);
                    if (direction === 'top' || direction === 'left') {
                        if (positionChange[directionAxis] < _this._limits[direction]) {
                            limitException.resetCoefficients[directionAxis] = 1;
                            limitException.resetCoordinates[directionAxis] = _this._limits[direction];
                        }
                    }
                    else if (direction === 'right' || direction === 'bottom') {
                        if (positionChange[directionAxis] > _this._limits[direction]) {
                            limitException.resetCoefficients[directionAxis] = -1;
                            limitException.resetCoordinates[directionAxis] = _this._limits[direction];
                        }
                    }
                });
                if (limitException.resetCoefficients.x !== 0 || limitException.resetCoefficients.y !== 0) {
                    limitException.exceeds = true;
                }
                return limitException;
            }
1045603
function checkInfiniteBounds() {
    if (self.isLoading) return;
    var maxScroll = {};

    if (self.jsScrolling) {
      maxScroll = self.getJSMaxScroll();
      var scrollValues = self.scrollView.getValues();
      if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||
        (maxScroll.top !== -1 && scrollValues.top >= maxScroll.top)) {
        onInfinite();
      }
    } else {
      maxScroll = self.getNativeMaxScroll();
      if ((
        maxScroll.left !== -1 &&
        self.scrollEl.scrollLeft >= maxScroll.left - self.scrollEl.clientWidth
        ) || (
        maxScroll.top !== -1 &&
        self.scrollEl.scrollTop >= maxScroll.top - self.scrollEl.clientHeight
        )) {
        onInfinite();
      }
    }
  }
341668
function limit() {
  const args = Array.from(arguments);
  const onChange = get(args, isFunction, noop);
  const error = new Error('Too Many Requests');
  error.status = 429;
  const options = Object.assign({
    err: error,
    mid: 100,
    high: 500,
  }, get(args, isObject));
  debug('limit options:', options);
  const mid = parseInt(options.mid, 10);
  const high = parseInt(options.high, 10);
  if (isNaN(mid) || isNaN((high))) {
    throw new Error('mid and high must be a number');
  }
  if (mid <= 0 || high <= 0) {
    throw new Error('mid and high must gt 0');
  }
  if (mid >= high) {
    throw new Error('high must be gt mid');
  }
  let handlingReqTotal = 0;
  let status = '';
  let throwError = options.throwError;
  /* istanbul ignore else */
  if (isUndefined(throwError)) {
    throwError = true;
  }
  const pass = options.pass || noop;
  return (ctx, next) => {
    function checkStatus() {
      if (handlingReqTotal > high) {
        /* istanbul ignore else */
        if (status !== 'high') {
          status = 'high';
          onChange(status);
        }
        /* istanbul ignore else */
        if (throwError) {
          throw options.err;
        }
      } else if (handlingReqTotal > mid) {
        /* istanbul ignore else */
        if (status !== 'mid') {
          status = 'mid';
          onChange(status);
        }
      } /* istanbul ignore else */ else if (status !== 'low') {
        status = 'low';
        onChange(status);
      }
    }

    function done(err) {
      handlingReqTotal -= 1;
      checkStatus();
      if (err) {
        throw err;
      }
    }
    if (pass(ctx)) {
      return next();
    }

    handlingReqTotal += 1;
    checkStatus();
    return next().then(done, done);
  };
}
513738
function JssorSliderPositionChangeEventHandler(position, fromPosition, virtualPosition, virtualFromPosition) {
    //fires continuously while carousel sliding
    //position: current position of the carousel
    //fromPosition: previous position of the carousel
    //virtualPosition: current virtual position of the carousel
    //virtualFromPosition: previous virtual position of the carousel

    var args = [position, fromPosition, virtualPosition, virtualFromPosition];
    console.log(" args: " + args.join(","));
}
350507
function positionAfter (arr, prevChild) {
    var idx
    if (prevChild === null) {
      return 0
    } else {
      idx = findIndex(arr, prevChild)
      return (idx === -1) ? arr.length : idx + 1
    }
  }
809642
function flushOnChangesQueue() {
      try {
        if (!(--onChangesTtl)) {
          // We have hit the TTL limit so reset everything
          onChangesQueue = undefined;
          throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\n', TTL);
        }
        // We must run this hook in an apply since the $$postDigest runs outside apply
        $rootScope.$apply(function() {
          for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {
            onChangesQueue[i]();
          }
          // Reset the queue to trigger a new schedule next time there is a change
          onChangesQueue = undefined;
        });
      } finally {
        onChangesTtl++;
      }
    }
599116
private void checkRelaxed(String errorMessage) {
		if (!relaxed) {
			throw new KriptonRuntimeException(errorMessage, true, this.getLineNumber(), this.getColumnNumber(), getPositionDescription(), null);
		}
		if (error == null) {
			error = "Error: " + errorMessage;
		}
	}
214883
function _processChangeFeedWithAutoReconnect(getFeed, onFeedItem, onError, options) {
  var attempts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  var err = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
  var maxAttempts = options.maxAttempts,
      attemptDelay = options.attemptDelay;

  var logger = _getLogger(options);

  if (attempts >= maxAttempts) {
    logger.error('Attempted ' + attempts + ' times to obtain connection to changefeed without success. Giving up.', err.stack);
    return onError(err);
  } else if (attempts > 0) {
    logger.warn('Attempted ' + attempts + ' times to obtain connection to changefeed, but haven\'t yet succeeded; trying again.');
  }
  setTimeout(function () {
    _processChangeFeed(getFeed, onFeedItem, onError, options, attempts);
  }, attempts * attemptDelay); // linear back-off (0s, 10s, 20s, 30s, 40s ...)
}
344372
@Override
    public synchronized void onChange() {
        currBoundingBox = null;
        if (isClustering)
            return;
        // Log.e(getClass().getSimpleName(), "Position: "
        // + mapView.getModel().mapViewPosition.getCenter().toString()
        // + "ZoomLavel: " +
        // mapView.getModel().mapViewPosition.getZoomLevel());
        if (oldZoolLevel != mapView.getModel().mapViewPosition.getZoomLevel()) {
            // react on zoom changes
            // Log.d(TAG, "zooming...");
            oldZoolLevel = mapView.getModel().mapViewPosition.getZoomLevel();
            resetViewport(false);
        } else {
            // react on position changes
            IMapViewPosition mapViewPosition = mapView.getModel().mapViewPosition;

            Point posOld = mapView.getMapViewProjection().toPixels(oldCenterLatLong);
            Point posNew = mapView.getMapViewProjection().toPixels(mapViewPosition.getCenter());
            if (posOld != null && posOld.distance(posNew) > GRIDSIZE / 2) {
                // Log.d(TAG, "moving...");
                oldCenterLatLong = mapViewPosition.getCenter();
                resetViewport(true);
            }
        }
    }
566611
function findChangedIndex(prevValue, newValue) {
  var i = 0,
      j = 0;
  var prevLength = prevValue.length;
  var newLength = newValue.length;

  while (prevValue[i] === newValue[i] && i < prevLength) {
    i++;
  } //check what has been changed from last


  while (prevValue[prevLength - 1 - j] === newValue[newLength - 1 - j] && newLength - j > i && prevLength - j > i) {
    j++;
  }

  return {
    start: i,
    end: prevLength - j
  };
}
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);
        }
    }
143610
private void validatePendingChanges(ChangesItem changesItem) throws ExceededQuotaLimitException
   {
      long delta = changesItem.getWorkspaceChangedSize() + changesLog.getWorkspaceChangedSize();
      if (delta > 0)
      {
         validatePendingWorkspaceChanges(delta);
         validatePendingRepositoryChanges(delta);
         validatePendingGlobalChanges(delta);
      }

      validatePendingNodesChanges(changesItem.getAllNodesCalculatedChangedSize());
   }
550271
public void checkLimit(int len) {
        if(cursor == -1) {
            cursor = buffer.start;
            lineptr = buffer.start;
            linectptr = buffer.start;
            marker = buffer.start;
        }
        limit = buffer.start + len;
    }
1144759
function updateLimit() {
    var newValue = $rootScope.assBroadcastScrollPosition;
    if ( newValue >= 0 && $scope.includes.length < allIncludes.length ) {
      // Limit
      $scope.limit += 1;
      $scope.includes = _.first(allIncludes, $scope.limit);
      $scope.isNotFullyDisplayed = $scope.includes.length < allIncludes.length;
    }
  }
590064
function watchPrefsForChanges() {
        prefs.prefsObject.on("change", function (e, data) {
            if (data.ids.indexOf("enabled") > -1) {
                // Check if enabled state mismatches whether code-folding is actually initialized (can't assume
                // since preference change events can occur when the value hasn't really changed)
                var isEnabled = prefs.getSetting("enabled");
                if (isEnabled && !_isInitialized) {
                    init();
                } else if (!isEnabled && _isInitialized) {
                    deinit();
                }
            }
        });
    }
1172519
private void parseHeaderChangeLimit(Map<Object, Object> props) {
        Object value = props.get(HttpConfigConstants.PROPNAME_HEADER_CHANGE_LIMIT);
        if (null != value) {
            try {
                this.headerChangeLimit = convertInteger(value);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: header change limit is " + getHeaderChangeLimit());
                }
            } catch (NumberFormatException nfe) {
                FFDCFilter.processException(nfe, getClass().getName() + ".parseHeaderChangeLimit", "1");
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: Invalid header change count of " + value);
                }
            }
        }
    }
781200
function somethingChanged() {
                // don't fire events if the editor is readOnly as they are false detections
                if (editor.readOnly)
                    return;

                if (timer)
                    return;

                timer = setTimeout(function () {
                    timer = 0;
                    editor.fire('change');
                }, editor.config.minimumChangeMilliseconds || 100);
            }