delete

How can I disable HTTP Methods for Tomcat 5.5.27

Please let me know how can I disable HTTP MEthods like OPTIONS, PUT, DELETE for the web server Apache Coyote HTTP 1.1 Connector (Tomcat 5.5.27) ...

Cannot delete directory with Directory.Delete(path, true)

I'm using .NET 3.5, trying to recursively delete a directory using: Directory.Delete(myPath, true); My understanding is that this should throw if files are in use or there is a permissions problem, but otherwise it should delete the directory and all of its contents. However, I occasionally get this: System.IO.IOException: The direc...

Asp.Net ListView how to delete a row without deleting from datasource

Through CommandName="Delete" I try to delete a line from the ListView control but not from the datasource. On Pressing Delete I expect the webpage to reload and show me the updated ListView(with one line deleted). But nothing changes, the ListView will display the same content after pressing Delete. What do I do wrong? : <asp:ListVi...

How do you delete N files of X type from Y subfolders from a Windows batch file?

I'm trying to write a windows batch file that can delete files from subdirectories. I would rather not hard code the directory structure in, so I can use this process with other projects. I need to delete files of X type I have the parent folder C:\MyProject There are Y subfolders C:\MyProject\? There are N files to delete Is there...

new TXMLDocument in Borland C++ Builder

Is it possible for me to create and destroy a TXMLDocument by myself in Borland C++ Builder? I've tried but borland keeps telling me that TXMLDocument is (and must be) an IDE managed component... Also, the only reason that I want to do this is that TXMLDocument sort of crashes: I get the TXMLDocument and 'Gets' a workbook from it, sets s...

dos : delete is deleting the whole directory instead of individual files

I'm running a simple batch file which is generated by a vbscript to delete individual files, however when I execute it, it is blowing away entire subdirectories. Anyone have any ideas on this? below is the batch file. rem 2008-12-15D:\DP-Production\Administrative\BUSINESS\FileLink del D:\DP-Production\Administrative\BUSINESS\FileLink...

AJAX delete - using jQuery

Hey, I have a simple cart page that displays items that are in someones cart, and having it display via an ASP while from my table. I have a column where a user can delete an entry. I have the ASP working properly, now I am trying to add some AJAX in to it. I have the following code: $("img.delete").click(function() { var id = $('#i...

Physical or Logical Delete of Database Record

What is the advantage of doing a logical delete of a record (i.e. setting a flag stating that the record is deleted) as opposed to actually or physically deleting the record? Is this common practice? Is this secure? ...

LINQ-to-SQL + One-to-Many + DataBinding deleting problem

I use LINQ-to-SQL to load data from a database that has two tables in a one-to-many relationship (one Recipe has many Ingredients). I load a Recipe and LINQ retrieves Ingredient objects into an EntitySet that is binded into a ListBox. If I want to delete some Ingredients off a Recipe, I get a "An attempt was made to remove a relationsh...

How do I delete a file from a c++ app without console window in Windows?

I need do delete a temporary file from my c++ windows application (developed in Borland C++ Builder). Currently I use a simple: system("del tempfile.tmp"); This causes a console window to flash in front of my app and it doesn't look very professional. How do I do this without the console window? ...

About constructors/destructors and new/delete operators in C++ for custom objects.

Suppose I have a Linked List I created myself. It has its own destructor, which frees the memory. This Linked List does not overload new or delete. Now, I'm trying to create an array of said linked lists (open hashing, if I understand correctly). Then I allocate the necessary memory inside the constructor of this open hashing class. The...

to delete or to not delete (call func)

I remember someone saying if you create a class through a lib you should destroy it through the lib. So does this mean i shouldnt call delete? i should call myclass.deleteMe() instead? would overloading delete solve the problem? ...

Is this dynamic memory allocation?

Simple question: do I have to 'delete' or 'delete []' c? Does the language matter? char c[] = "hello" ...

What is the benefit of update instead of doing delete and then Insert in the same table.

Hi, I have a table say example "ABC", I have a row that needs to be stored in to this "ABC" table. I plan to update it instead of doing delete from the table and then insert. What is the impact that this will make on database? In, table level, page level, time, cost and every thing. thanks Thiru ...

Array of structs and new / delete

I have a struct like this: class Items { private: struct item { unsigned int a, b, c; }; item* items[MAX_ITEMS]; } Say I wanted to 'delete' an item, like so: items[5] = NULL; And I created a new item on that same spot later: items[5] = new item; Would I still need to call delete[] to clean this up? Or won't this be needed...

Is there any trivial way to 'delete by date' using ´rm'- in bash?

I noticed today (after ~8 years of happily hacking away at bash) that there is no trivial way to 'delete by date' using ´rm'. The solution is therefore to pipe stuff around a combination of commands like rm, ls, find, awk and sed. Say for example I wanted to delete every file in the working directory from 2009, what would be a typical s...

How can we execute custom method while Cascade="Delete" is being executed ?

For example i have two entities. "RealEstate" and "Picture". RealEstate holds a collection of Picture. In the mapping file RealEstate has a bag in it for Pictures and cascade is Delete". If you delete a RealEstate all the related Pictures will be deleted. But is there any way to execute a custom method to delete the pictures from the we...

C++ lifetime management of encapsulated objects

What is the best approach to encapsulate objects and manage their lifetime? Example: I have a class A, that contains an object of type B and is solely responsible for it. Solution 1, clone b object to ensure that only A is able to clean it up. class A { B *b; public: A(B &b) { this->b = b.clone(); } ~A() ...

C++ calling delete on variable allocated on the stack

Ignoring programming style and design, is it "safe" to call delete on a variable allocated on the stack? i.e. int nAmount; delete &nAmount; or class sample { public: sample(); ~sample() { delete &nAmount;} int nAmount; } ...

How to delete files via FTP when directory has over 100,000 files?

I went to upload a new file to my web server only to get a message in return saying that my disk quota was full... I wasn't using up my allotted space but rather my allotted FILE QUANTITY. My host caps my total number of files at about 260,000. Checking through my folders I believe I found the culprit... I have a small DVD database a...