Removes at index

        :param position: Index of removal
        :return: bool: True iff removal completed successfully
162631
def remove(self, position):
        
        if position <= 0:  # at beginning
            return self.remove_first()

        if position >= self.length() - 1:  # at end
            return self.remove_last()

        counter = 0
        last_node = self.head
        current_node = self.head

        while current_node is not None and counter <= position:
            if counter == position:
                last_node.next_node = current_node.next_node  # remove current
                return True

            last_node = current_node
            current_node = current_node.next_node
            counter += 1

        return False
495085
private boolean isChangedPosition(I_CmsDropTarget target) {

        // if the new index is not next to the old one, the position has changed
        if ((target != m_initialDropTarget)
            || !((target.getPlaceholderIndex() == (m_originalIndex + 1))
                || (target.getPlaceholderIndex() == m_originalIndex))) {
            return true;
        }
        return false;
    }
1137508
public void removePoint(int index) {
        int numKnots = x.length;
        if (numKnots <= 2)
            return;
        float[] nx = new float[numKnots - 1];
        float[] ny = new float[numKnots - 1];
        int j = 0;
        for (int i = 0; i < numKnots - 1; i++) {
            if (i == index)
                j++;
            nx[i] = x[j];
            ny[i] = y[j];
            j++;
        }
        x = nx;
        y = ny;
    }
277549
def list_remove_by_index(l, index):
    ''''''
    if index < 0 or index >= len(l):
        raise ValueError('index out of range')
    if index == (len(l) - 1):
        l.pop()
    elif index == 0:
        l = l[1:]
    else:
        l = l[0:index] + l[index+1:]

    return l
1237480
def delete_at(index)
      node = self
      deleted_value = nil

      while node do
        if node.is_leaf?
          deleted_value = node.values.delete_at(index)
          if node.parent
            node.parent.adjust_offsets(node, -1)
            if node.size < min_size
              node.parent.consolidate_child_nodes(node)
            end
          end

          return deleted_value
        else
          # Descend into the right child node to add the value to.
          cidx = (node.offsets.bsearch_index { |o| o > index } ||
                  node.offsets.length) - 1
          if (index -= node.offsets[cidx]) < 0
            node.fatal "Index (#{index}) became negative"
          end
          node = node.children[cidx]
        end
      end

      PEROBS.log.fatal "Could not find proper node to delete from while " +
        "looking for index #{index}"
    end
1324676
def setposition(self, position):
        
        try:
            if isinstance(position, list):
                self.send('position startpos moves {}'.format(
                    self.__listtostring(position)))
                self.isready()
            elif re.match('\s*^(((?:[rnbqkpRNBQKP1-8]+\/){7})[rnbqkpRNBQKP1-8]+)\s([b|w])\s([K|Q|k|q|-]{1,4})\s(-|[a-h][1-8])\s(\d+\s\d+)$', position):
                regexList = re.match('\s*^(((?:[rnbqkpRNBQKP1-8]+\/){7})[rnbqkpRNBQKP1-8]+)\s([b|w])\s([K|Q|k|q|-]{1,4})\s(-|[a-h][1-8])\s(\d+\s\d+)$', position).groups()
                fen = regexList[0].split("/")
                if len(fen) != 8:
                    raise ValueError("expected 8 rows in position part of fen: {0}".format(repr(fen)))

                for fenPart in fen:
                    field_sum = 0
                    previous_was_digit, previous_was_piece = False, False

                    for c in fenPart:
                        if c in ["1", "2", "3", "4", "5", "6", "7", "8"]:
                            if previous_was_digit:
                                raise ValueError("two subsequent digits in position part of fen: {0}".format(repr(fen)))
                            field_sum += int(c)
                            previous_was_digit = True
                            previous_was_piece = False
                        elif c == "~":
                            if not previous_was_piece:
                                raise ValueError("~ not after piece in position part of fen: {0}".format(repr(fen)))
                            previous_was_digit, previous_was_piece = False, False
                        elif c.lower() in ["p", "n", "b", "r", "q", "k"]:
                            field_sum += 1
                            previous_was_digit = False
                            previous_was_piece = True
                        else:
                            raise ValueError("invalid character in position part of fen: {0}".format(repr(fen)))

                    if field_sum != 8:
                        raise ValueError("expected 8 columns per row in position part of fen: {0}".format(repr(fen)))  
                self.send('position fen {}'.format(position))
                self.isready()
            else: raise ValueError("fen doesn`t match follow this example: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 ")  

        except ValueError as e:
            print('\nCheck position correctness\n')
            sys.exit(e.message)
272720
def removeByIndex(self, index):
        """"""
        if index < len(self._invites) -1 and \
           index >=0:
            self._invites.remove(index)
1042186
public void removeAt(int index) {
        synchronized (mLock) {
            if (mOriginalValues != null) {
                mOriginalValues.remove(index);
            } else {
                mObjects.remove(index);
            }
        }
        if (mNotifyOnChange) notifyDataSetChanged();
    }
1256343
def removeTab(self, index):
        
        curr_index = self.currentIndex()
        items = list(self.items())

        item = items[index]
        item.close()
        if index <= curr_index:
            self._currentIndex -= 1
377069
def on_remove(self, widget, data=None):
        
        treeiter, path = self.get_selected_object()
        if not treeiter:
            return

        # check if an element is selected
        dict_path_as_list = self.tree_store[path][self.ID_STORAGE_ID]
        logger.debug("Deleting semantic data entry with name {}!".format(dict_path_as_list[-1]))
        self.model.state.remove_semantic_data(dict_path_as_list)
        self.reload_tree_store_data()

        # hold cursor position where the last element was removed
        try:
            self.select_entry(self.tree_store[path][self.ID_STORAGE_ID])
        except IndexError:
            if len(self.tree_store):
                if len(path) > 1:
                    possible_before_path = tuple(list(path[:-1]) + [path[-1] - 1])
                    if possible_before_path[-1] > -1:
                        self.select_entry(self.tree_store[possible_before_path][self.ID_STORAGE_ID])
                    else:
                        self.select_entry(self.tree_store[path[:-1]][self.ID_STORAGE_ID])
                else:
                    self.select_entry(self.tree_store[path[0] - 1][self.ID_STORAGE_ID])
        return True
541473
def on_recycle_view(self, index, position):
        
        item = self.list_items[index]
        self.item_mapping[position] = item
        item.recycle_view(position)
668976
def execute_remove(self, remove):
		''' 
		'''

		safe = self.safe
		if remove.safe is not None:
			safe = remove.safe

		self.queue.append(RemoveOp(self.transaction_id, self, remove.type, safe, remove))
		if self.autoflush:
			return self.flush()
677308
def remove(self, item):
        ''
        i = self.index(item)
        del self._keys[i]
        del self._items[i]
830709
public function removeFromHeadByPosition($position)
    {
        if (isset($position, $this->_head[$position])) {
            unset($this->_head[$position]);
        }
    }
356879
def remove(self, index):
        """"""
        assert index < self.count
        last_index = self.count - 1
        data = self.get(index)

        if index == last_index:
            # easy case - nothing to do except zero last chunk
            last_data = data
            moved = None
        else:
            last_data = self.get(last_index)
            # copy the last chunk's data over the data to be deleted
            data[0:self.chunk_size] = last_data
            moved = last_index

        # zero last chunk's data
        last_data[0:self.chunk_size] = [0] * self.chunk_size
        self.count -= 1

        # provide which index has now moved
        return moved
81843
def remove(self, *args):
        

        key = self.get_storage_key(*args)
        pk = self.instance.pk.get()
        logger.debug("removing %s from index %s" % (pk, key))
        self.connection.srem(key, pk)
        self._deindexed_values.add(tuple(args))
1248335
def _remove_from_index(index, obj):
    """"""
    try:
        index.value_map[indexed_value(index, obj)].remove(obj.id)
    except KeyError:
        pass