Removes last

        :return: True iff last element has been removed
771406
def remove_last(self):
        

        if self.length() <= 1:
            self.head = None
            return True

        node = self.head

        while node is not None:
            is_last_but_one = node.next_node is not None and \
                              node.next_node.next_node is None
            print(node.val, is_last_but_one)
            if is_last_but_one:  # this is the last
                node.next_node = None  # get to last but one element
                return True

            node = node.next_node

        return False
678226
def discard(self, element):
        
        _check_element(element)
        self._require_context()
        self._removes.add(element)
1128029
function isRemovedToken(context, token) {
  var removedNodes = context.removedNodes;
  var nodeIdx = removedNodes.length - 1;

  // Find the last removed node which could possibly contain this token.
  while (nodeIdx >= 0 && removedNodes[nodeIdx].start > token.start) {
    nodeIdx--;
  }

  var node = removedNodes[nodeIdx];

  // This token couldn't be removed if not contained within the removed node.
  if (nodeIdx === -1 || node.end < token.end) {
    return false;
  }

  // Iterate through the tokens contained by the removed node to find a match.
  var tokens = context.ast.tokens;
  var tokenIdx = findTokenIndex(tokens, node.start);
  while (tokens[tokenIdx].end <= node.end) {
    if (token === tokens[tokenIdx]) {
      return true;
    }
    tokenIdx++;
  }

  return false;
}
888432
def last(predicate=None):
    """"""

    predicate = true if predicate is None else predicate

    def last_transducer(reducer):
        return Last(reducer, predicate)

    return last_transducer
301860
def last_modified(self):
        
        if self.entries:
            latest = max(self.entries, key=lambda x: x.last_modified)
            return arrow.get(latest.last_modified)
        return arrow.get()
587124
public boolean remove(T element) {
		for (Iterator<Node<T>> it = nodes.iterator(); it.hasNext(); )
			if (ObjectUtil.equalsOrNull(it.next().element, element)) {
				it.remove();
				return true;
			}
		return false;
	}
479886
def clear_last_check(self):
        """"""
        with db.session.begin_nested():
            self.last_check = None
            self.last_check_at = datetime.utcnow()
        return self
831129
public static function removeMarginalElement($item, $last = true)
    {
        if (is_string($item)) {
            if ($last) {
                $item = substr($item, 0, -1);
            } else {
                $item = substr($item, 1);
            }
        } elseif (is_array($item)) {
            $key = self::getFirstKey($item);

            if ($last) {
                $key = self::getLastKey($item);
            }

            unset($item[$key]);
        }

        return $item;
    }
750346
def lastElementChild(self) -> Optional[AbstractNode]:
        
        for child in reversed(self.childNodes):  # type: ignore
            if child.nodeType == Node.ELEMENT_NODE:
                return child
        return None
1156500
def yank_last_arg(event):
    
    n = (event.arg if event.arg_present else None)
    event.current_buffer.yank_last_arg(n)
105163
def _remove_last(votes, fpl, cl, ranking):
    
    for v in votes:
        for r in v:
            if r == fpl[-1]:
                v.remove(r)
    for c in cl:
        if c == fpl[-1]:
            if c not in ranking:
                ranking.append((c, len(ranking) + 1))
816443
def last_position(self):
        
        return self._old_x, self._old_y, self._old_width, self._old_height
823204
def clear(self):
        
        for elm in self._element.content_children:
            self._element.remove(elm)
        return self
1298524
public final function is_last() {
        $lastindex = count(core_component::get_plugin_list($this->get_subtype()))-1;
        $currentindex = get_config($this->get_subtype() . '_' . $this->get_type(), 'sortorder');
        if ($lastindex == $currentindex) {
            return true;
        }

        return false;
    }
37338
private void removeTrail() {
        int last = this.size - 1;
        while (last >= 0 && this.arr[last] == this.blankElement) {
            last--;
        }
        this.size = last + 1;
    }
1256127
def remove(self, element):
        
        if element not in self._counts:
            raise KeyError(element)
        elif self._counts[element] == 1:
            newc = self._counts.remove(element)
        else:
            newc = self._counts.set(element, self._counts[element] - 1)
        return PBag(newc)
271599
def lastIndexOf(self, item):
        
        array = self.obj
        i = len(array) - 1
        if not (self._clean.isList() or self._clean.isTuple()):
            return self._wrap(-1)

        while i > -1:
            if array[i] is item:
                return self._wrap(i)
            i -= 1
        return self._wrap(-1)