Returns the current backstack, ordered from root to most recently pushed.
432393
@NonNull
    public List<RouterTransaction> getBackstack() {
        List<RouterTransaction> list = new ArrayList<>(backstack.size());
        Iterator<RouterTransaction> backstackIterator = backstack.reverseIterator();
        while (backstackIterator.hasNext()) {
            list.add(backstackIterator.next());
        }
        return list;
    }
778886
def current(cls, with_exception=True):
        
        if with_exception and len(cls.stack) == 0:
            raise NoContext()
        return cls.stack.top()
1204743
def last_modified(self):
        
        if self.get('Last-Modified'):
            return arrow.get(self.get('Last-Modified'))
        return self.date
1333698
protected function current()
    {
        if (count($this->stack)) {
            return $this->stack[count($this->stack) -1];
        }
        return null;
    }
723092
def current_target(self):
        """"""
        actions = self.state[self.state['current_step']]['actions']
        for action, value in reversed(actions):
            if action == 'target':
                return value
3065
async function getCurrentServerTimeAndBlock() {
    await retrieveDynGlobProps();
    if(props.time) { 
        lastCommitedBlock = props.last_irreversible_block_num;
        trace("lastCommitedBlock = " + lastCommitedBlock + ", headBlock = " + props.head_block_number);
        return {
            time : Date.parse(props.time), 
            block : props.head_block_number,
            commited_block :  props.last_irreversible_block_num
        };
    }
    throw "Current time could not be retrieved";
}
919526
@SuppressWarnings("deprecation")
	public static IBlockState getStateFromItemStack(ItemStack itemStack)
	{
		if (itemStack.isEmpty())
			return null;

		Block block = Block.getBlockFromItem(itemStack.getItem());
		if (block == null)
			return null;

		if (block instanceof MalisisBlock)
			return ((MalisisBlock) block).getStateFromItemStack(itemStack);

		//special case for pistons, because Mojang.
		if (block instanceof BlockPistonBase)
			return block.getDefaultState();

		try
		{
			return block.getStateFromMeta(itemStack.getItem().getMetadata(itemStack.getMetadata()));
		}
		catch (Exception e)
		{
			return block.getDefaultState();
		}
	}
732725
function getStickyStateStack(state) {
        var stack = [];
        if (!state) return stack;
        do {
          if (state.sticky) stack.push(state);
          state = state.parent;
        } while (state);
        stack.reverse();
        return stack;
      }
489278
def current_branch(self):
        """"""
        output = self.context.capture('git', 'rev-parse', '--abbrev-ref', 'HEAD', check=False, silent=True)
        return output if output != 'HEAD' else None
519301
def current_index(self):
        """"""
        i = self._parent.proxy_model.mapToSource(self._parent.currentIndex())
        return i
491519
def get_last_block(working_dir):
    

    # make this usable even if we haven't explicitly configured virtualchain 
    impl = sys.modules[__name__]
    return BlockstackDB.get_lastblock(impl, working_dir)
1356576
public function getCurrentRoot()
    {
        if (null !== $this->getCurrentPage()) {
            return $this->getCurrentPage()->getRoot();
        } elseif (null === $this->getCurrentSite()) {
            return;
        } else {
            return $this->application->getEntityManager()
                ->getRepository('BackBee\NestedNode\Page')
                ->getRoot($this->getCurrentSite())
            ;
        }
    }
90790
public String getBackStackDescription() {
    ArrayList<Screen> backStackCopy = new ArrayList<>(backStack);
    Collections.reverse(backStackCopy);
    String currentScreen = "";
    if (!backStackCopy.isEmpty()) {
      currentScreen = backStackCopy.remove(backStackCopy.size() - 1).toString();
    }
    return TextUtils.join(" > ", backStackCopy) + (backStackCopy.isEmpty() ? "" : " > ") + "[" + currentScreen + "]";
  }
627257
def positions(self, reverse=False):
        """"""
        def Posgen(reverse):
            if reverse:
                lastrootsib = self.last_sibling_position(self.root)
                current = self.last_decendant(lastrootsib)
                while current is not None:
                    yield current
                    current = self.prev_position(current)
            else:
                current = self.root
                while current is not None:
                    yield current
                    current = self.next_position(current)
        return Posgen(reverse)
858408
def goForward(self):
        
        if not self.canGoForward():
            return ''
        
        self._blockStack = True
        self._index += 1
        self.emitCurrentChanged()
        self._blockStack = False
        return self.currentUrl()
1082970
function getCurrentBranch(verbose) {
  return Promise.resolve()
    .then(execCmd.bind(null,
      'git',
      ['symbolic-ref', 'HEAD', '-q'],
      'problem getting current branch',
      verbose
    ))
    .catch(function() {
      return '';
    })
    .then(function(result) {
      return result.replace(new RegExp('^refs\/heads\/'), '');
    });
}
844710
private void getLastChild() {

        // nodekey of the root of the current subtree
        final long parent = getNode().getDataKey();

        // traverse tree in pre order to the leftmost leaf of the subtree and
        // push
        // all nodes to the stack
        if (((ITreeStructData)getNode()).hasFirstChild()) {
            while (((ITreeStructData)getNode()).hasFirstChild()) {
                mStack.push(getNode().getDataKey());
                moveTo(((ITreeStructData)getNode()).getFirstChildKey());
            }

            // traverse all the siblings of the leftmost leave and all their
            // descendants and push all of them to the stack
            while (((ITreeStructData)getNode()).hasRightSibling()) {
                mStack.push(getNode().getDataKey());
                moveTo(((ITreeStructData)getNode()).getRightSiblingKey());
                getLastChild();
            }

            // step up the path till the root of the current subtree and process
            // all
            // right siblings and their descendants on each step
            if (getNode().hasParent() && (getNode().getParentKey() != parent)) {

                mStack.push(getNode().getDataKey());
                while (getNode().hasParent() && (getNode().getParentKey() != parent)) {

                    moveTo(getNode().getParentKey());

                    // traverse all the siblings of the leftmost leave and all
                    // their
                    // descendants and push all of them to the stack
                    while (((ITreeStructData)getNode()).hasRightSibling()) {

                        moveTo(((ITreeStructData)getNode()).getRightSiblingKey());
                        getLastChild();
                        mStack.push(getNode().getDataKey());
                    }
                }

                // set transaction to the node in the subtree that is last in
                // document
                // order
                moveTo(mStack.pop());
            }
        }
    }