delete

Mysql - what is the faster way to delete old records

I have a table with about 35 million rows. each has about 35 integer values and one time value (last updated) The table has two indexes primary - uses two integer values from the table columns Secondary - uses the 1st integer from the primary + another integer value. I would like to delete old records (about 20 millions of them) accordi...

Java isn't deleting a file

Java isn't deleting a file. I made sure it has permissions (full control to everyone, or 777 for you Unix-ers.) The System.out.println(currArchive.delete()) always returns false. Does anyone know why? I tried wrapping it with a try-catch security exception but it wasn't thrown. help? I made sure all my streams were closed, but it still r...

DOM element delete promlem i IE6

kindly check the CODE** <html> <head> <title>DOM ADD?REMOVE UL-LI..... NODE DEMO 09/08/2010 </title> <style type="text/css"> ul{margin: 0; padding: 0; left: 20px; width: 90%; border-bottom: solid 1px #d09800; } li{ color: #333 !important; background: white; text-decoration: none; } #menu li{ height:15px;width:90px; cur...

SQL Server DELETE is slower with indexes

I have an SQL Server 2005 database, and I tried putting indexes on the appropriate fields in order to speed up the DELETE of records from a table with millions of rows (big_table has only 3 columns), but now the DELETE execution time is even longer! (1 hour versus 13 min for example) I have a relationship between to tables, and the col...

In C++, what happens when the delete operator is called?

In C++, I understand that the delete operator, when used with an array, 'destroys' it, freeing the memory it used. But what happens when this is done? I figured my program would just mark off the relevant part of the heap being freed for re-usage, and continue on. But I noticed that also, the first element of the array is set to null,...

Does the "delete" statement doubly free an object?

Hello C++/STL gurus: Does the "delete" statement below "doubly free" an object? (...object_list is a global vector<object*>...) vector< object * >::iterator it, eit, iter; object *p_object; vector< object * > dead_objects; it = object_list_.begin(); eit = object_list_.end(); //---collect pointers of all dead objects to d...

Delete Contact Group in Android 2.1

Hi, How can I programatically delete a contact group in Android 2.1? Thanks ...

HTTP DELETE request in CSharp

I'm attempting to do an HTTP DELETE in C# from my code behind and am unable to do this. After looking at the members of the WebRequestMethods.Http type, i'm not even sure that this is possible. Here is my code: try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://localhost/NameFiles/00000.txt"); request.Meth...

Is it safe to delete an object property while iterating over them?

When iterating over an object's properties, is it safe to delete them while in a for-in loop? For example: for (var key in obj) { if (!obj.hasOwnProperty(key)) continue; if (shouldDelete(obj[key])) { delete obj[key]; } } In many other languages iterating over an array or dictionary and deleting inside that is uns...

Modify Django user delete method?

If I go to the Django admin page and delete a user, I want it to run some code before/after it deletes the user. I know about overriding models' delete() methods, but I'm not sure how to apply it to a built-in model. Also, I'd like to be able to do it without 'subclassing' the User model and creating a (for instance) MyUser model. Is t...

How can i scan an entire drive and delete all files (read-only or not) with multiple specific file extension?

hello all, i'm working a feature for a application of mine that on button click it scans the "C:\" drive (and all sub directory's, read-only or not.), and deletes all files with specific file extensions. how would i go about doing this? I'm sure a list or a array would be used... but thats about all i know. Please .Net framework 2.0 ONL...

Delete an Image in iPhoto having the Filename (incl. path)

How I can delete an image (move it into the trash) from applescript by giving the filename and path of the image locate on the drive. This script will be started from the shell and may get the (valid) filename including the path (size or other properties if needed) as parameter. So far I could manage to select the image by name (which ...

Getting Access Denied when trying to view or delete a MySite in SharePoint 2007 Moss

Hello, Im the SharePoint Administrator at my company. When i try to go to someones site to delete it. using this path> Central Administration site > SharedServices1 Home page > User Profiles and Properties > View user profiles. I then select the userid that has the site i wish to delete. Then try to manage Personal site. I then get...

How to delete symbolic links?

I have a script which unzips a whole lot of files under a single directory, some of which are symbolic links. I want to know how to change the script so that, one the unzip has finished, I can get rid of all the symbolic links that were created. ...

How do you `realloc` in C++?

Any ideas how to realloc in C++? It seems to be the missing language language - there is new and delete but not resize! I need it because as my program reads more data, I need to reallocate the buffer to hold it. I don't think deleteing the old pointer and newing a new, bigger one, is the right option. Please enlighten me. Thanks, B...

How do I recursively delete all files in a folder that begin with "._"?

As the title states, I'm trying to recursively delete all files in a folder that begin with ._. For each file on my site, there exists a file with the same exact name, but with ._ appended to it. How do I get rid of these pesky buggers? Thanks! ...

Java - renameTo method not working

I'm trying to use the renameTo method in Java but it just returns false and doesn't move the file. Am I missing a step? Is there a way to find out why it's not moving the file? The delete method doesn't do anything either. Here's my code showing how I'm using it: private void archiveOutputFile(File outputFile) { SimpleDateForm...

can i delete rows from 2 tables in one single SQL statement?

Hi there. I have 2 tables one called "REVIEW" and the other "REVIEW_DESCRIPTION" if i do a join to get all the data from both: SELECT * FROM reviews INNER JOIN reviews_description ON reviews.reviews_id=reviews_description.reviews_id WHERE reviews.customers_id = 54183 based on this i would like to delete rows in both tables that mat...

iPhone Not Deleting the Settings

I have just installed the latest update to the iPhone. I also have deleted my app from the iPhone and noticed that a previous install of my app has left the Settings bundle on my phone after I dis-installed the app. Now, I have a Settings bundle without the related app. This should not be possible as the older version sandbox shou...

Can I call `delete` on a vector of pointers in C++ via for_each <algorithm>?

Suppose I have a std::vector<Obj *> objs (for performance reasons I have pointers not actual Objs). I populate it with obj.push_back(new Obj(...)); repeatedly. After I am done, I have to delete the pushed-back elements. One way is to do this: for (std::vector<Obj *>::iterator it = objs.begin(); it != objs.end(); ++it) { delete *it...