Delete a specific node
438041
def delete(node_name):
    
    result = {}
    node = nago.core.get_node(node_name)
    if not node:
        result['status'] = 'error'
        result['message'] = "node not found."
    else:
        node.delete()
        result['status'] = 'success'
        result['message'] = 'node deleted.'
    return result
911119
def visit_delete(self, node):  # XXX check if correct
        """"""
        return "del %s" % ", ".join(child.accept(self) for child in node.targets)
954927
def remove(self, node):
        
        if node is None or node._prev == -1:
            return
        if node._next is None:
            self._last = node._prev  # last node
        else:
            node._next._prev = node._prev
        if node._prev is None:
            self._first = node._next  # first node
        else:
            node._prev._next = node._next
        node._prev = node._next = -1
        self._size -= 1
1304468
function makeRemove(child, node) {
  // NOTE: Null values reduce hidden classes.
  return {
    type: 'REMOVE_NODE',
    content: null,
    fromIndex: child._mountIndex,
    fromNode: node,
    toIndex: null,
    afterNode: null
  };
}
70480
def _remove_node(self, node):
        

        self.graph.remove_node(node)
        if node.addr in self._nodes:
            del self._nodes[node.addr]

        # We wanna remove the function as well
        if node.addr in self.kb.functions:
            del self.kb.functions[node.addr]

        if node.addr in self.kb.functions.callgraph:
            self.kb.functions.callgraph.remove_node(node.addr)
218904
def visit_delete(self, node, parent):
        """"""
        newnode = nodes.Delete(node.lineno, node.col_offset, parent)
        newnode.postinit([self.visit(child, newnode) for child in node.targets])
        return newnode
1151580
async def delete(self):
        """"""
        await self._handler.delete(
            system_id=self.block_device.node.system_id,
            device_id=self.block_device.id, id=self.id)
174476
protected void delete(Node<K, V> n) {
        if (n == root) {
            deleteMin();
            return;
        }

        if (n.y_s == null) {
            throw new IllegalArgumentException("Invalid handle!");
        }

        // disconnect and union children of node
        Node<K, V> childTree = unlinkAndUnionChildren(n);

        // find parent
        Node<K, V> p = getParent(n);

        // link children tree in place of node
        if (childTree == null) {
            // no children, just unlink from parent
            if (p.o_c == n) {
                if (n.y_s == p) {
                    p.o_c = null;
                } else {
                    p.o_c = n.y_s;
                }
            } else {
                p.o_c.y_s = p;
            }
        } else {
            // link children tree to parent
            if (p.o_c == n) {
                childTree.y_s = n.y_s;
                p.o_c = childTree;
            } else {
                p.o_c.y_s = childTree;
                childTree.y_s = p;
            }
        }

        size--;
        n.o_c = null;
        n.y_s = null;
    }
782786
def delete(val = nil, &block)
      if val.respond_to?(:to_node)
        node = val.to_node
        __unlink_node(node)
        return node.data
      end

      each_node.find(&__to_matcher(val, &block)).tap do |node_to_delete|
        return unless node_to_delete
        __unlink_node(node_to_delete)
      end.data
    end
1304749
public void remove(Node<T> node) {
    	if (first == node) {
    		removeMin();
    		return;
    	}
    	if (last == node) {
    		removeMax();
    		return;
    	}
    	// if both children of root are black, set root to red
    	if ((root.left == null || !root.left.red) && (root.right == null || !root.right.red))
            root.red = true;

        root = remove(root, node);
        if (root != null) root.red = false;
        else first = last = null;
    }
100153
def del_node(self, node):
        
        if self.has_node(node):
            for e in self.node_links[node]:
                self.edge_links[e].remove(node)

            self.node_links.pop(node)
            self.graph.del_node((node,'n'))
840004
def destroy(self):

        """"""

        node = self.node
        if not config.is_node_destroyable(node.name):
            logger.error('node %s has non-destroyable prefix' % node.name)
            return False
        logger.info('destroying node %s' % node)
        return node.destroy()
399276
def delNode(self, address):
        
        LOGGER.info('Removing node {}'.format(address))
        message = {
            'removenode': {
                'address': address
            }
        }
        self.send(message)
1297541
def remove(self, nodes):
        """"""
        nodes = nodes if isinstance(nodes, list) else [nodes]
        for node in nodes:
            k = self.id(node)
            self.edges = list(filter(lambda e: e[0] != k and e[1] != k, self.edges))
            del self.nodes[k]
560996
function performDelete(node,dialog,msg, config) {
    var params = {};
    var message = '';
    node.status({fill:'blue', shape:'dot', text:'requesting delete of a dialog instance'}); 

    if (!config.dialog || '' != config.dialog) {
    
      params.dialog_id = config.dialog;

      dialog.deleteDialog(params, function(err, dialog_data){
          node.status({});
          if (!err) {
              message='Dialog deleted successfully';
              msg.dialog = dialog_data;     
              msg.payload = message;
              node.send(msg);
          } else if (err && err.code==404) {
              message='Dialog already deleted or not existing (404)';
              node.status({fill:'green', shape:'dot', text:message});      
              msg.payload = message;
              console.log(err);
              node.error(message, msg);
          } else {
              node.status({fill:'red', shape:'ring', text:'call to dialog service failed'}); 
              node.error(err, msg);
              console.log(err);
          }
      });  
    } else {
      message = 'Dialog Id not specified';
      node.status({fill:'red', shape:'ring', text:message});    
      node.error(errmessage, msg); 
    }   
  }
1154501
def _delete_node(self, tree, node):
        
        # Calculate gains
        temp_tree = copy.deepcopy(tree)

        def recourse(temp_tree_, del_node):
            if isinstance(temp_tree_, dict):
                if temp_tree_['split'] != -1:
                    if temp_tree_['node'] == del_node:
                        del temp_tree_['sr']
                        del temp_tree_['sl']
                        del temp_tree_['node']
                        temp_tree_['split'] = -1
                    else:
                        for k in ['sl', 'sr']:
                            recourse(temp_tree_[k], del_node)
            return None

        recourse(temp_tree, node)
        return temp_tree
1029691
def remove_node(self, node):
        
        if _debug: Network._debug("remove_node %r", node)

        self.nodes.remove(node)
        node.lan = None