Deletes a space by ID.
547895
def delete(self, space_id):
        

        try:
            self.space_id = space_id
            return super(SpacesProxy, self).delete(space_id)
        finally:
            self.space_id = None
1062831
public void remove(String ID) {
        String[] stv = TransliteratorIDParser.IDtoSTV(ID);
        // Only need to do this if ID.indexOf('-') < 0
        String id = TransliteratorIDParser.STVtoID(stv[0], stv[1], stv[2]);
        registry.remove(new CaseInsensitiveString(id));
        removeSTV(stv[0], stv[1], stv[2]);
        availableIDs.remove(new CaseInsensitiveString(id));
    }
1366246
def remove_prefix(self, id):
        

        try:
            p = Prefix.get(int(id))
            p.remove()

        except NipapError, e:
            return json.dumps({'error': 1, 'message': e.args, 'type': type(e).__name__})

        return json.dumps(p, cls=NipapJSONEncoder)
42839
protected void removeLocalSpaceDefinition(SpaceID id, boolean isLocalDestruction) {
		final Space space;
		synchronized (getSpaceRepositoryMutex()) {
			space = this.spaces.remove(id);
			if (space != null) {
				this.spacesBySpec.remove(id.getSpaceSpecification(), id);
			}
		}
		if (space != null) {
			fireSpaceRemoved(space, isLocalDestruction);
		}
	}
1241770
def strip_ids(ids, ids_to_strip):
  """"""
  ids = list(ids)
  while ids and ids[-1] in ids_to_strip:
    ids.pop()
  return ids
225119
public void removeScript(int id) throws Exception {
        PreparedStatement statement = null;

        try (Connection sqlConnection = SQLService.getInstance().getConnection()) {
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_SCRIPT +
                    " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setInt(1, id);
            statement.executeUpdate();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
954698
public static void validateSpaceId(String spaceID)
        throws InvalidIdException {
        if (spaceID == null ||
            spaceID.trim().length() < 3 ||
            spaceID.trim().length() > 42) {
            String err = "Space ID must be between 3 and 42 characters long";
            throw new InvalidIdException(err);
        }

        if (!spaceID.matches("[a-z0-9.-]*")) {
            String err = "Only lowercase letters, numbers, periods, " +
                         "and dashes may be used in a Space ID";
            throw new InvalidIdException(err);
        }

        if (spaceID.startsWith(".") || spaceID.startsWith("-")) {
            String err = "A Space ID must begin with a lowercase letter.";
            throw new InvalidIdException(err);
        }

        if (spaceID.matches("[0-9]+[a-z0-9.-]*")) {
            String err = "A Space ID must begin with a lowercase letter.";
            throw new InvalidIdException(err);
        }

        // This rule is required to conform with the spec for a URI host name,
        // see RFC 2396.
        if (spaceID.matches("[a-z0-9.-]*[.][0-9]+[a-z0-9-]*")) {
            String err = "The last period in a Space ID may not be " +
                         "immediately followed by a number.";
            throw new InvalidIdException(err);
        }

        if (spaceID.endsWith("-")) {
            String err = "A Space ID must end with a lowercase letter, " +
                         "number, or period";
            throw new InvalidIdException(err);
        }

        if (spaceID.contains("..") ||
            spaceID.contains("-.") ||
            spaceID.contains(".-")) {
            String err = "A Space ID must not contain '..' '-.' or '.-'";
            throw new InvalidIdException(err);
        }

        if (spaceID.matches("[0-9]+.[0-9]+.[0-9]+.[0-9]+")) {
            String err = "A Space ID must not be formatted as an IP address";
            throw new InvalidIdException(err);
        }
    }
566079
def _delete_whitespace(self):
        """"""
        while isinstance(self._lines[-1], (self._Space, self._LineBreak,
                                           self._Indent)):
            del self._lines[-1]
1018720
def remove(cls, id):
        

        api = Client.instance().api
        api.index(id).delete()
968810
protected function deleteInternal()
    {
        if ($this->table === null || $this->id_field === null) {
            return;
        }

        $id_field = new SwatDBField($this->id_field, 'integer');

        if (!property_exists($this, $id_field->name)) {
            return;
        }

        $id_ref = $id_field->name;
        $id = $this->$id_ref;

        if ($id !== null) {
            $ns_array = $this->getCacheNamespaces();

            SwatDB::deleteRow(
                $this->db,
                $this->table,
                $id_field->__toString(),
                $id
            );

            $this->flushCacheNamespaces($ns_array);
        }
    }
174568
private function cleanup(): void
    {

        CharacterBlueprint::where('character_id', $this->getCharacterId())
            ->whereNotIn('item_id', $this->cleanup_ids->flatten()->unique()->all())
            ->delete();
    }
1329883
def destroy(cls, *ids):
        
        for pk in ids:
            cls.find(pk).delete()
        cls.session.flush()
19942
def delete_event(self, id, **data):
        
        
        return self.delete("/events/{0}/".format(id), data=data)
387
def delete(self, id):
        ''''''
        if not self._item_path:
            raise AttributeError('delete is not available for %s' % self._item_name)
        target = self._item_path % id
        self._redmine.delete(target)
        return None
1317953
def delete(self, id):
        
        try:
            response = yield self.client.delete(id)

            if response.get("n") > 0:
                self.write({"message": "Deleted %s object: %s" % (self.object_name, id) })
                return

            self.raise_error(404, "Resource not found")

        except InvalidId as ex:
            self.raise_error(400, message="Your ID is malformed: %s" % id)
        except:
            self.raise_error()

        self.finish()
1306507
def drop_space(self):
        ''''''
        cur = self._conn.cursor()
        cur.executescript(DROP_SQL_MODEL)
        self._conn.commit()
        cur.close()
        return
632231
def delete_horizontal_space(event):
    "  "
    buff = event.current_buffer
    text_before_cursor = buff.document.text_before_cursor
    text_after_cursor = buff.document.text_after_cursor

    delete_before = len(text_before_cursor) - len(text_before_cursor.rstrip('\t '))
    delete_after = len(text_after_cursor) - len(text_after_cursor.lstrip('\t '))

    buff.delete_before_cursor(count=delete_before)
    buff.delete(count=delete_after)