return this flow to first
512237
public function goFirst(){
    //delete others unAndit nodes
    $this->deleteAllUnAuditResourceNodes();
    //get first user id, if haven't , point to me
    $userId = static::$app['auth']->user()->id;
    $resNode = $this->resourcenodes()->where('orders', '=', 0)->get()->first();
    if($resNode && $resNode->count() >0){
      $userId = $resNode->user_id;
    }
    $firstNode = new WorkFlowResourcenode();
    $firstNode->user_id = $userId;
    $firstNode->orders = 0;
    $this->resourcenodes()->save($firstNode);

    $this->node_orders = 0;
    $this->status = 'unstart';
    return $this->save();
  }
1343617
def first(self, columns=None):
        
        self._query.take(1)

        results = self.get(columns)

        if len(results) > 0:
            return results.first()

        return
905651
def filtfirst(entities, **kw):
  """"""
  ret = sorted(filtany(entities, **kw), key=lambda x:x.id())
  if not ret:
    raise ValueError('No result')
  return ret[0]
1130900
def first(self, n=1):
        
        res = self.obj[0:n]
        if len(res) is 1:
            res = res[0]
        return self._wrap(res)
1021927
def run(self):
        
        assert len(self.elements) >= 2, "In order flow, pipe needs 2 or more elements"
        in_pipe = self.elements[0]
        other_pipes = self.elements[1:-1]
        out_pipe = self.elements[-1]

        self.make_assertions(in_pipe, other_pipes, out_pipe)

        for data in in_pipe.grasp():
            write = True

            for element in other_pipes:
                if isinstance(element, elements.DataPypElement):
                    data = element.extend(data)
                elif isinstance(element, elements.FilterPypElement):
                    if not element.stay(data):
                        write = False
                        break
            if write:
                out_pipe.extract(data)
5137
def get_flow(self, name, options=None):
        
        config = self.project_config.get_flow(name)
        callbacks = self.callback_class()
        coordinator = FlowCoordinator(
            self.project_config,
            config,
            name=name,
            options=options,
            skip=None,
            callbacks=callbacks,
        )
        return coordinator
489030
public boolean moveToFirst() {
        try {
            return resultSet.first();
        } catch (SQLException e) {
            logger.error(e.getMessage(),e);
        }
        return false;
    }
73414
def first(self):
        
        self.reset()
        value = next(self, None)
        if value is None:
            raise ConstraintViolation("{} did not find any results.".format(self.mode.capitalize()))
        return value
683344
def Flow(self, flow_id):
    """"""

    return flow.FlowRef(
        client_id=self.client_id, flow_id=flow_id, context=self._context)
482269
def first(self, **kwargs):
        
        result = result = self._get(limit=1, **kwargs)
        if result:
            return result[0]
        else:
            raise self.source_class.DoesNotExist(repr(kwargs))
561901
function firstToMaybe(first) {
  if(isFunction(first)) {
    return function(x) {
      const m = first(x)

      if(!isSameType(First, m)) {
        throw new TypeError('firstToMaybe: First returning function required')
      }

      return applyTransform(m)
    }
  }

  if(isSameType(First, first)) {
    return applyTransform(first)
  }

  throw new TypeError('firstToMaybe: First or First returning function required')
}
514698
def set_flow(self, flow):
        """"""
        if not hasattr(self, "_flow"):
            self._flow = flow
        else:
            if self._flow != flow:
                raise ValueError("self._flow != flow")
719197
def first(self):
        

        if self.total and self.limit < self.total:
            return {'page[offset]': 0, 'page[limit]': self.limit}
        else:
            return None
432663
def first(self):
        
        if self.mode == 'spark':
            return self.values.tordd().values().first()

        if self.mode == 'local':
            return self.values.first
500035
def first(self):
        
        if self.mode == 'local':
            return self.values[0]

        if self.mode == 'spark':
            return self.values.first().toarray()
809527
def clone(self):
        ""
        return self.__class__(FlowField(self.size, self.flow.flow.clone()), scale=False, y_first=False)
1028120
function Flow(flowControlId) {
  Duplex.call(this, { objectMode: true });

  this._window = this._initialWindow = INITIAL_WINDOW_SIZE;
  this._flowControlId = flowControlId;
  this._queue = [];
  this._ended = false;
  this._received = 0;
  this._blocked = false;
}