:param find: 是否使用find模式.True为递归查找.缺省为False
        :param begin: 开始行号. 缺省为 1
173551
def read(self, template, find=False, begin=1):
        
        result = []
        self.matched = False
        for sheet in self.get_sheet():
            r = template.get_data(sheet, find=find, begin=begin)
            if r is not None: #not matched
                self.matched = True
                if self.merge:
                    self.merge.add(r)
                    result = self.merge.result
                else:
                    result.extend(r)
        return result
680259
def find_one(self, *args, **kwargs):
        
        try:
            return next(self.find(*args, **kwargs))
        except StopIteration:
            return None
224042
def _find_by_name(tree_data, name, is_dir, start_at):
    """"""
    try:
        item = tree_data[start_at]
        if item and item[2] == name and S_ISDIR(item[1]) == is_dir:
            tree_data[start_at] = None
            return item
    except IndexError:
        pass
    # END exception handling
    for index, item in enumerate(tree_data):
        if item and item[2] == name and S_ISDIR(item[1]) == is_dir:
            tree_data[index] = None
            return item
        # END if item matches
    # END for each item
    return None
740007
def find(self, path, all=False):
        
        try:
            start, _, extn = path.rsplit('.', 2)
        except ValueError:
            return []
        path = '.'.join((start, extn))
        return find(path, all=all) or []
411632
def starts_with(full, part):
    
    if len(full) < len(part):
        return False
    return full[:len(part)] == part
95026
def _starts_with(field, filter_value):
        
        valid = False
        if field.startswith(filter_value):
            valid = True
        return valid
927228
function beginsWith(haystack, needles) {
    let needle;
    for (let i = 0, u = needles.length; i < u; ++i) {
        needle = needles[i];
        if (haystack.substr(0, needle.length) === needle) {
            return true;
        }
    }
    return false;
}
942974
def start_with(prefix, beg, len)
      s = @s
      c = @cur
      if @len - c < len
        return false
      end
      word = s.unpack("U*")[c]
      if word.nil?
        return (prefix.slice(beg, len-beg) == nil)
      else
        [word].pack("U*").starts_with?(prefix.slice(beg, len-beg))
      end
    end
1363444
def find_by!(conditions = {})
      result = find_by(conditions)
      if result.nil?
        raise RecordNotFound.new("Couldn't find #{name} with '#{conditions.keys.first}'=#{conditions.values.first}")
      end
      result
    end
1066651
def find( str )
      super lambda { raise Errno::ENOENT, str } do |dir|
        path = extensions.find do |ext|
          file = dir.join str + ext
          break file if file.exist?
        end
        break path if path
      end
    end
587061
def doFind(self, WHAT={}, SORT=[], SKIP=None, MAX=None, LOP='AND', **params):
		""""""

		self._preFind(WHAT, SORT, SKIP, MAX, LOP)

		for key in params:
			self._addDBParam(key, params[key])

		try:
			return self._doAction('-find')
		except FMServerError as e:
			if e.args[0] in [401, 8]:
				return []
1321052
def _list_element_starts_with(items, needle):
        """"""
        for item in items:
            if item.startswith(needle):
                return True
        return False
1183501
def find(self, item):
		
		for i, seg in enumerate(self):
			if item in seg:
				return i
		raise ValueError(item)
634994
def find(pred, items):
	
	for i, item in enumerate(items):
		if pred(item):
			return i
1316699
public boolean find() {
    start = last;
    for (; start < tokens.size(); start++) {
      match = automaton.matches(input, start);
      if (match.getEndLocation() != -1) {
        last = match.getEndLocation();
        return true;
      }
    }
    start = -1;
    match = new Match(-1, null);
    return false;
  }
560304
def find_line_beginning(strings: Sequence[str],
                        linestart: Optional[str]) -> int:
    
    if linestart is None:  # match an empty line
        for i in range(len(strings)):
            if is_empty_string(strings[i]):
                return i
        return -1
    for i in range(len(strings)):
        if strings[i].find(linestart) == 0:
            return i
    return -1
131686
def find(self, start, end):
        """"""
        if self.intervals and not end < self.intervals[0].start:
            overlapping = [i for i in self.intervals if i.end >= start
                                                    and i.start <= end]
        else:
            overlapping = []

        if self.left and start <= self.center:
            overlapping += self.left.find(start, end)

        if self.right and end >= self.center:
            overlapping += self.right.find(start, end)

        return overlapping