delete

Problems with SolrPhpClient Delete function

Hi, I am having some trouble deleting documents from Solr index. I use following code: try{ $solr->deleteById('1'); $solr->commit(); $solr->optimize(); }catch (Exception $e){ echo $e->getMessage(); } This code sometimes succeeds, but most of the time the following exception message is retur...

Fastest way of deleting certain keys from dict in Python

Hi Folks, I'm looking for most fastest/effective way of deleting certain keys in a python dict Here are some options for k in somedict.keys(): if k.startswith("someprefix"): del somedict[k] or dict((k, v) for (k, v) in somedict.iteritems() if not k.startswith('someprefix')) Logically first snippet should be faster o...

[Android]how to run a sync process which updates with Google Contacts?

when i deal with deleting a contact using new google api,i got the problem here is my problem Following is the only response : You have to run a sync process, so it updates with Google Contacts, than it will be removed permanently. Check for deleted flag so what should i do to run a sync process which updates with Google Contacts? ...

Does this C# routine to delete all files that are NOT in an array look alright?

I have a DB that contains a list of paths to files. I want to build a routine to cleanup the folders, removing files in the directories if there is not a db record for it (for temp ajax file uploads, in cases where the user doesn't complete the form, etc...). I'm thinking something like this: var dbFiles = db.allPaths(); var allFiles =...

Deleted files not being removed from HDD in Ruby

I'm experiencing a weird situation with deleting files in Ruby, the code seems to report correctly, but the physical file isn't removed from my hard drive. I can do rm path/to/file on the command line - that works. I can even open up the Rails console and File.safe_unlink the file and that also works, it's just within my Rails app it fai...

use vbscript to modify a text file

Every day we get a flat text file. Some days there are lines in the file that need to be deleted before it can be processed. These lines can appear in different places, but always start with the characters 6999 or 7999. We would like to run a script that will delete these particular lines. However, and this is way beyond me, any wher...

How can I unload a dll in order to delete it after a MEF recomposition ?

1) With MEF, I compose my DLL 2) I work with my DLL 3) I recompose without this DLL 4) I want to delete it // => it doesn't work How can I unload a dll in order to delete it after a MEF recomposition in which this dll is not composed ? ...

Google App Engine's remote_api: Deleting all data in django nonrel

I'm using django non-rel (http://www.allbuttonspressed.com/projects/django-nonrel) and am trying to delete all the data in my production's datastore. I was reading the question posed here http://stackoverflow.com/questions/1062540/how-to-delete-all-datastore-in-google-app-engine but the answer wasn't working for me. Is this because I...

Deleting user-defined vectors - C++

Hi, I have 2 classes, say A & B. Class B has a destructor of its own. Within class A, I have a vector of pointers to objects of class B. The vector is as follows: vector<B*> vect; In the destructor for class A, how do I retrieve memory? If I cycle through the vector, do I retrieve each object and use delete on every retrieved object?...

Subversion conflict with a deleted file

I have a file that I have removed from subversion, however in the mean time someone else has updated this file and it now is in conflict. I have spoken to them and we are agreed that it should be deleted. Any ideas how we can stop it being in conflict? ...

How can I prevent Ext JS from including an entity body in DELETE requests using a restful store?

When Ext JS issues a DELETE request from a restful store, it includes an entity body. Although this doesn't seem to be forbidden by the HTTP spec, Google App Engine doesn't accept such requests. So I'd like to know if there is a way to prevent a restful store from including a redundant entity body on DELETE requests. Details: Using thi...

django delete object

Hello, in a mini blog app, i want to create a delete function, so that the owner of the blog can delete his entries (and only his entries). I guess that the only methos for doing do, is using a form. Though my the deletion code seems clear and correct, it doesn;t work. My code: def delete_new(request,id): u = New.objects.get(pk=id).d...

php script to delete files older than 24 hrs, deletes all files

I wrote this php script to delete old files older than 24 hrs but it deleted all the files including newer ones <?php $path = 'ftmp/'; if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { if ((time()-filectime($path.$file)) < 86400) { if (preg_match('/\.pdf$/i', $file)) { ...

Delete in Binary Search tree?

I am reading through the binary tree delete node algorithm used in the book Data Structures and Algorithms: Annotated Reference with Examples on page 34 , case 4(Delete node which has both right and left sub trees), following algorithm described in the book looks doesn't work, probably I may be wrong could someone help me what I am mis...

C++ delete operator confusion

Possible Duplicate: ( POD )freeing memory : is delete[] equal to delete ? char* pChar = new char[10]; delete pChar; // this should not work but it has same effect as // delete[], WHY? // I know this is illegal, but why does it work? ...

C++: Delete this?

Hi, Is it allowed to delete this; if it the delete-statement the last statement that will be executed in that instance of the class? Or is it maybe allowed to delete that instance in a method called at the last statement in that class? Something like: void doStuff() { //blah blah, stuff, you know... delete changeModule(new Ma...

Stupid question about `delete` and pointers

Say we have a piece of code: //... class A //... A* myA = new A(); A* myPointerToMyA = myA; delete myA; delete myPointerToMyA; // this is wrong, no? //... The last line does the exact same thing as the one above it, correct? So I would now be deleteing an invalid/NULL pointer? I understand this may be a stupid question, but still, I ...

SQL: How to refactor this multi-table delete statement

Can anyone suggest a cleaner method to delete rows with a one-to-many relationship in one query? This works, but I'm not very familiar with the using clause or delete, so I don't fully understand how it works. DELETE FROM ip_record, entry using ip_record inner join entry where ip_record.site_id = ? ...

g++ Double Free or corruption...But How??

Hi all, I seem to be having problems with my code and wondered if you guys could help me locate the problem...I have tried using gdb and valgrind, the latter being 'more' useful but still i am unable to fix my bug. Below is my code for my classes (This is my shrunk down version but the main essence of the problem persists): /* Vector....

delete records in axapta damn slow

hi there, i've got a form in ax 2009, showing filtered records of a table ( about 5.000.000 records total, about 1000 shown filtered ). selecting a couple of those records in the form and deleting them via form-control ( alt+f9 ) is damn slow. one record is deleted immediately, selecting about 20 takes several minutes! there is only on...