Gets multiplier based on whether the value is in past or future.
@param {object} config
@param {operator_keyword} config.operator_keyword
@param {post_keyword} config.post_keyword
@return {number}
339878
function getMultiplier(_ref2) {
  var operator_keyword = _ref2.operator_keyword,
      post_keyword = _ref2.post_keyword;
  return operator_keyword === '-' || post_keyword === 'ago' ? -1 : 1;
}
1310270
public static CounterValue newCounterValue(long currentValue, CounterConfiguration configuration) {
      return configuration.type() == CounterType.BOUNDED_STRONG ?
             newCounterValue(currentValue, configuration.lowerBound(), configuration.upperBound()) :
             newCounterValue(currentValue);
   }
991943
static function Configlist_return()
    {
        $old = self::$current;
        self::$current = 0;
        self::$currentend = &self::$current;
        return $old;
    }
945781
function get(n = 200) {
    if (!isPositiveInt(n)) return '0'; // return 0 if a valid value was not passed
    if (n === 0) return '3'; // skip calculations

    let p16 = new Decimal(1);
    let pi = new Decimal(0);

    // Check if pi value is already cached
    const cachedPI = cachePI.get('cachedPI');
    if (cachedPI) {
        pi = cachedPI; // set the value from cache
    } else {
        // Check the precision needed
        const precision = Decimal.config({}).precision;
        const one = new Decimal(1);
        const two = new Decimal(2);
        const four = new Decimal(4);
        let k8 = new Decimal(0);

        for (let k = new Decimal(0); k.lte(precision); k = k.plus(one)) {
            const f = four
                .div(k8.plus(1))
                .minus(two.div(k8.plus(4)))
                .minus(one.div(k8.plus(5)))
                .minus(one.div(k8.plus(6)));

            pi = pi.plus(p16.times(f));
            p16 = p16.div(16);
            k8 = k8.plus(8);
        }

        // Cache the original pi value here
        cachePI.set('cachedPI', pi);
    }

    // validate number of places needed
    n = n > 200 ? 200 : n;
    return pi.toPrecision(n + 2).slice(0, -1);
}
1197971
function makeMoment(config) {
        var input = config._i,
            format = config._f,
            res;

        config._locale = config._locale || moment.localeData(config._l);

        if (input === null || (format === undefined && input === '')) {
            return moment.invalid({nullInput: true});
        }

        if (typeof input === 'string') {
            config._i = input = config._locale.preparse(input);
        }

        if (moment.isMoment(input)) {
            return new Moment(input, true);
        } else if (format) {
            if (isArray(format)) {
                makeDateFromStringAndArray(config);
            } else {
                makeDateFromStringAndFormat(config);
            }
        } else {
            makeDateFromInput(config);
        }

        res = new Moment(config);
        if (res._nextDay) {
            // Adding is smart enough around DST
            res.add(1, 'd');
            res._nextDay = undefined;
        }

        return res;
    }
42920
function parseRetryAfter(retryAfter) {
    // Only parse once
    if (typeof retryAfter === 'number') {
        return retryAfter;
    } else if (isNaN(retryAfter)) {
      return Math.ceil((new Date(retryAfter).getTime() / 1000) - Date.now() / 1000);
    } else {
      return parseInt(retryAfter, 10); 
    }
}
1157146
function integer(token, addTokenToMatch, getNextToken) {
    if (calc(token, addTokenToMatch, getNextToken)) {
        return true;
    }

    if (token === null) {
        return false;
    }

    var numberEnd = consumeNumber(token.value, false);
    if (numberEnd !== token.value.length) {
        return false;
    }

    addTokenToMatch();
    return true;
}
926658
function(config){
   Statement.apply( this, arguments ); // Call the Statement (super) contructor

     if (!config) {
            config = {};
     }
    // We can have a serialized version (with trailing ) or a programmatically config, easier without _
    this._verb = config._verb || config.verb || Statement.VERB_MEASURE;
    this._label = config._label || config.label || null;
    this._metadata = config._metadata || config.metadata || {};
    this._params = config._params || config.params || {};

    if (config.when || config._when)
        this._when = config.when || config._when;
     this.get_token();

    if (!this._resultvalues || (this._resultvalues === "undefined") )
        this._resultvalues = {};
    
    return this;// Chaining
}
67124
public int getAndIncrement (K key, int defaultValue, int increment) {
		int hashCode = key.hashCode();
		int index = hashCode & mask;
		if (!key.equals(keyTable[index])) {
			index = hash2(hashCode);
			if (!key.equals(keyTable[index])) {
				index = hash3(hashCode);
				if (!key.equals(keyTable[index])) return getAndIncrementStash(key, defaultValue, increment);
			}
		}
		int value = valueTable[index];
		valueTable[index] = value + increment;
		return value;
	}
1321609
function checkCache (config, pattern) {
	if (!useCache(config)) {
		return RESPONSE_UNKNOWN;
	}

	const valueRetrieved = kvGet(config, pattern);
	if (valueRetrieved === RESPONSE_UNKNOWN) {
		return RESPONSE_UNKNOWN;
	}
	/* Check if the cache entry has expired. */
	const lastValidDate = new Date(valueRetrieved.validUntil);
	if (lastValidDate <= Date.now()) {
		/* The cache entry has expired. */
		return RESPONSE_UNKNOWN;
	}
	return valueRetrieved.response;
}
475025
function op2(value, priority) {
	if (value === MULTIPLY) {
		priority += 1;
	} else if (value === DIVIDE || value === INT_DIVIDE) {
		priority += 2;
	}

	return new Token(OP2, value, priority);
}
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
  };
}
1107743
function (str, token) {
            var total = 0, i;
            while ((i = str.indexOf(token, i) + 1)) {
                total++;
            }
            return total;
        }
1136056
function krillPrimEval(pred)
{
	var key, ii;

	key = krillPrimGetKey(pred);

	switch (key) {
	case 'and':
		for (ii = 0; ii < pred['and'].length; ii++) {
			if (!krillPrimEval(pred['and'][ii]))
				return (false);
		}

		return (true);

	case 'or':
		for (ii = 0; ii < pred['or'].length; ii++) {
			if (krillPrimEval(pred['or'][ii]))
				return (true);
		}

		return (false);

	case 'lt':
	case 'le':
	case 'gt':
	case 'ge':
		mod_assert.ok(typeof (pred[key][0]) == 'number');
		mod_assert.ok(typeof (pred[key][1]) == 'number');
		/*jsl:fallthru*/
	default:
		mod_assert.ok(key in krillOps);
		mod_assert.ok(pred[key].length == 2);
		break;
	}

	return (krillOps[key].eval(pred[key][0], pred[key][1]));
}
1116406
function getDefaultValue (rule, data) {
  const { category: ruleCategory } = rule.meta.docs
  const currentCategory = getEslintConfigName(data.eslint)

  if (!currentCategory || ruleCategory === undefined) return RULE_SETTING_OFF

  return CATEGORIES.indexOf(ruleCategory) <= CATEGORIES.indexOf(currentCategory.split('/')[1])
    ? RULE_SETTING_ERROR
    : RULE_SETTING_OFF
}
67786
function _counter() {
    var counter = this.single.counter;
    var toUpdate = {};
    toUpdate[counter.column] = this.client.raw(this.formatter.wrap(counter.column) + ' ' + (counter.symbol || '+') + ' ' + counter.amount);
    this.single.update = toUpdate;
    return this.update();
  }
1089147
function(namespace, config) {
        if ( typeof(config) == "undefined" )
            var config = self.getSync(app);

        if (config != null) {
            var split = namespace.split('.'), k=0;
            while (k<split.length) {
                config = config[split[k++]]
            }
            return config
        } else {
            return null
        }
    }