Remove a prefix from pool 'id'.
545300
def remove_prefix(self, id):
        

        if 'prefix' not in request.params:
            abort(400, 'Missing prefix.')
        prefix = Prefix.get(int(request.params['prefix']))
        prefix.pool = None
        prefix.save()

        redirect(url(controller = 'pool', action = 'edit', id = id))
934553
def __remove_prefix(self, step):
        
        step_length = len(step)
        for k in KEYWORDS:
            step = step.lstrip(k)
            if len(step) < step_length:
                break
        return step
723791
public void remove(String id) {
		final Lock writeLock = lock.writeLock();
		try {
			writeLock.lock();
			final int index = ids.indexOf(id);
			if (index > -1) {
				tasks.remove(index);
				patterns.remove(index);
				ids.remove(index);
				size--;
			}
		} finally {
			writeLock.unlock();
		}
	}
438529
def _remove_builtin_prefix(name):
    """"""
    if name.startswith('builtins.'):
        return name[len('builtins.'):]
    elif name.startswith('__builtin__.'):
        return name[len('__builtin__.'):]
    return name
591086
def restore_prefix(self):
        """"""
        for removal in self.removals:
            #return the word before precoding (the subject of first prefix removal)
            self.current_word = removal.get_subject()
            break

        for removal in self.removals:
            if removal.get_affix_type() == 'DP':
                self.removals.remove(removal)
804636
def remove_index_from_handle(handle_with_index):
    '''
    
    '''

    split = handle_with_index.split(':')
    if len(split) == 2:
        split[0] = int(split[0])
        return split
    elif len(split) == 1:
        return (None, handle_with_index)
    elif len(split) > 2:
        raise handleexceptions.HandleSyntaxError(
            msg='Too many colons',
            handle=handle_with_index,
            expected_syntax='index:prefix/suffix')
288687
def _unique_id(self, prefix):
        
        _id = self._id_gen
        self._id_gen += 1
        return prefix + str(_id)
132786
def _maybe_remove_pool(cls, pid):
        
        if not len(cls._pools[pid]):
            del cls._pools[pid]
1238407
def delete_prefix(self, key_prefix):
        """"""
        return self.delete(
            key_prefix, range_end=_encode(_increment_last_byte(key_prefix)))
1096924
def clean_prefix(self):
        """"""
        user = self.context.guild.me if self.context.guild else self.context.bot.user
        # this breaks if the prefix mention is not the bot itself but I
        # consider this to be an *incredibly* strange use case. I'd rather go
        # for this common use case rather than waste performance for the
        # odd one.
        return self.context.prefix.replace(user.mention, '@' + user.display_name)
704113
def prefix_del(self, prefix, route_dist=None):
        
        func_name = 'network.del'
        networks = {
            PREFIX: prefix,
        }
        if route_dist:
            func_name = 'prefix.delete_local'
            networks[ROUTE_DISTINGUISHER] = route_dist

            rf, p = self._check_rf_and_normalize(prefix)
            networks[ROUTE_FAMILY] = rf
            networks[PREFIX] = p

        call(func_name, **networks)
975615
def remove_connection(cls, pid, connection):
        
        cls._ensure_pool_exists(pid)
        cls._pools[pid].remove(connection)
1199622
def remove_hash_prefix_indices(self, threat_list, indices):
        """"""
        batch_size = 40
        q = '''DELETE FROM hash_prefix
                WHERE threat_type=? AND platform_type=? AND threat_entry_type=? AND value IN ({})
        '''
        prefixes_to_remove = self.get_hash_prefix_values_to_remove(threat_list, indices)
        with self.get_cursor() as dbc:
            for i in range(0, len(prefixes_to_remove), batch_size):
                remove_batch = prefixes_to_remove[i:(i + batch_size)]
                params = [
                    threat_list.threat_type,
                    threat_list.platform_type,
                    threat_list.threat_entry_type
                ] + [sqlite3.Binary(b) for b in remove_batch]
                dbc.execute(q.format(','.join(['?'] * len(remove_batch))), params)
733109
def shrink_pool(arg, opts, shell_opts):
    
    if not pool:
        print("No pool with name '%s' found." % arg, file=sys.stderr)
        sys.exit(1)

    if 'remove' in opts:
        res = Prefix.list({'prefix': opts['remove'], 'pool_id': pool.id})

        if len(res) == 0:
            print("Pool '%s' does not contain %s." % (pool.name,
                opts['remove']), file=sys.stderr)
            sys.exit(1)

        res[0].pool = None
        res[0].save()
        print("Prefix %s removed from pool '%s'." % (res[0].prefix, pool.name))
    else:
        print("Please supply a prefix to add or remove to '%s':" % (
            pool.name), file=sys.stderr)
        for pref in Prefix.list({'pool_id': pool.id}):
            print("  %s" % pref.prefix)
900464
function removePrefix(str, prefixToken) {
  const index =  str.indexOf(prefixToken);

  if (index > -1) {
    str = str.substr(index + prefixToken.length).trim();
  }
  return str;
}
547529
def delete(self, id, attid): # pylint: disable=invalid-name,redefined-builtin
        
        return self.service.edit(self._base(id), attid)
814472
def parse_prefix(identifier):
    
    pf, id = (), identifier
    if "|" in identifier:
        pf, id = tuple(identifier.split('|')[:-1]), identifier.split('|')[-1]

    return pf, id