Helper around 'locate'
899
def find(pattern, root=os.curdir):
    ''' '''
    hits = ''
    for F in locate(pattern, root):
        hits = hits + F + '\n'
    l = hits.split('\n')
    if(not len(l[-1])): l.pop()
    if len(l) == 1 and not len(l[0]):
        return None
    else:
        return l
1281440
def find(location, kind = :file)
      location = File.join(absolute_location, location)
      File.send("#{kind}?", location) ? Pathname.new(environment, location) : nil
    end
1349346
def location(self):
        """"""
        if self._w3c:
            old_loc = self._execute(Command.GET_ELEMENT_RECT)['value']
        else:
            old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value']
        new_loc = {"x": round(old_loc['x']),
                   "y": round(old_loc['y'])}
        return new_loc
1121932
function locator(value, fromIndex) {
    var result
    var prev

    regex.lastIndex = fromIndex

    result = regex.exec(value)

    if (result) {
      result = regex.lastIndex - result[0].length
      prev = value.charCodeAt(result - 1)

      if (usernameCharacter(prev) || prev === CC_HASH || prev === CC_AT) {
        /* Find the next possible value. */
        return locator(value, regex.lastIndex)
      }

      return result
    }

    return -1
  }
759926
function _findIndex(arr, onFind) {
  let foundIndex = -1;

  util.forEach(arr, (item, index) => {
    let nextFind = true;
    if (onFind(item, index)) {
      foundIndex = index;
      nextFind = false;
    }

    return nextFind;
  });

  return foundIndex;
}
85461
def _get_location(package, location):
    """"""
    for region in package['regions']:
        if region['location']['location']['name'] == location:
            return region

    raise SoftLayer.SoftLayerError("Could not find valid location for: '%s'" % location)
1372894
function getLocation(template, loc){
  if (loc)
    return (template.sourceUrl || '') + ':' + loc.start.line + ':' + (loc.start.column + 1);
}
457372
def find_this(search, filename=MODULE_PATH):
    """"""
    if not search:
        return
    for line in open(str(filename)).readlines():
        if search.lower() in line.lower():
            line = line.split("=")[1].strip()
            if "'" in line or '"' in line or '"""' in line:
                line = line.replace("'", "").replace('"', '').replace('"""', '')
            return line
128858
@Override
    public Expression<Integer> locate(Expression<String> arg0, Expression<String> arg1)
    {
        // TODO Auto-generated method stub
        return null;
    }
1213609
function find(list, match) {
	  for (var i = 0; i < list.length; i++) {
	    if (match(list[i])) {
	      return list[i];
	    }
	  }
	  return undefined;
	}
434534
function find(source, fn) {
  glob('**', {cwd: source, dot: true}, function(err, files) {
    fn(err, files);
  });
}
793812
def find_stop(self, query, direction=""):
        
        _directions = ["inbound", "outbound", ""]
        direction = direction.lower()
        if direction == "inbound":
            stops = self.inbound_stops
        elif direction == "outbound":
            stops = self.outbound_stops
        else:
            stops = self.inbound_stops + self.outbound_stops
        
        found = []
        for stop in stops:
            q = str(query).lower()
            if q in stop.name.lower() or q in str(stop.id).lower():
                found.append(stop)
        return found
1131766
function _find( items, id ) {
        for ( var i=0; i < items.length; i++ ) {
            if (items[i].id == id) return i;
        }
    }
1151696
def myreplace(astr, thefind, thereplace):
    """"""
    alist = astr.split(thefind)
    new_s = alist.split(thereplace)
    return new_s
173831
def _manage_location(attr):
    
    return property(lambda self: getattr(self, '_%s' % attr),
                    lambda self, value: self._set_location(attr, value))
1357651
function locateCodeImport(value, fromIndex) {
  var index = value.indexOf(C_NEWLINE, fromIndex);

  if (value.charAt(index + 1) !== "<" && value.charAt(index + 2) !== "<") {
    return;
  }

  return index;
}
518621
def find(str)
      index = items.index {|i| i.index > current_row && i.name.start_with?(str)} || items.index {|i| i.name.start_with? str}
      move_cursor index if index
    end