delete

Python3 - Deleting dirs after finishing a commando prompt

I have a python script that ends with running a program (iexpress.exe) in a dos prompt. The program that runs in dos prompt, uses a dir called workdir. After the program has finished in the dos prompt I would like python to delete the dir. I have just made a simple solution of putting a delay of 30sec: time.sleep(30) removeall(workdir)...

Deleting SQLite rows automatically/periodically

Hi guys! So, i have a application that displays tasks and i created an option in the Settings menu that lets you choose in how many days all (Never, 10 days, 20 days or 30 days) these tasks should be automatically deleted. So when i open up the app there will be a method that will be called and check if theres any tasks to be deleted. I...

linux new/delete, malloc/free large memory blocks

Hi folks, We have a linux system (kubuntu 7.10) that runs a number of CORBA Server processes. The server software uses glibc libraries for memory allocation. The linux PC has 4G physical memory. Swap is disabled for speed reasons. Upon receiving a request to process data, one of the server processes allocates a large data buffer (usin...

Delete rectangle using .NET?

Can I delete the old rectangle which I have drawn and draw a new rectangle? private void panel1_MouseClick(object sender, MouseEventArgs e) { Graphics g = this.panel1.CreateGraphics(); Pen pen = new Pen(Color.Black, 2); g.DrawRectangle(pen, 100,100, 100, 200); g.dispose(); } ...

Select and delete selected

I am programming something like e-mail for my users. I want to allow people to select letters and delete selected. How can I do it? I can't imagine how can I do it only with one MySQL query. Is it even possible? ...

Iframe height issue

I have an iframe loaded with dynamic datas.The page doesn't contains a postback.While deleting datas from this page its heights are not decreasing.Why is it so?? ...

Reallocating memory via "new" in C++

Quick question regarding memory management in C++ If I do the following operation: pointer = new char [strlen(someinput_input)+1]; And then perform it again, with perhaps a different result being returned from strlen(someinput_input). Does this result in memory being left allocated from the previous "new" statement? IE, is each new ...

PHP Delete Confirmation Message

Hello, I am working on the page that will display a button for delete. Here I want some help from Javascript. If that delete button is pressed, a message box should appear asking if the user is sure to delete the record. If the user presses Yes then the delete.php is working . If the user presses No then the user should stay in the sam...

How do I delete a [sub]hash based off of the keys/values of another hash?

Lets assume I have two hashes. One of them contains a set of data that only needs to keep things that show up in the other hash. e.g. my %hash1 = ( test1 => { inner1 => { more => "alpha", evenmore => "beta" } }, test2 => { inner2 => { more => "charlie", somethingelse => "delta" } }, test3 => { inner9999 => { oh...

malloc and delete in C++, opinions

In C++ using delete to free memory obtained with malloc() doesn't necessarily cause a program to blow up. Do you guys think a warning or perhaps even an assertion failure should be produced if delete is used to free memory obtained using malloc()?? Why do you think that Stroustrup did not had this feature on C++? ...

c++ overloading delete, retrieve size

Hi, I am currently writing a small custom memory Allocator in c++, and want to use it together with operator overloading of new/delete. Anyways, my memory Allocator basicall checks if the requested memory is over a certain threshold, and if so uses malloc to allocate the requested memory chunk. Otherwise the memory will be provided by s...

Delete a header in PHP

To allow caching a PHP generated file, I want to make sure, that the 'Pragma: no-cache' header is not set. However, how do I delete a possibly already set header? That is, it could be possible, that somewhere in the code someone wrote header('Pragma: no-cache'); and now I want to make sure, the header is not sent. Is it sufficient to d...

Mysql bulk delete problem

Hello, Anybody can help me with this mysql query: delete from generic__campaings_included where dealer_id not in ('2,3,4') and campaing_id = '1' When i execute this query i didnt get normal result. Exceot 2 (dealer_id) all rows deleted. How can i use "not in" with "and" operator? PS. Sorry for my english) ...

Android - read and delete new SMS of a specific sender only

I'm trying to write the next function: 1) Send SMS to a service number 2) Read the response SMS content (the service's auto sent-back message that tells me if I succeed/failed to turn on the service) 3) Delete the service's auto-sent SMS I know how to do the first step, and I should be able to do the second with both: getMessageBody...

Secure Delete PCI-DSS Windows Environment

Hello, I have been reviewing a number of applications for securing deleting files. I understand the concepts of overwriting the file several times with zeros and random characters; however, I don't understand the concept of renaming the file up to thirty times before actually deleting the file. Any feedback would greatly be appreciated....

cakephp delete single row from HABTM join table

Hello, I've got model that use ExtendAssociations, but for some reason deleteHABTM doesn't seem to work on some models (no idea :/). Is there an easy way to just delete a single row from the join table? Regards, Paul ...

C# Sql Server 2005 Bulk XML Delete?

I know you can do bulk XML inserts into SQL Server 2005 tables from your C# code using datasets/datatables. Is it possible to do the same but as a delete? ...

Am I deleting this properly?

I have some struct: struct A { const char* name_; A* left_; A* right_; A(const char* name):name_(name), left_(nullptr), right_(nullptr){} A(const A&); //A(const A*);//ToDo A& operator=(const A&); ~A() { /*ToDo*/ }; }; /*Just to compile*/ A& A::operator=(const A& pattern) { //check for self-assignment if (this ...

Matching and deleting items in list of tuples

I have a list of tuples, say [{x, a, y}, {x, b, y}]. Is there a built-in function (or can I use a combination of BIFs) to delete all tuples matching {x, _, y}, as in match and delete based on the first and third term in the tuples, ignoring the second? ...

Override delete behaviour in NHibernate

Hi all In my application users cannot truly delete records. Rather, the record's Deleted field gets set to 1, which hides it from selects. I need to maintain this behaviour and I'm looking into whether NHibernate is appropriate for my app. Can I override NHibnernate's delete behaviour so that instead of issuing DELETE statements, it is...