discard all reserved articles
775841
public function discardReservations()
    {
        foreach (array_keys($this->_getReservedItems()) as $sArticleId) {
            $this->discardArticleReservation($sArticleId);
        }
        if ($this->_oReservations) {
            $this->_oReservations->delete();
            $this->_oReservations = null;
            $this->_aCurrentlyReserved = null;
        }
    }
940104
def trim(self):
        """"""
        for key, value in list(iteritems(self.counters)):
            if value.empty():
                del self.counters[key]
1067686
public void deleteOld() {

        Iterator<CmsResourceTypeStatResult> iterator = m_results.iterator();
        while (iterator.hasNext()) {
            CmsResourceTypeStatResult res = iterator.next();
            if (isToOld(res)) {
                iterator.remove();
            }
        }
    }
416343
def invalidate(self, context, sid):
		""""""
		
		result = self._Document.get_collection().delete_one({'_id': sid})
		
		return result.deleted_count == 1
516360
public function ClearCacheOnAllAffectedArticles()
    {
        $iStartOperation = time();
        $aArticleRestrictions = $this->GetMLTIdList('shop_article_mlt');
        foreach ($aArticleRestrictions as $sArticelId) {
            TCacheManager::PerformeTableChange('shop_article', $sArticelId);
        }

        $aCategoryRestrictons = $this->GetMLTIdList('shop_category_mlt');
        $databaseConnection = $this->getDatabaseConnection();
        if (count($aCategoryRestrictons) > 0) {
            $quotedCategoryRestrictions = implode(',', array_map(array($databaseConnection, 'quote'), $aCategoryRestrictons));
            $query = "SELECT `shop_article`.`id`
                    FROM `shop_article`
               LEFT JOIN `shop_article_shop_category_mlt` ON `shop_article`.`id` = `shop_article_shop_category_mlt`.`source_id`
                   WHERE `shop_article`.`shop_category_id` IN ($quotedCategoryRestrictions)
                      OR `shop_article_shop_category_mlt`.`target_id` IN ($quotedCategoryRestrictions)
                GROUP BY `shop_article`.`id`
                 ";
            $tRes = MySqlLegacySupport::getInstance()->query($query);
            while ($aRes = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) {
                TCacheManager::PerformeTableChange('shop_article', $aRes['id']);
            }
        }

        if (0 === count($aArticleRestrictions) && 0 === count($aCategoryRestrictons)) {
            TCacheManager::PerformeTableChange('shop_article', null);
        }

        $databaseConnection->update($this->table, array(
            'cache_clear_last_executed' => date('Y-m-d H:i:s', $iStartOperation),
        ), array(
            'id' => $this->id,
        ));
    }
1281165
public void deleteAll() {
		SQLiteDatabase db = this.getWritableDatabase();
		db.delete(TABLE_ARTICLES, null, null);
		db.close();
	}
719249
def clean(self):
        """"""
        terms = list(self)

        for t in terms:
            self.doc.remove_term(t)
254484
def truncate_schema(self):
        

        assert self.server == 'localhost'
        con = self.connection or self._connect()
        self._initialize(con)
        cur = con.cursor()

        cur.execute('DELETE FROM publication;')
        cur.execute('TRUNCATE systems CASCADE;')

        con.commit()
        con.close()

        return
589472
def clear_content(self):
        
        for child in self[:]:
            if child.tag == qn('w:pPr'):
                continue
            self.remove(child)
582852
def discard_config(self):
        """"""
        discard_candidate = 'copy running-config {}'.format(self._gen_full_path(self.candidate_cfg))
        discard_merge = 'copy null: {}'.format(self._gen_full_path(self.merge_cfg))
        self._disable_confirm()
        self.device.send_command_expect(discard_candidate)
        self.device.send_command_expect(discard_merge)
        self._enable_confirm()
377176
def discard(self, value):
        """"""
        # Raise TypeError if value is not hashable
        hash(value)

        self.redis.srem(self.key, self._pickle(value))
474819
def unpublish(self):
        

        self._client._delete(
            "{0}/published".format(
                self.__class__.base_url(
                    self.sys['space'].id,
                    self.sys['id'],
                    environment_id=self._environment_id
                ),
            ),
            headers=self._update_headers()
        )

        return self.reload()
491859
def empty_articles
      type = params[:format]
      Post.where(:disabled => 'Y', :post_type => type).destroy_all

      redirect_to admin_trash_path, notice: I18n.t("controllers.admin.trash.empty_posts.flash.success", type: type)
    end
809145
public function discardMacros(){
		$this->_hasMacros=false;
		$this->_macrosCode=NULL;
		$this->_macrosCertificate=NULL;
	}
237567
def unsubscribe_all(self):
        # type: () -> None
        """"""
        topics = list(self.topics.keys())
        for topic in topics:
            self.unsubscribe(topic)
1011314
def clear(self):
        """"""
        # Adapted from http://stackoverflow.com/a/13103617/1198772
        for i in reversed(list(range(self.extra_keywords_layout.count()))):
            self.extra_keywords_layout.itemAt(i).widget().setParent(None)
        self.widgets_dict = OrderedDict()
404478
public void delete(Article article) {
		SQLiteDatabase db = this.getWritableDatabase();
		db.delete(TABLE_ARTICLES, KEY_ID + " = ?", new String[] {String.valueOf(article.getId())});
		db.close();
	}