delete

How to Delete a File from a folder using PHP

Hello all, I am currently developing a IMAGE GALLERY site. Every thing is working well and GOOD except a small Problem. For example, if i am deleting a image in the site its deleting successfully from the database and no longer displaying in the gallery. But i need to remove the specific image from the folder. Is there any chance to do...

GDI+ leaks memory when deleting pointers as GdiplusBase*? (C++)

Hi all, I'm trying to work with GDI+ and I'm running into a weird memory leak. I have a vector of GdiplusBase pointers, all of them dynamically created. The odd thing is, though, is that if I try to delete the objects as GdiplusBase pointers, e.g. vector<GdiplusBase*> gdiplus; gdiplus.push_back(new Image(L"filename.jpg")); delete gdiplu...

Inability to delete table cells after a certain point.

I have built an app which has the ability to delete cells from a table, but only if there are more than two cells. If there are two or less cells, it only lets me select them. Any ideas? Here's a video to visualize it: http://slavingia.com/etc/helpme.mov ...

Reason why not to have a DELETE macro for c++

Hi! Are there any good reasons (except "macros are evil", maybe) NOT to use the following macros ? #define DELETE( ptr ) \ if (ptr != NULL) \ { \ delete ptr; \ ptr = NULL; \ } #define DELETE_TABLE( ptr ) \ if (ptr != NULL) \ { \ delete[] ptr; ...

How to delete a workspace in perforce (using p4v)?

Hi, I'm new to perforce and have created a few workspaces as exercises for getting familiar with it. Now I would like to delete some of the workspaces. I just want to get rid of the workspaces so that they do not appear on the drop-down in the workspaces view (DO NOT want to do anything with actual depot files). Googling up an answer ...

Command line argument to Delete all the TFS builds?

Hi folks, i'm using the Build Explorer to delete our project's builds. It's taking forever becuase it's 'timing out' trying to delete the label and drop location (now that the drop location doesn't exist any more). So, I'm hoping to do this via the command line to see if i get more love. Is this possible? ...

MySQL innodb not releasing disk space after deleting data rows from table

I have one mysql datatable of type INNODB, it contains about 2M data rows. When I deleted data rows from the table, it did not release alloted disk space. Is there any way to reclaim disk space from mySQL. I am in a bad sitution, this application is running at about 50 different locations and now problem of low disk space is appearing ...

In SQL, is UPDATE always faster than DELETE+INSERT?

Hello, Say I have a simple table that has the following fields: ID: int, autoincremental (identity), primary key Name: varchar(50), unique, has unique index Tag: int I never use the ID field for lookup, because my application is always based on working with the Name field. I need to change the Tag value from time to time. I'm usin...

How to delete buttons from a XML driven flash template from template monster

I am trying to delete some buttons from a XML drive flash template from template monster. After I delete the button from the XML file I can still see the button in flash and it has the title "Undefined". ...

Deleting keys with subkeys

How I can delete in Windows c++ registry keys with subkeys? RegDeleteKey() doesn't work. ...

Notepad++ Delete Lines with Find & Replace

Does anyone know how to delete a line using Find & Replace in Notepad++ ? In my Find query it finds the proper lines okay: ^.pPrev.$ In the Replace field, I leave it blank thinking the line should deleted (i.e. replaced with nothing), but the newline and endline characters remain. ...

Deleting thing "A" in hibernate does not update objects with collections of "A"

Say you had a Cat, with Kittens. Then you you did a delete() on a kitten that belongs to a Cat. The Cat object still has a reference to the deleted kitten, until the session closes. What's an elegant way to avoid this situation? ...

Deleting pointer sometimes results in heap corruption

I have a multithreaded application that runs using a custom thread pool class. The threads all execute the same function, with different parameters. These parameters are given to the thread pool class the following way : // jobParams is a struct of int, double, etc... jobParams* params = new jobParams; params.value1 = 2; params.value2 ...

How to erase sensitive information from Subversion?

I one of the previous versions of my code, stored in a Subversion repository, there is sensitive information. How to erase it while keeping all other versions? EDIT: The repository is Google Code Project Hosting, so I can't dump and restore the repository =( ...

delete multiple item by checkbox

I want have this ability to select multiple items with checkboxes and delete them in one place this is the code : <% @products.each do |p| %> <%= check_box_tag "product[]" , p.id %> <div class="product_image"> <%= image_tag p.photo.url(:thumb) , :alt => "#{p.name}" %> </div> <%= link_to "<h3>#{p.name}</h3>" , edit_product_path(p) %>...

PHP: Simplest way to delete a folder (including its contents)

The rmdir() function fails if the folder contains any files. I can loop through all of the the files in the directory with something like this: foreach (scandir($dir) as $item) { if ($item == '.' || $item == '..') continue; unlink($dir.DIRECTORY_SEPARATOR.$item); } rmdir($dir); Is there any way to just delete it all at once? ...

Deleting a pointer a different places results in different behaviors (crash or not)

This question is a refinement of this one, which went in a different direction than expected. In my multithreaded application, the main thread creates parameters and stores them : typedef struct { int parameter1; double parameter2; float* parameter3; } jobParams; typedef struct { int ID; void* params; } jobData; s...

Hibernate @ManyToMany delete relation problem

Hello. I have 2 entities: User and UsersList. @Entity @Table(name = "USERS") public class User { @Id @GeneratedValue @Column(name = "ID") private Long id; @ManyToMany(cascade = CascadeType.REMOVE, mappedBy = "users") private List<UsersList> usersLists = new ArrayList<UsersList>(); public List<UsersList> ge...

Create Delete/Edit buttons for muliple records from linq using hidden value?

Hello all, I am using c# .net. aspx form <asp:Table ID="viewV" runat="server"> <asp:TableRow> <asp:TableHeaderCell>Name</asp:TableHeaderCell> <asp:TableHeaderCell>Type</asp:TableHeaderCell> </asp:TableRow> </asp:Table> Code Behind vRepository getV = new vRepository(); var viewAllV = getV....

How can I send the multiple ids to controller in this view ?

Hi I want to send multiple ids that selected with checkboxes to the controller in this code : <% form_for :product do %> <table border="1px"> <tr> <th> Select </th> <th> Image </th> <th> Product Name </th> <th> Product Descripti...