Ensures :attr:`subject` has length zero.
509432
def is_empty(self):
        
        if len(self._subject) > 0:
            raise self._error_factory(_format("Expected {} to be empty", self._subject))
        return ChainInspector(self._subject)
454209
private static void assertArrayLength(final int length, final JBBPNamedFieldInfo name) {
    if (length < 0) {
      throw new JBBPParsingException("Detected negative calculated array length for field '" + (name == null ? "<NO NAME>" : name.getFieldPath()) + "\' [" + JBBPUtils.int2msg(length) + ']');
    }
  }
121821
def Set(self,
          subject,
          attribute,
          value,
          timestamp=None,
          replace=True,
          sync=True):
    """"""
    subject = utils.SmartUnicode(subject)

    _ = sync
    attribute = utils.SmartUnicode(attribute)

    if timestamp is None or timestamp == self.NEWEST_TIMESTAMP:
      timestamp = time.time() * 1000000

    if subject not in self.subjects:
      self.subjects[subject] = {}

    if replace or attribute not in self.subjects[subject]:
      self.subjects[subject][attribute] = []

    encoded_value = self._value_converter.Encode(attribute, value)
    self.subjects[subject][attribute].append([encoded_value, int(timestamp)])
    self.subjects[subject][attribute].sort(key=lambda x: x[1])
1209802
def _ensure_length(encoded, min_length, alphabet, guards, values_hash):
    """"""
    len_guards = len(guards)
    guard_index = (values_hash + ord(encoded[0])) % len_guards
    encoded = guards[guard_index] + encoded

    if len(encoded) < min_length:
        guard_index = (values_hash + ord(encoded[2])) % len_guards
        encoded += guards[guard_index]

    split_at = len(alphabet) // 2
    while len(encoded) < min_length:
        alphabet = _reorder(alphabet, alphabet)
        encoded = alphabet[split_at:] + encoded + alphabet[:split_at]
        excess = len(encoded) - min_length
        if excess > 0:
            from_index = excess // 2
            encoded = encoded[from_index:from_index+min_length]

    return encoded
1067959
def _handle_empty(self, user, response):
        """"""
        if len(response.keys()) == 0:
            response = self.show_user(user)

            # And sometimes show_user can return nothing. Ask again...
            if len(response) == 0:
                response = self.show_user(user)
        return response
80268
def is_negative(self):
        
        self._run(unittest_case.assertLess, (self._subject, 0))
        return ChainInspector(self._subject)
661029
def _validate_minlength(self, min_length, field, value):
        
        if isinstance(value, Iterable) and len(value) < min_length:
            self._error(field, errors.MIN_LENGTH, len(value))
1362260
def assert_is_substring(substring, subject, message=None, extra=None):
    """"""
    assert (
        (subject is not None)
        and (substring is not None)
        and (subject.find(substring) != -1)
    ), _assert_fail_message(message, substring, subject, "is not in", extra)
717041
function( tmp ) {
      var _length = tmp.val.length;
      return _length === 0 || _length >= tmp.arg || messages.minLength.replace( '{count}', tmp.arg );
    }
773774
def zero(self):
        """"""
        tmp = self.element()
        self.lincomb(0, tmp, 0, tmp, tmp)
        return tmp
240445
def check_length(value, length):
    
    _length = len(value)
    if _length != length:
        raise ValueError("length must be %d, not %d" % \
                         (length, _length))
469850
def empty(val):
    
    if val == None:
        return True

    if isinstance(val,str) and len(val) > 0:
        return False

    return True
362037
def get_subject(self):
        """"""
        level = logging.getLevelName(self.flush_level)
        message = self.current_buffer[0].split("\n")[0]
        message = message.split(']')[-1]
        return '{0} : {1}{2}'.format(level, SOURCE, message)
751764
def _check_len(a, b):
    
    if len(a) != len(b):
        msg = "Length must be {}. Got {}".format(len(a), len(b))
        raise ValueError(msg)
309983
private boolean isEmptyAttribute(Attribute a) {
		try {
			return (a == null || a.size() == 0 || a.get() == null);
		}
		catch (NamingException e) {
			return true;
		}
	}
1358299
def get_length(topics, yaml_info):
    '''
    
    '''
    total = 0
    info = yaml_info['topics']
    for topic in topics:
        for t in info:
            if t['topic'] == topic:
                total = total + t['messages']
                break
    return total
83497
def calculate_size(name, value):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_data(value)
    return data_size