Get the first occurence of this parameter.
169016
public static String getParam(HttpServletRequest req, String strParam)
    {
        return BaseHttpTask.getParam(req, strParam, Constants.BLANK);
    }
1029782
def first_seen(self, first_seen):
        """"""
        self._group_data['firstSeen'] = self._utils.format_datetime(
            first_seen, date_format='%Y-%m-%dT%H:%M:%SZ'
        )
871342
def first(self, x):
        """"""

        def _find(x):
            try:
                return self.all.index(str(x))
            except ValueError:
                return None

        if _is_collection(x):
            for item in x:
                found = _find(item)
                if found is not None:
                    return found
            return None
        else:
            return _find(x)
1168629
public E getFirst() {
        final Node<E> f = first;
        if (f == null)
            throw new NoSuchElementException();
        return f.item;
    }
1057281
def get(self, term, default=None):
        """"""
        v =  self.find_first(term)

        if not v:
            return default
        else:
            return v
101454
public Optional<T> first() {
    Iterator<T> itr = iterator();
    return itr.hasNext() ? Optional.of(itr.next()) : Optional.<T>absent();
  }
636186
def one(self):
        
        first = self.first()
        second = next(self, None)
        if second is not None:
            raise ConstraintViolation("{} found more than one result.".format(self.mode.capitalize()))
        return first
964285
def first(self):
        """"""
        self.open()
        seq = SeqIO.parse(self.handle, self.format).next()
        self.close()
        return seq
1114960
public function first() {
		$this->limit(1);
		$result = $this->find();
		return empty($result) ? null : $result[0];
	}
507855
public Record findFirst(String sql, Object... paras) {
		List<Record> result = find(sql, paras);
		return result.size() > 0 ? result.get(0) : null;
	}
1006854
def first(self):
        
        if self.mode == 'local':
            return self.values[tuple(zeros(len(self.baseaxes))) + (slice(None, None),)]

        if self.mode == 'spark':
            return self.values.first().toarray()
816111
public function getFirst()
    {
        if (0 === count($this->data)) {
            return null;
        }
        reset($this->data);

        return current($this->data);
    }
823687
def first(n = nil)
      occurrences = enumerate_occurrences(start_time).take(n || 1)
      n.nil? ? occurrences.first : occurrences
    end
15103
def get_first_key_from_value(self, value):
        

        for key, data in self.iteritems():
            if data == value:
                return key
341798
public String getFirstParam(String paramName) {
        Collection<String> values = this.params.get(paramName);
        if(values == null || values.isEmpty()) {
            return null;
        } else {
            return values.iterator().next();
        }
    }
1091477
def first_(self):
        
        try:
            val = self.df.iloc[0]
            return val
        except Exception as e:
            self.err(e, "Can not select first row")
958505
public Object getFirst(String name) {
    Object value = get(name);
    if (value instanceof Collection<?>) {
      @SuppressWarnings("unchecked")
      Collection<Object> collectionValue = (Collection<Object>) value;
      Iterator<Object> iterator = collectionValue.iterator();
      return iterator.hasNext() ? iterator.next() : null;
    }
    return value;
  }