Set character to prefix negative values.
15444
public MonetaryFormat negativeSign(char negativeSign) {
        checkArgument(!Character.isDigit(negativeSign));
        checkArgument(negativeSign > 0);
        if (negativeSign == this.negativeSign)
            return this;
        else
            return new MonetaryFormat(negativeSign, positiveSign, zeroDigit, decimalMark, minDecimals, decimalGroups,
                    shift, roundingMode, codes, codeSeparator, codePrefixed);
    }
1363920
public static void negative(Double value) {
		if(!validation) return;
		Validate.notNull(value);
		if(value >= 0.0)
			throw new ParameterException(ErrorCode.NOTNEGATIVE);
	}
375832
def trim_common_prefixes(strs, min_len=0):
    """"""

    trimmed = 0

    if len(strs) > 1:
        s1 = min(strs)
        s2 = max(strs)

        for i in range(len(s1) - min_len):
            if s1[i] != s2[i]:
                break
            trimmed = i + 1

    if trimmed > 0:
        strs = [s[trimmed:] for s in strs]

    return trimmed, strs
750314
def str2bool(value):
    """"""
    if value.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    if value.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    if value.lower() in ('d', 'default', ''):
        return None
    raise argparse.ArgumentTypeError('Expected: (Y)es/(T)rue/(N)o/(F)alse/(D)efault')
634838
def _naturalize(string):
    """"""
    splits = re.split("([0-9]+)", string)
    return [int(text) if text.isdigit() else text.lower() for text in splits]
293346
def p_optional_value(t):
    """"""
    # return value or None.
    t[0] = t[1]
    # Note this must be unsigned
    value = t[0]
    if value is None or value[0].isdigit():
        return
    msg = ''
    if value[0] == '-':
        msg = "Can't use negative index %s" % value
    elif value not in name_dict:
        msg = "Can't derefence index %s" % value
    else:
        data = name_dict[value]
        if data.type != 'const':
            msg = "Can't use non-constant %s %s as index" % (data.type, value)
        elif not data.positive:
            msg = "Can't use negative index %s" % value
    if msg:
        global error_occurred
        error_occurred = True
        print(u"ERROR - {0:s} near line {1:d}".format(msg, t.lineno(1)))
889036
def fix_e713(self, result):
        """"""
        (line_index, _, target) = get_index_offset_contents(result,
                                                            self.source)

        match = COMPARE_NEGATIVE_REGEX.search(target)
        if match:
            if match.group(3) == 'in':
                pos_start = match.start(1)
                self.source[line_index] = '{0}{1} {2} {3} {4}'.format(
                    target[:pos_start], match.group(2), match.group(1),
                    match.group(3), target[match.end():])
691957
def _fixStringValue(s, p):
    """"""

    # pylint: disable=too-many-branches
    s = s[1:-1]
    rv = ''
    esc = False
    i = -1
    while i < len(s) - 1:
        i += 1
        ch = s[i]
        if ch == '\\' and not esc:
            esc = True
            continue
        if not esc:
            rv += ch
            continue

        if ch == '"':
            rv += '"'
        elif ch == 'n':
            rv += '\n'
        elif ch == 't':
            rv += '\t'
        elif ch == 'b':
            rv += '\b'
        elif ch == 'f':
            rv += '\f'
        elif ch == 'r':
            rv += '\r'
        elif ch == '\\':
            rv += '\\'
        elif ch in ['x', 'X']:
            hexc = 0
            j = 0
            i += 1
            while j < 4:
                c = s[i + j]
                c = c.upper()
                if not c.isdigit() and c not in 'ABCDEF':
                    break
                hexc <<= 4
                if c.isdigit():
                    hexc |= ord(c) - ord('0')
                else:
                    hexc |= ord(c) - ord('A') + 0XA
                j += 1
            if j == 0:
                # DSP0004 requires 1..4 hex chars - we have 0
                raise MOFParseError(
                    parser_token=p,
                    msg="Unicode escape sequence (e.g. '\\x12AB') requires "
                        "at least one hex character")
            rv += six.unichr(hexc)
            i += j - 1

        esc = False

    return rv
650774
def strip_prefix(string, prefix, regex=False):
    """"""
    if not isinstance(string, six.string_types) or not isinstance(prefix, six.string_types):
        msg = 'Arguments to strip_prefix must be string types. Are: {s}, {p}'\
              .format(s=type(string), p=type(prefix))
        raise TypeError(msg)

    if not regex:
        prefix = re.escape(prefix)
    if not prefix.startswith('^'):
        prefix = '^({s})'.format(s=prefix)
    return _strip(string, prefix)
1076477
def lt(self, value):
        
        self.op = '<'
        self.negate_op = '>='
        self.value = self._value(value)
        return self
971694
private String noprefix(String name, String... prefix) {
        for (int i = 0; i < prefix.length; i++) {
            if (name.startsWith(prefix[i])) {
                name = name.replaceAll(prefix[i], "");
            }
        }
        return name;
    }
138139
public void setPrefix(String prefix)
  {
    _prefix = prefix;
    
    if (prefix != null)
      _pathPrefix = prefix.replace('.', '/');
  }
652852
def _number_negative_start_handler(c, ctx):
    
    assert c == _MINUS
    assert len(ctx.value) == 0
    ctx.set_ion_type(IonType.INT)
    ctx.value.append(c)
    c, _ = yield
    yield ctx.immediate_transition(_NEGATIVE_TABLE[c](c, ctx))
61397
def regenerate_prefixes(self, *args):
        """"""
        nick = self.controller.client.user.nick
        self.prefixes = set([
            nick + ": ",
            nick + ", ",
            nick + " - ",
        ])
        # Include lower-case versions as well, but not caps
        self.prefixes.update([p.lower() for p in self.prefixes])
        if self.sigil:
            self.prefixes.add(self.sigil)
1096777
def prefix(rowPrefix):
        """"""
        fp = Range.followingPrefix(rowPrefix)
        return Range(srow=rowPrefix, sinclude=True, erow=fp, einclude=False)
1136928
def _handle_negatives(numbers):
    
    min_number = min(filter(lambda x : type(x)==int,numbers))
    if min_number < 0:
        return [x+abs(min_number) if type(x)==int else x for x in numbers]
    else:
        return numbers
132004
public T negative() {
        T A = copy();
        ops.changeSign(A.mat);
        return A;
    }