Removes all matched data.data from the the list by passed block or value.

 == Returns:
 Array of deleted nodes
344395
def delete_all(val = nil, &block)
      each_node.select(&__to_matcher(val, &block)).each do |node_to_delete|
        next unless node_to_delete
        __unlink_node(node_to_delete)
      end.map(&:data)
    end
375942
def match_all(data, &block)
      return nil if @root == nil
      i=0
      while (i<data.length)
        node = @root.find_forward(data, i, data.length-i)
        if (node!=nil && node.value!=nil)
          yield Item.new(i, true, node)
          i += node.length
        else
          i += 1
        end
      end
    end
1354748
def have_all_block_data(self):
        
        if not (self.num_blocks_received == self.num_blocks_requested):
            log.debug("num blocks received = %s, num requested = %s" % (self.num_blocks_received, self.num_blocks_requested))
            return False

        return True
374119
private void cleanGlobalBlockList() {
    for (Iterator<Block> globalBlockListIterator=globalBlockList.keySet().iterator();
    globalBlockListIterator.hasNext();) {
      Block block = globalBlockListIterator.next();
      if(!movedBlocks.contains(block)) {
        globalBlockListIterator.remove();
      }
    }
  }
313024
def clear(self):
        """"""
        node = self._first
        while node is not None:
            next_node = node._next
            node._list = node._prev = node._next = None
            node = next_node
        self._size = 0
504736
def clean_value(self):
        
        result = []
        for mdl in self:
            result.append(super(ListNode, mdl).clean_value())
        return result
716377
def clear
      return self unless current_table = table
      current_table_size = current_table.size
      deleted_count = i = 0
      while i < current_table_size
        if !(node = current_table.volatile_get(i))
          i += 1
        elsif (node_hash = node.hash) == MOVED
          current_table      = node.key
          current_table_size = current_table.size
        elsif Node.locked_hash?(node_hash)
          decrement_size(deleted_count) # opportunistically update count
          deleted_count = 0
          node.try_await_lock(current_table, i)
        else
          current_table.try_lock_via_hash(i, node, node_hash) do
            begin
              deleted_count += 1 if NULL != node.value # recheck under lock
              node.value = nil
            end while node = node.next
            current_table.volatile_set(i, nil)
            i += 1
          end
        end
      end
      decrement_size(deleted_count)
      self
    end
1352184
def delete(self):
        
        # we'll have to manually run through all the nodes that are going
        # to be deleted and remove nodes from the list if an ancestor is
        # already getting removed, since that would be redundant
        removed = {}
        for node in self.order_by('depth', 'path'):
            found = False
            for depth in range(1, int(len(node.path) / node.steplen)):
                path = node._get_basepath(node.path, depth)
                if path in removed:
                    # we are already removing a parent of this node
                    # skip
                    found = True
                    break
            if not found:
                removed[node.path] = node

        # ok, got the minimal list of nodes to remove...
        # we must also remove their children
        # and update every parent node's numchild attribute
        # LOTS OF FUN HERE!
        parents = {}
        toremove = []
        for path, node in removed.items():
            parentpath = node._get_basepath(node.path, node.depth - 1)
            if parentpath:
                if parentpath not in parents:
                    parents[parentpath] = node.get_parent(True)
                parent = parents[parentpath]
                if parent and parent.numchild > 0:
                    parent.numchild -= 1
                    parent.save()
            if node.is_leaf():
                toremove.append(Q(path=node.path))
            else:
                toremove.append(Q(path__startswith=node.path))

        # Django will handle this as a SELECT and then a DELETE of
        # ids, and will deal with removing related objects
        if toremove:
            qset = get_result_class(self.model).objects.filter(reduce(operator.or_, toremove))
            super(MP_NodeQuerySet, qset).delete()
969865
def clear_list_value(self, value):
        
        # Don't go any further: this value is empty.
        if not value:
            return self.empty_value
        # Clean empty items if wanted
        if self.clean_empty:
            value = [v for v in value if v]
        return value or self.empty_value
403250
def import_deleted_fields(self, data):
        

        if self.get_read_only() and self.is_locked():
            return

        if isinstance(data, str):
            data = [data]

        for key in data:
            if hasattr(self, key):
                delattr(self, key)
                continue

            keys = key.split('.', 1)

            if len(keys) != 2:
                continue

            child = getattr(self, keys[0])
            child.import_deleted_fields(keys[1])
676247
def clear(self):
        """"""
        for n in self.nodes():
            if self.nodes[n]["type"] == "variable":
                self.nodes[n]["value"] = None
            elif self.nodes[n]["type"] == "function":
                self.nodes[n]["func_visited"] = False
972298
def _clean_data(data):
    '''
    
    '''
    for key in list(data):
        if key.startswith('__pub'):
            del data[key]
    return data
1193846
def clear(self):
        
        self._filters = []
        self._order_by = OrderedDict()
        self._selects = set()
        self._negation = False
        self._attribute = None
        self._chain = None
        self._search = None

        return self
1372510
def clear(self):
        
        # self.graph = nx.Graph()
        self.graph.clear()
        self.data.clear()
        self.descriptors.clear()
        self.size2d = None
        self.rings = None
        self.scaffolds = None
        self.isolated = None
653683
def _clean(self):
        """"""
        found_ids = {}
        nodes = [self._nodes[_node.Root.ID]]
        while nodes:
            node = nodes.pop()
            found_ids[node.id] = None
            nodes = nodes + node.children

        for node_id in self._nodes:
            if node_id in found_ids:
                continue
            logger.error('Dangling node: %s', node_id)

        for node_id in found_ids:
            if node_id in self._nodes:
                continue
            logger.error('Unregistered node: %s', node_id)
488831
def delete_from(self, basic_block):
        
        if basic_block is None:
            return

        if self.lock:
            return

        self.lock = True

        if self.prev is basic_block:
            if self.prev.next is self:
                self.prev.next = None
            self.prev = None

        for i in range(len(self.comes_from)):
            if self.comes_from[i] is basic_block:
                self.comes_from.pop(i)
                break

        self.lock = False
376137
def remove(self):
        
        if self.parent:
            for i, node in enumerate(self.parent.children):
                if node is self:
                    self.parent.changed()
                    del self.parent.children[i]
                    self.parent = None
                    return i