delete

Deleting a nested struct with void pointers as members?

I have the following class: class Stack { struct Link { void* data; Link* next; void initialize(void* dat, Link* nxt); }* head; public: void initialize(); void push(void* dat); void* peek(); void* pop(); void cleanup(); }; The pop method is: void* Stack::pop() { if(head == 0) return 0; void* result = hea...

Deleting multiple (not yet loaded) rows in UITableView.

Hi, I'm having a bit of trouble trying to delete rows that haven't been loaded (or not visible) from a UITableview. My setup is as follows - There are two sections in the tableview and each element in section 1 is associated with multiple elements from section two. To give you an example (The data isn't really related to what I'm try...

Need to find a way to programmatically delete undeleteable empty folders

I've got a large folder on an offsite backup machine that gets populated with files by rsync (through deltacopy) every night (running windows xp) from the main work site. I've discovered some annoying folders that cannot be opened, or deleted, or even checked for file sizes. I get the such and such a folder is not accessible, access is d...

How to find/delete a string value in the registry based on its value

Hello, I am trying to write a .reg file that would take a given key, and search for a string value based on its contents, and then delete it. For example: [path] "a"="b" "z"="y" "foo"="bar" And somehow delete the value "foo" by knowing either "bar" or a substring of that. Is this possible? Would I need to do this in a .bat script (wh...

Batch File Deletion

Hi. How am I able to make a batch file with an If not command, such as: 'IF NOT [extension type] Then delete all' in a folder? Thanx. ...

How to detect a directory is in use on Win32?

I need a programmatic way to know if a directory (as opposed to a file) is in use, for example because it is open on explorer or a CMD prompt. If the directory is in use, then it cannot be deleted. The current way I have found to do that is trying to rename it, is there a less intrusive way to do this under Windows? ...

How to delete from multiple tables in MySQL?

I am trying to delete from a few tables at once. I've done a bit of research, and came up with this DELETE FROM `pets` p, `pets_activities` pa WHERE p.`order` > :order AND p.`pet_id` = :pet_id AND pa.`id` = p.`pet_id` However, I am getting this error Uncaught Database_Exception [ 1064 ]: You have ...

How to delete subdirectories

Hello! Lets say a have some path: C:\Temp\TestFolder1\TestFolder2 And I have some template: C:\Temp So i want to write function that will delete all subdirectories by template void DeleteSubdirectories(string tlt, string path) {} If I call this function with given parameters DeleteSubdirectories("C:\Temp", "C:\Temp\TestFolder1\Tes...

improve a mysql query.

I have a query. DELETE FROM A WHERE i NOT IN ( SELECT i FROM B WHERE j = 1 UNION select i from C UNION select i from D ); basically delete all rows in A where field i does not occur in tables B, C or D. If it was just DELETE FROM A WHERE i NOT IN ( SELECT i FROM B ); then that could be done easility with a left join ...

What is the right way to free a std::vector of pointers in C++?

I searched StackOverflow but couldn't find the answer to this question. Suppose I have a std::vector<Day *> vector_day - that is - a vector of pointers to Day object. Now I push_back to vector_day many elements: vector_day.push_back(new Day(12)); vector_day.push_back(new Day(99)); vector_day.push_back(new Day(71)); ... Now at some po...

Deleting entities strategy

In order to keep consistency in the system I can consider 2 deleting strategy: cascade deleting of all entities in relationships; emulating deletion (i.e. nothing is really deleted from DB but, for example, field deleted in the entity has value true and it affects the displaying logic). I like the second approach but I don't know ho...

Batch file to delete specific folders

I need a batch file that will recursively remove all directories with a certain filename. This is what I have so far and its not working. FOR /D /r %%G IN ("*.svn") DO DEL %%G Thanks! ...

has one relationships and deletion in grails

How should i delete the child object in a hasOne relationship in grails for eg: class Face { static hasOne = [nose: Nose] } class Nose { Face face static belongsTo= Face } i tried deleting the child object by two ways 1. face.nose.delete() 2. nose.delete() I always get the same exception Deleted object resaved by cascade in both...

Are there any other keywords that can be accessed using the global namespace scope resolution operator?

The global new and delete can be used like normal, but you can also prefix the :: operator to them and it will work the same. Are there any other keywords that have this same behaviour? Thanks. ...

Codeigniter basic delete help

I have a link that calls this function: function delete($id) { //Delete from database $this->db->delete('messages', array('id' => $id)); $data['delete_message'] = 'Message was successfully deleted'; redirect('admin'); } As you can see I redirect to the admin function, and I want to pass the delete_message to that ...

I want to delete record(s) from child table after calling save/update on parent using hibernate

I want to delete record(s) from child table after calling save/update on parent using hibernate ...

c# - passing multiple methods (delegate?)

I'm trying to develop a framework for several applications we are developing here and one of the framework classes I am trying to build is for creating a database. Ideally, I would have a method where I could pass it the following two methods: CreateDatabaseTables() and ResetDatabaseValues(); For instance, I might have three applicatio...

std::list remove calling delete on pointer?

I ran valgrind on my program because of a segfault I can't figure out. It detected a problem here... Address 0x75c7670 is 0 bytes inside a block of size 12 free'd at 0x4024851: operator delete(void*) (vg_replace_malloc.c:387) by 0x805F6D8: std::list<Object*, std::allocator<Object*>::remove(O bject* const&) (new_allocator.h:95) T...

Hide/Delete a StaticText in wxPython

Hey eveybody, I was wondering how to hide/delete a StaticText in wxPython? thanks, soule ...

Moving Delete icon on UITableView in 'grouped' style into the cell?

I have a UITableView style set to grouped. This works correctly except when in edit mode the 'minus' icon for Deleting a cell isn't within the cell. It's to the left. In the Weather App that icon is in the cell. Anyone know how to fix this? Image here: http://i32.tinypic.com/xclv02.png ...