mark sheet as destroyed
 DELETE /question_sheets/1
967101
def destroy
      @question_sheet.destroy
      
      respond_to do |format|
        format.html { redirect_to admin_question_sheets_path }
        format.xml  { head :ok }
      end
    end
844131
def destroys(self, i=0):
        
        regs = {'a', 'b', 'c', 'd', 'e', 'f', 'h', 'l', 'i', 'ixh', 'ixl', 'iyh', 'iyl', 'sp'}
        top = len(self)
        result = []

        for ii in range(i, top):
            for r in self.mem[ii].destroys:
                if r in regs:
                    result.append(r)
                    regs.remove(r)

            if not regs:
                break

        return result
1020182
def afterExecSheet(self, sheet, escaped, err):
        ''
        if not self.currentActiveRow:  # nothing to record
            return

        if err:
            self.currentActiveRow[-1] += ' [%s]' % err

        if isLoggableSheet(sheet):  # don't record jumps to cmdlog or other internal sheets
            # remove user-aborted commands and simple movements
            if not escaped and isLoggableCommand(self.currentActiveRow.keystrokes, self.currentActiveRow.longname):
                self.addRow(self.currentActiveRow)
                if options.cmdlog_histfile:
                    if not getattr(vd(), 'sessionlog', None):
                        vd().sessionlog = loadInternalSheet(CommandLog, Path(date().strftime(options.cmdlog_histfile)))
                    append_tsv_row(vd().sessionlog, self.currentActiveRow)

        self.currentActiveRow = None
579642
def destroy
      result = resource_get.destroy
      call_hook :after_destroy, result
      flash[:notice] = t 'messages.record_destroyed', model: t("models.#{resource_name}")

      respond_to do |wants|
        wants.html { redirect_to(resources_path) }
        wants.json  { head :ok }
      end
    end
1354422
public function unsetWorksheetCells() {
		//	Because cells are all stored as intact objects in memory, we need to detach each one from the parent
		foreach($this->_cellCache as $k => &$cell) {
			$cell->detach();
			$this->_cellCache[$k] = null;
		}
		unset($cell);

		$this->_cellCache = array();

		//	detach ourself from the worksheet, so that it can then delete this object successfully
		$this->_parent = null;
	}
1064465
def destroy(self, scriptid, params=None):
        ''' 
        '''
        params = update_params(params, {'SCRIPTID': scriptid})
        return self.request('/v1/startupscript/destroy', params, 'POST')
182388
public function unsetWorksheetCells()
    {
        // Because cells are all stored as intact objects in memory, we need to detach each one from the parent
        foreach ($this->cellCache as $k => &$cell) {
            $cell->detach();
            $this->cellCache[$k] = null;
        }
        unset($cell);

        $this->cellCache = array();

        //    detach ourself from the worksheet, so that it can then delete this object successfully
        $this->parent = null;
    }
60552
def delete(self):
        
        urls = self.selected_urls()
        rep = QtWidgets.QMessageBox.question(
            self.tree_view, _('Confirm delete'),
            _('Are you sure about deleting the selected files/directories?'),
            QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
            QtWidgets.QMessageBox.Yes)
        if rep == QtWidgets.QMessageBox.Yes:
            deleted_files = []
            for fn in urls:
                try:
                    if os.path.isfile(fn):
                        os.remove(fn)
                        deleted_files.append(fn)
                    else:
                        files = self._get_files(fn)
                        shutil.rmtree(fn)
                        deleted_files += files
                except OSError as e:
                    QtWidgets.QMessageBox.warning(
                        self.tree_view, _('Delete failed'),
                        _('Failed to remove "%s".\n\n%s') % (fn, str(e)))
                    _logger().exception('failed to remove %s', fn)
            self.tree_view.files_deleted.emit(deleted_files)
            for d in deleted_files:
                debug('%s removed', d)
                self.tree_view.file_deleted.emit(os.path.normpath(d))
1074457
def destroy(self):
        """"""
        self._refresh_connection()

        self.push_queue = []
        index_name = self.document_class()._get_index()  # pylint: disable=protected-access
        connections.get_connection().indices.delete(index_name, ignore=404)

        self._mapping_created = False
1067716
def cleanup(args):
    
    with _catalog(args) as cat:
        n, d, r = len(cat), [], []
        for obj in cat:
            if not obj.bitstreams:
                if obj.is_special:
                    print('removing {0} from catalog'.format(obj.id))
                    r.append(obj)
                else:
                    print('deleting {0} from CDSTAR'.format(obj.id))
                    d.append(obj)
        for obj in d:
            cat.delete(obj)
        for obj in r:
            cat.remove(obj)
        args.log.info('{0} objects deleted'.format(n - len(cat)))
        return n - len(cat)
84396
function(name) {
        if (this._dpads[name]) {
            for (var d in this._dpads[name].parsedDefinition) {
                this._dpads[name].parsedDefinition[d].input.destroy();
            }
            delete this._dpads[name];
            Crafty.trigger("ControlDestroyed", { type: "Dpad", name: name });
        }
    }
524506
def delete(ctx, archive_name):
    '''
    
    '''

    _generate_api(ctx)
    var = ctx.obj.api.get_archive(archive_name)

    var.delete()
    click.echo('deleted archive {}'.format(var))
1073485
function() {
			_.each(window.app.Todos.completed(), function(todo){ todo.destroy(); });
			return false;
		}
1045311
def _destroy(self, target_position_groups):
        """"""
        target_position_groups = list(target_position_groups)  # work on a copy
        destroyed_tile_groups = list()
        blank = Tile.singleton('.')
        a = self._array
        while target_position_groups:  # continue as long as more targets exist
            # delay actual clearing of destroyed tiles until all claiming
            # groups have been stored (e.g. overlapping matches, bombs)
            clear_after_storing = list()
            new_target_position_groups = list()
            for target_position_group in target_position_groups:
                destroyed_tile_group = list()
                for target_position in target_position_group:
                    target_tile = a[target_position]
                    # no handling for blanks that appear in destruction
                    if target_tile.is_blank():
                        continue
                    destroyed_tile_group.append(target_tile)
                    clear_after_storing.append(target_position)
                    # skull bombs require further destructions
                    if target_tile.is_skullbomb():
                        new_positions = self.__skullbomb_radius(target_position)
                        # convert individual positions to position groups
                        new_position_groups = [(new_position,) for new_position
                                               in new_positions]
                        new_target_position_groups.extend(new_position_groups)
                if destroyed_tile_group:
                    destroyed_tile_groups.append(destroyed_tile_group)
            # Finally clear positions after all records have been made
            for position in clear_after_storing:
                a[position] = blank
            # Replace the completed target position groups with any new ones
            target_position_groups = new_target_position_groups
        return destroyed_tile_groups
775073
function destroy() {
		var i,
			parentNode = container && container.parentNode;

		// If the chart is destroyed already, do nothing.
		// This will happen if if a script invokes chart.destroy and
		// then it will be called again on win.unload
		if (chart === null) {
			return;
		}

		// fire the chart.destoy event
		fireEvent(chart, 'destroy');

		// remove events
		// PATCH by Simon Fishel
        //
        // use event namespacing to avoid creating a circular reference
        // TODO: would be better to not rely on jQuery's event namespacing here
        //       since this code is no longer agnostic to the event library
        //
        // - removeEvent(win, 'unload', destroy);
        //
        // + removeEvent(win, '.' + containerId);
        
        removeEvent(win, '.' + containerId);
        
		removeEvent(chart);

		// ==== Destroy collections:
		// Destroy axes
		i = axes.length;
		while (i--) {
			axes[i] = axes[i].destroy();
		}

		// Destroy each series
		i = series.length;
		while (i--) {
			series[i] = series[i].destroy();
		}

		// ==== Destroy chart properties:
		each(['title', 'subtitle', 'seriesGroup', 'clipRect', 'credits', 'tracker'], function (name) {
			var prop = chart[name];

			if (prop) {
				chart[name] = prop.destroy();
			}
		});

		// ==== Destroy local variables:
		each([chartBackground, legend, tooltip, renderer, tracker], function (obj) {
			if (obj && obj.destroy) {
				obj.destroy();
			}
		});
		chartBackground = legend = tooltip = renderer = tracker = null;

		// remove container and all SVG
		if (container) { // can break in IE when destroyed before finished loading
			container.innerHTML = '';
			removeEvent(container);
			if (parentNode) {
				parentNode.removeChild(container);
			}

			// IE6 leak
			container = null;
		}

		// memory and CPU leak
		clearInterval(tooltipInterval);

		// clean it all up
		for (i in chart) {
			delete chart[i];
		}

		chart = null;
	}
170147
def delete(login):
    '''
    
    '''
    if login in list_users(False):
        res = __salt__['cmd.run_all'](
            'pdbedit --delete {login}'.format(login=_quote_args(login)),
        )

        if res['retcode'] > 0:
            return {login: res['stderr'] if 'stderr' in res else res['stdout']}

        return {login: 'deleted'}

    return {login: 'absent'}
663074
async function dropWorksheet(sheetId, worksheetId) {
    let response = await executeRequest('drop_worksheet', {
        sheetId: sheetId,
        worksheetId: worksheetId
    });

    cache.clear();
    return response;
}