Initializes the history if not already done.

@private
351845
function() {
			if (!this._aHistory) {
				var aHistory = this._oStorage.get(this._sHistoryId);
				if (typeof (aHistory) === "string") {
					// in case it is a string, convert it to an array
					aHistory = aHistory.split(",");
				} else if (!aHistory) {
					// or create a new one in case of non existence
					aHistory = [];
				} // else assume that there is the means for serializing JSON used, returning an array directly
				//do a final check of the entries
				this._aHistory = this._fCheckHistory(aHistory);
			}
			return this._aHistory;
		}
437385
function (binding) {
    var historyBinding = getHistoryBinding(binding);
    var undo = historyBinding.get('undo');
    return !!undo && !undo.isEmpty();
  }
659903
function() {
            if (this.started) {
                logging.warn("routing history already started");
                return false;
            }

            var self = this;
            var $window = $(window);
            var rootUrl = document.location.protocol+'//'+(document.location.hostname||document.location.host);

            logging.log("start routing history");
            $window.bind('hashchange', _.bind(this._handleCurrentState, this));

            var ret = this._handleCurrentState();
            this.started = true;

            return ret;
        }
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);
			}
		}
1039132
public void historyUpdated (int adjustment)
    {
        if (adjustment != 0) {
            for (int ii = 0, nn = _showingHistory.size(); ii < nn; ii++) {
                ChatGlyph cg = _showingHistory.get(ii);
                cg.histIndex -= adjustment;
            }
            // some history entries were deleted, we need to re-figure the history scrollbar action
            resetHistoryOffset();
        }

        if (isLaidOut() && isHistoryMode()) {
            int val = _historyModel.getValue();
            updateHistBar(val - adjustment);

            // only repaint if we need to
            if ((val != _historyModel.getValue()) || (adjustment != 0) || !_histOffsetFinal) {
                figureCurrentHistory();
            }
        }
    }
1252645
function() {
			// Stack for all the undo and redo snapshots, they're always created/removed
			// in consistency.
			this.snapshots = [];

			// Current snapshot history index.
			this.index = -1;

			this.currentImage = null;

			this.hasUndo = false;
			this.hasRedo = false;
			this.locked = null;

			this.resetType();
		}
521506
private void executeHistoryAction() {

        CmsHistoryState state = getState();
        if (state.isHistoryBack()) {
            History.back();
        } else if (state.isHistoryForward()) {
            History.forward();
        }
    }
945730
public static void addHistory(@NonNull Intent intent, @NonNull History history,
      @NonNull KeyParceler parceler) {
    InternalLifecycleIntegration.addHistoryToIntent(intent, history, parceler);
  }
185084
public function clearHistory()
    {
        $this->historyLines = array();
        $this->historyPosition = null;

        if ($this->historyUnsaved !== null) {
            $this->setInput($this->historyUnsaved);
            $this->historyUnsaved = null;
        }

        return $this;
    }
1283356
function (query, page, callback) {
  var History = exports.get('History');
  History.paginate(query, {
    page: page,
    limit: vulpejs.app.pagination.history,
  }, function (error, items, pageCount, itemCount) {
    if (error) {
      vulpejs.log.error('HISTORY', error);
    } else {
      callback(error, {
        items: items,
        pageCount: pageCount,
        itemCount: itemCount,
      });
    }
  }, {
    sortBy: {
      version: -1,
    },
  });
}
890928
def history(directory, rev_range, verbose, indicate_current):
    """"""
    _history(directory, rev_range, verbose, indicate_current)
946207
function initHistoryStateStack () {
  // 如果当前tab有历史条目，那么应该把之前存储的state list读取出来
  if (window.history.length > 1) {
    try {
      let historyState = JSON.parse(window.localStorage.getItem(MIP_HISTORY_STATE_STACK_LOCAL_KEY))
      if (historyState && historyState.length) {
        // 为了有效控制localStorage大小，每次读取时应该只读取不大于当前tab历史条目长度
        // 因为大于历史条目长度之前的记录都是过期的state，无需读取
        HISTORY_STATE_STACK = historyState.slice(-window.history.length)
      }
    } catch (err) {

    }
  }

  setTimeout(() => {
    // 首次访问的页面也要加入列表中，但要注意如果当前页面访问过（刷新）则应该替换
    if (HISTORY_STATE_STACK.length) {
      HISTORY_STATE_STACK[HISTORY_STATE_STACK.length - 1] = getHistoryStateKey()
    } else {
      HISTORY_STATE_STACK.push(getHistoryStateKey())
    }
  }, 300)
}
157847
function(){
		if(this.position<this.initpos){ this.broken = true;}
		for(var i=this.history.length-1;i>=this.position;i--){ this.history.pop();}
		this.position = this.history.length;
		this.chainflag = false;
	}
1342816
void initialize() {
        Preconditions.checkState(this.database.get() == null, "%s has already been initialized.", this.logId);

        try {
            clear(true);
            this.database.set(openDatabase());
        } catch (Exception ex) {
            // Make sure we cleanup anything we may have created in case of failure.
            try {
                close();
            } catch (Exception closeEx) {
                ex.addSuppressed(closeEx);
            }

            throw ex;
        }

        log.info("{}: Initialized.", this.logId);
    }
956285
def beginning_of_history(self): # (M-<)
        '''
        self.history_cursor = 0
        if len(self.history) > 0:
            self.l_buffer = self.history[0]
827365
function () {
    // Create and attach our main view
    this.mainView = new MainView({
      model: this.me,
      el: document.body
    });

    // this kicks off our backbutton tracking (browser history)
    // and will cause the first matching handler in the router
    // to fire.
    this.router.history.start({
      root: '/',
      pushState: true
    });
  }
205413
function () {
      var history = _emberMetalProperty_get.get(this, 'history') || window.history;
      _emberMetalProperty_set.set(this, 'history', history);

      if (history && 'state' in history) {
        this.supportsHistory = true;
      }

      this.replaceState(this.formatURL(this.getURL()));
    }