delete

how to securely delete files in java

How do I securely delete files in java? I tried the code at javafaq.nu, but the problem is you can't actually delete the file on windows once it has been mapped due to this bug. Then I tried just using sysinternals sdelete on windows, but you have to click a usage agreement the first time you use it which I want to avoid. ...

What is the array form of 'delete'? (C++)

When I compiled a code using the array name as a pointer, and I deleted the array name using delete, I got a warning about deleting an array without using the array form (I don't remember the exact wording). the basic code was: int data[5]; delete data; so whats the array form of delete? ...

Deleting from a subsonic collection bound to a winforms datagridview

I have a winforms application that i added a DataGridView bound to a subsonic collection via a BindingSource to it. The grid works fine for adding/editing (except for the display of the ComboBox column) but i can't get it to delete rows correctly from the database. If i delete a row from the DataGridView, i can't problematically determ...

Delete all records from a table

How can I delete all records from a table using SubSonic? The Delete method has three overloads, but each one expects some parameters. And how can I delete records using a query (e.g. delete all records where column1 > 100) ...

Quickest way to delete enormous MySQL table

I have an enormous MySQL (InnoDB) database with millions of rows in the sessions table that were created by an unrelated, malfunctioning crawler running on the same server as ours. Unfortunately, I have to fix the mess now. If I try to truncate table sessions; it seems to take an inordinately long time (upwards of 30 minutes). I don't c...

C++ std::vector of pointers deletion and segmentation faults

Hello all, I have a vector of pointers to a class. I need to call their destructors and free their memory. Since they are vector of pointers vector.clear() does not do the job.So I went on to do it manually like so : void Population::clearPool(std::vector<Chromosome*> a,int size) { Chromosome* c; for(int j = 0 ;j < size-1;j++) ...

MS-ACCESS: deleting all rows execpt for top 1 and updating a table from a query.

I'm almost done with this, just a few last hiccups. I now need to delete all records from a table except for the top 1 where readings_miu_id is the "DISTINCT" column. In other words words i need to delete all records from a table other than the first DISTINCT readings_miu_id. I am assuming all i need to do is modify the basic delete stat...

Removing Brackets and Text in Crystal

I am using this following text to delete brackets and text inside the brackets; I need to go threw the entire memo field and it stops after it finds and deletes the first set of brackets and text. if right({table.col},1) = "]" then left({table.col},instr({table.col},"[")-1) else {table.col} Any suggestions... ...

MySQL query to delete rows whose dates are close to another row

I've got a table containing many rows. The rows are guaranteed to have been inserted in order of a column called created_on, which is a datetime column. If a given row has a created_on time within 5 seconds of an existing row, I'd like to delete the given row. How would I write a query to delete those rows? ...

Batch file which deletes a file which last modification was not today

I just wanna know: How can i delete 'log.txt' if the last modification was not today? With a batch file. I'm just talking here about 1 FILE! ...

Hibernate: Delete where record field < getdate()

I'm having trouble figuring out how to delete a set of records when a particular field is less than the date on the sql server without using tables or field names. Since I'm using MSSQL the query would look something like this: DELETE FROM tickets WHERE expires < getdate() How would I go about getting Hibernate to do this? I'm lookin...

Which should I use in my delete action: user.delete or user.destroy?

I find it confusing that there is an ActiveRecord delete as well as destroy. In my Controller I want to delete a user in my delete action. The result would be that this instance represented by the User model no longer exists in the database. Which method should I use for this? ...

Postgresql: deleting rows with column that references the same table takes bizzare amount of time

Sorry for a pretty specific question. I have a table (see bottom), and when I try to delete a lot of records from it, my PostgreSQL 8.2.5 spends 98% of the time doing the parent-child constraint. I'm trying to figure out what index should I add to make it go fast. I have to say that all columns on this table have either 0 or null as the...

TFS : how to programatically detected deleted files?

Hi; In Team Foundation, you can ask Team Explorer to show deleted files by doing this: Tools > Options > Source Control > Visual Team Foundation Server > Show deleted items in the Source Control Explorer. My question is how do you do the same thing programatically? I am developing a synchronisation tool, and I need to detec...

Deleting a heap then dereferencing a pointer to that memory

This is code from an exercise: #include <iostream> using namespace std; int main() { int n = 13; int* ip = new int(n + 3); int* ip2 = ip; cout << *ip << endl; delete ip; cout << *ip2 << endl; cout << ip << tab << ip2 << endl; } When the space allocated to the int on the heap is deleted, I thought that dere...

Why does "delete node;" crash my C++ linked list application?

The jDeleteAfter method of my linked list class is supposed to delete the node immediately following the node passed as an argument. If it is doing that, I do not know, but it is abruptly closing my console application when "delete tlp;" (Temp List Pointer) gets read. My instructor, the users of a programming forum and I have yet to de...

Deleted Rows Remain in my Data Context Unless I Initialize It Again

I have a datacontext say myDataContext, it has on several classes (tables) and stored procedures, one of which deletes directly from the database (the logic requires this), however, the deleted rows remain in my myDataContext unless I initialize it again. Is there a way to avoid this? The stored procedure removes the record from the data...

Order of Hibernate delete queries

Hello everybody Here is my data model (simplified) public class AddressBook { private List<Group> groups = new ArrayList<Group>(); private List<People> peoples = new ArrayList<People>(); @OneToMany(mappedBy = "addressbook", cascade = CascadeType.ALL, fetch = FetchType.LAZY) @OnDelete(action = OnDeleteAction.CASCADE) @Cascade(org....

Entity Deletion Strategy

Say you have a ServiceCall database table that records down all the service calls made to you. Each of this record contains a many to one relationship to Customer record, where it stores which customer made the Service Call. Ok, suppose the Customer has stop doing business with you and you do not need the Customer's record in your datab...

What is a unix command for deleting the first N characters of a line?

For example, I might want to: tail -f logfile | grep org.springframework | <command to remove first N characters> I was thinking that 'tr' might have the ability to do this but I'm not sure. Thanks in advance stackoverflow geniuses! -- LES ...