Remove all references to a specific Subject ID

        :param sub: A Subject ID
439652
def remove_sub(self, sub):
        
        for _sid in self.get('sub2sid', sub):
            self.remove('sid2sub', _sid, sub)
        self.delete('sub2sid', sub)
1204371
def remove_all_matching(self, address=None, name=None):
        
        if self.entries:
            if address and name:
                func = lambda entry: not entry.is_real_entry() or (entry.address != address and name not in entry.names)
            elif address:
                func = lambda entry: not entry.is_real_entry() or entry.address != address
            elif name:
                func = lambda entry: not entry.is_real_entry() or name not in entry.names
            else:
                raise ValueError('No address or name was specified for removal.')
            self.entries = list(filter(func, self.entries))
455720
def __clear_references(self, request, remove_request=True):
        """"""
        # remove request itself
        if remove_request:
            with self.__requests:
                self.__requests.pop(request.id_)
        # remove request type specific references
        if not request.success:
            with self.__pending_subs:
                self.__pending_subs.pop(request.id_, None)
            with self.__pending_controls:
                self.__pending_controls.pop(request.id_, None)
1251761
private void cascadeDeleteFor(ObjectEnvelope mod, List alreadyPrepared)
    {
        // avoid endless recursion
        if(alreadyPrepared.contains(mod.getIdentity())) return;

        alreadyPrepared.add(mod.getIdentity());

        ClassDescriptor cld = getTransaction().getBroker().getClassDescriptor(mod.getObject().getClass());

        List refs = cld.getObjectReferenceDescriptors(true);
        cascadeDeleteSingleReferences(mod, refs, alreadyPrepared);

        List colls = cld.getCollectionDescriptors(true);
        cascadeDeleteCollectionReferences(mod, colls, alreadyPrepared);
    }
420508
def __remove_index(self, ids):
        """"""
        if not ids:
            return

        ids = ",".join((str(id) for id in ids))
        self.execute("DELETE FROM fact_index where id in (%s)" % ids)
706206
def del_reference(self, source, target, **kwargs):
        
        rc = api.get_tool("reference_catalog")
        uid = api.get_uid(target)
        rc.deleteReference(source, uid, self.relationship)
        # unlink the version of the reference
        self.link_version(source, target)
657658
def subn_filter(s, find, replace, count=0):
    """"""
    return re.gsub(find, replace, count, s)
666108
def remove(self, parameters):
        

        # Verify that we already know our assigned subscription_id
        assert self.subscription_id != -1

        if not parameters:
            return

        options = web_pb2.ParameterSubscriptionRequest()
        options.subscriptionId = self.subscription_id
        options.id.extend(_build_named_object_ids(parameters))

        self._manager.send('unsubscribe', options)
242545
def delete_relation(self, src, relation, target):
        '''  '''
        self.__require_string__(relation)
        if src in self and target in self:
            self._get_item_node(src).unlink(relation, self._get_item_node(target))
384109
def remove(client, name):
    """"""
    from renku.models.refs import LinkReference
    LinkReference(client=client, name=_ref(name)).delete()
273637
def relation_clear(r_id=None):
    '''  '''
    settings = relation_get(rid=r_id,
                            unit=local_unit())
    for setting in settings:
        if setting not in ['public-address', 'private-address']:
            settings[setting] = None
    relation_set(relation_id=r_id,
                 **settings)
138192
def _del_subscription(self, a_filter, session):
        
        deleted = 0
        try:
            subscriptions = self._subscriptions[a_filter]
            for index, (sub_session, qos) in enumerate(subscriptions):
                if sub_session.client_id == session.client_id:
                    self.logger.debug("Removing subscription on topic '%s' for client %s" %
                                      (a_filter, format_client_message(session=session)))
                    subscriptions.pop(index)
                    deleted += 1
                    break
        except KeyError:
            # Unsubscribe topic not found in current subscribed topics
            pass
        finally:
            return deleted
148658
def removeDomain(self, subnetId, domainId):
        
        subnetDomainIds = []
        for domain in self[subnetId]['domains']:
            subnetDomainIds.append(domain['id'])
        subnetDomainIds.remove(domainId)
        self[subnetId]["domain_ids"] = subnetDomainIds
        return len(self[subnetId]["domains"]) is len(subnetDomainIds)
812019
public void removeSubject(String subject) {
        String prefix = normalizePrefix(subject);

        for (String suffix : getSuffixes(prefix).keySet()) {
            setItem(prefix + suffix, null);
        }
    }
487399
function removeSubKeyFromList(list, sub, key, value) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (a4p.isDefined(list[i][sub]) && (list[i][sub][key] == value)) {
            return list.splice(i, 1); // remove from array
        }
    }
    return false;
}
1162781
def elem_remove(self, idx=None):
        
        if idx is not None:
            if idx in self.uid:
                key = idx
                item = self.uid[idx]
            else:
                self.log('The item <{:s}> does not exist.'.format(idx), ERROR)
                return None
        else:
            return None

        convert = False
        if isinstance(self.__dict__[self._params[0]], matrix):
            self._param_to_list()
            convert = True

        # self.n -= 1
        self.uid.pop(key, '')
        self.idx.pop(item)
        self.mdl_from.pop(item)
        self.mdl_to.pop(item)

        for x, y in self.uid.items():
            if y > item:
                self.uid[x] = y - 1

        for param in self._data:
            self.__dict__[param].pop(item)

        for param in self._service:
            if len(self.__dict__[param]) == (self.n + 1):
                if isinstance(self.__dict__[param], list):
                    self.__dict__[param].pop(item)
                elif isinstance(self.__dict__[param], matrix):
                    service = list(self.__dict__[param])
                    service.pop(item)
                    self.__dict__[param] = matrix(service)

        for x in self._states:
            if len(self.__dict__[x]):
                self.__dict__[x].pop(item)

        for y in self._algebs:
            if self.__dict__[y]:
                self.__dict__[y].pop(item)

        for key, param in self._ac.items():
            if isinstance(param, list):
                for subparam in param:
                    if len(self.__dict__[subparam]):
                        self.__dict__[subparam].pop(item)
            else:
                self.__dict__[param].pop(item)

        for key, param in self._dc.items():
            self.__dict__[param].pop(item)

        self.name.pop(item)
        if convert and self.n:
            self._param_to_matrix()
663186
def del_subkey(self,name):
        """"""
        self.sam |= KEY_WRITE
        subkey = self.get_subkey(name)
        subkey.clear()
        _winreg.DeleteKey(subkey.parent.hkey,subkey.name)