Remove incorrect links from the closure tree.
172124
def _closure_deletelink(self, oldparentpk):
        """"""
        self._closure_model.objects.filter(
            **{
                "parent__%s__child" % self._closure_parentref(): oldparentpk,
                "child__%s__parent" % self._closure_childref(): self.pk
            }
        ).delete()
502562
def remove_links(self):
        """"""
        for link in self.list_exes():
            link = path.join(ENV_BIN, path.basename(link))
            print_pretty("<FG_BLUE>Removing link {}...<END>".format(link))
            os.remove(link)
561417
def clear(self, keep_attrs=False):
        
        if not keep_attrs:
            for a in (self.graph_attr, self.node_attr, self.edge_attr):
                a.clear()
        del self.body[:]
902096
def remove(self):
        """"""
        if self.exists() or self.islink():
            self.fs.unlink(self.get_internal_path())
            return 1
        return None
663689
def cleanup(self):
        
        remove = []
        for handle, assoc in self.assocs.iteritems():
            if assoc.getExpiresIn() == 0:
                remove.append(handle)
        for handle in remove:
            del self.assocs[handle]
        return len(remove), len(self.assocs)
265832
function cleanLinks( el ) {
		var i;
		for ( i = 0; i < el.length; i++ ) {
			el[ i ].innerHTML = cleanPath( el[ i ].innerHTML );
		}
	}
234676
def clean(self):
        
        super(CTENode, self).clean()
        if self.parent and self.pk in getattr(self.parent, self._cte_node_path):
            raise ValidationError(_("A node cannot be made a descendant of itself."))
1192984
function _cleanUpTOCChildren(node) {

  if (!Array.isArray(node.children)) {
    return node;
  }

  if (_isExampleOrParameterLink(node)) {
    return null;
  }

  const filteredChildren = node.children.reduce((accu, nd) => {
    accu.push(_cleanUpTOCChildren(nd));
    return accu;
  }, []).filter(n => n);

  if (!filteredChildren.length) {
    return null;
  }

  return {
    ...node,
    children: filteredChildren
  };
}
61758
public void cleanDatabase() {
        lockingMechanism.writeLock().lock();
        try {
            for (ODocument edge : graph.browseEdges()) {
                edge.delete();
            }
            for (ODocument node : graph.browseVertices()) {
                node.delete();
            }
        } finally {
            lockingMechanism.writeLock().unlock();
        }
    }
981796
protected function removeInvalidOrHiddenLinks(array $links): array
    {
        foreach ($links as $i => &$link) {
            if (!isset($link['target_page_id']) && !isset($link['url'])) {
                unset($links[$i]);

                continue;
            }

            $target = empty($link['target_page_id']) ? $link['url'] : $link['target_page_id'];

            $link = Link::factory($target, $link);

            if (!$link->isValid() || (!$this->editable && !$link->isVisible())) {
                unset($links[$i]);
            }
        }

        return array_values($links);
    }
674503
def unlink(self, subj=None, predicate=None):
        
        self.graph.remove((subj, predicate, self.asNode()))
291903
function() {
  var res = this.match(reLinkDestinationBraces);
  if (res) {  // chop off surrounding <..>:
    return unescape(res.substr(1, res.length - 2));
  } else {
    res = this.match(reLinkDestination);
    if (res !== null) {
      return unescape(res);
    } else {
      return null;
    }
  }
}
469705
def cleanup_pbar(self):
        """"""
        if hasattr(self, 'pbar') and self.pbar:
            self.pbar.close()
            self.pbar = None
158572
def unlink(self):
		
		self.parentNode = None
		for child in self.childNodes:
			child.unlink()
		del self.childNodes[:]
1357337
def _closure_createlink(self):
        """"""
        linkparents = self._closure_model.objects.filter(
            child__pk=self._closure_parent_pk
        ).values("parent", "depth")
        linkchildren = self._closure_model.objects.filter(
            parent__pk=self.pk
        ).values("child", "depth")
        newlinks = [self._closure_model(
            parent_id=p['parent'],
            child_id=c['child'],
            depth=p['depth']+c['depth']+1
        ) for p in linkparents for c in linkchildren]
        self._closure_model.objects.bulk_create(newlinks)
78211
private void unlinkFirst(Node<E> first, Node<E> next) {
        // assert first != null;
        // assert next != null;
        // assert first.item == null;
        for (Node<E> o = null, p = next, q;;) {
            if (p.item != null || (q = p.next) == null) {
                if (o != null && p.prev != p &&
                    NEXT.compareAndSet(first, next, p)) {
                    skipDeletedPredecessors(p);
                    if (first.prev == null &&
                        (p.next == null || p.item != null) &&
                        p.prev == first) {

                        updateHead(); // Ensure o is not reachable from head
                        updateTail(); // Ensure o is not reachable from tail

                        // Finally, actually gc-unlink
                        NEXT.setRelease(o, o);
                        PREV.setRelease(o, prevTerminator());
                    }
                }
                return;
            }
            else if (p == q)
                return;
            else {
                o = p;
                p = q;
            }
        }
    }
513870
def remove_links(urls)
      urls.map { |url| list_links({ url: url }) }.flatten.compact.each do |link|
        website.remove_link(link)
      end
    end