The idea here is you can go forward but you can't go back.
482504
def acts_as_statused(klass, only: nil, except: nil)
      raise "klass does not implement acts_as_statused" unless klass.acts_as_statused?

      statuses = klass.const_get(:STATUSES)
      instance = klass.new

      only = Array(only).compact
      except = Array(except).compact

      statuses.each_with_index do |status, index|
        action = status_active_verb(status, instance)

        next if action.blank?
        next if only.present? && !only.include?(action)
        next if except.present? && except.include?(action)

        if index == 0
          can(action, klass) and next
        end

        if status == :approved && statuses.include?(:declined)
          if (position = statuses.index { |status| (status == :approved || status == :declined) }) > 0
            can(action, klass) { |obj| obj.public_send("#{statuses[position-1]}?") || obj.declined? }
            next
          end
        end

        if status == :declined && statuses.include?(:approved)
          if (position = statuses.index { |status| (status == :approved || status == :declined) }) > 0
            can(action, klass) { |obj| obj.public_send("#{statuses[position-1]}?") }
            next
          end
        end

        can(action, klass) { |obj| obj.public_send("#{statuses[index-1]}?") }
      end
    end
941388
def canGoBack(self):
        
        try:
            backId = self._navigation.index(self.currentId())-1
            if backId >= 0:
                self._navigation[backId]
            else:
                return False
        except StandardError:
            return False
        else:
            return True
838703
def no_going_back(confirmation):
    
    if not confirmation:
        confirmation = 'yes'

    prompt = ('This action cannot be undone! Type "%s" or press Enter '
              'to abort' % confirmation)

    ans = click.prompt(prompt, default='', show_default=False)
    if ans.lower() == str(confirmation):
        return True

    return False
998393
function rewind() {
        if (!$this->unmoved) {
            $this->classIterator->rewind();
            $this->ensureNotEmpty();
            $this->unmoved = true;
        }
    }
234127
def goForward(self):
        
        if self._slideshow.currentIndex() == self._slideshow.count() - 1:
            self.finished.emit()
        else:
            self._slideshow.slideInNext()
842105
def forwards(self, orm):
        ""
        for instance in orm.LocationSource.objects.all():
            try:
                instance.user = instance.points.all()[0].user
                instance.save()
            except IndexError:
                # No points for this source.
                instance.delete()
455794
private function canRetry()
    {
        if ($this->isUnlimitedAttempts()) {
            return true;
        }

        $this->attempts++;

        return $this->attempts < $this->maxAttempts;
    }
175883
def move_up(self):
        """"""
        self.at(ardrone.at.pcmd, True, 0, 0, self.speed, 0)
149999
private void advance() {
        try {
            if (tok == null)
                tok = source.token();
        } catch (LexerException e) {
            throw new IllegalStateException(e);
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
    }
838518
private ForwardStepResult<S, O, D> forwardStep(O observation, Collection<S> prevCandidates,
            Collection<S> curCandidates, Map<S, Double> message,
            Map<S, Double> emissionLogProbabilities,
            Map<Transition<S>, Double> transitionLogProbabilities,
            Map<Transition<S>,D> transitionDescriptors) {
        final ForwardStepResult<S, O, D> result = new ForwardStepResult<>(curCandidates.size());
        assert !prevCandidates.isEmpty();

        for (S curState : curCandidates) {
            double maxLogProbability = Double.NEGATIVE_INFINITY;
            S maxPrevState = null;
            for (S prevState : prevCandidates) {
                final double logProbability = message.get(prevState) + transitionLogProbability(
                        prevState, curState, transitionLogProbabilities);
                if (logProbability > maxLogProbability) {
                    maxLogProbability = logProbability;
                    maxPrevState = prevState;
                }
            }
            // Throws NullPointerException if curState is not stored in the map.
            result.newMessage.put(curState, maxLogProbability
                    + emissionLogProbabilities.get(curState));

            // Note that maxPrevState == null if there is no transition with non-zero probability.
            // In this case curState has zero probability and will not be part of the most likely
            // sequence, so we don't need an ExtendedState.
            if (maxPrevState != null) {
                final Transition<S> transition = new Transition<>(maxPrevState, curState);
                final ExtendedState<S, O, D> extendedState = new ExtendedState<>(curState,
                        lastExtendedStates.get(maxPrevState), observation,
                        transitionDescriptors.get(transition));
                result.newExtendedStates.put(curState, extendedState);
            }
        }
        return result;
    }
578368
void advance() {
    if (tc.isEntryEnabled())
      tc.entry(this,cclass, "advance");
    if (!prefixDone) {
      Pattern.Clause prefix = pattern.getPrefix();
      if (prefix == null || next >= prefix.items.length) {
        Pattern.Clause suffix = pattern.getSuffix();
        if (suffix != null && suffix != prefix) {
          // SWITCH_TO_SUFFIX
          prefixDone = true;
          next = suffix.items.length-1;
        }
        // else in one of the FINAL_ states, so do nothing
      }
      else
        // somewhere in the body of the prefix, so advance by incrementing
        next++;
    }
    else
      // somewhere in the suffix, so advance by decrementing
      next--;
    if (tc.isEntryEnabled())
      tc.exit(this,cclass, "advance");
  }
446196
function (sRoute, oData) {
			var oHistory = History.getInstance();
			var oPrevHash = oHistory.getPreviousHash();
			if (oPrevHash !== undefined) {
				window.history.go(-1);
			} else {
				var bReplace = true; // otherwise we go backwards with a forward history
				this.navTo(sRoute, oData, bReplace);
			}
		}
860266
def goBack(self):
        
        if not self.canGoBack():
            return ''
        
        self._blockStack = True
        self._index -= 1
        self.emitCurrentChanged()
        self._blockStack = False
        return self.currentUrl()
250982
private void switchToBackward() {
        assert(state == State.ITER_CHECK_FWD ||
                (state == State.ITER_IN_FCD_SEGMENT && pos == start) ||
                (state.compareTo(State.IN_NORM_ITER_AT_LIMIT) >= 0 && pos == 0));
        if(state == State.ITER_CHECK_FWD) {
            // Turn around from forward checking.
            limit = pos = iter.getIndex();
            if(pos == start) {
                state = State.ITER_CHECK_BWD;  // Check backward.
            } else {  // pos > start
                state = State.ITER_IN_FCD_SEGMENT;  // Stay in FCD segment.
            }
        } else {
            // Reached the start of the FCD segment.
            if(state == State.ITER_IN_FCD_SEGMENT) {
                // The input text segment is FCD, extend it backward.
            } else {
                // The input text segment needed to be normalized.
                // Switch to checking backward from it.
                if(state == State.IN_NORM_ITER_AT_LIMIT) {
                    iter.moveIndex(start - limit);
                }
                limit = start;
            }
            state = State.ITER_CHECK_BWD;
        }
    }
576624
public function rewind()
    {
        parent::rewind();
        $limit = $this->_agent->getLimit();
        $this->_scheduledItems = $this->_collection->fetchScheduledItems($limit);
    }
1072392
def forward_backward(self, data_batch):
        """"""
        self.forward(data_batch, is_train=True)
        self.backward()
392740
def forwards(self, orm):
        ""
        from avocado.core import backup
        backup.safe_load(u'0002_avocado_metadata', backup_path=None,
            using='default')