delete

moveRowAtIndexPath: how to delete section once last row is moved to another section

I have a tableview with several sections. I would like to be able to move rows from one section into another and to delete a section once it has no rows. I am trying to do this through moveRowAtIndexPath but the code I have doesn't work and throws an NSRangeException exception. Here is a code sample: - (void)tableView:(UITableView *)ta...

Can I delete a dynamically allocated class using a function within that class?

I'm writing a state manager for a game. I've got most of the logic down for how I want to do this. I want states, which will be classes, to be handled in a stack in the StateManager class. Each state will have pause functions, and the stack will be an STL stack. When a state is done with what it needs to do (example: from the pause scre...

Delete hidden files in Ruby

Does anyone know how to delete all files in a directory with Ruby. My script works well when there are no hidden files but when there are (i.e .svn files) I cannot delete them and Ruby raises the Errno::ENOTEMPTY error. How do I do that ?? Thanks in advance. ...

delete row's in RepeaterControl in ASP.net

hi I show my data with DataReapeter , and I write a code that I can delete data from database with repeater,when I delete data from DataRepeater this record delete from database but I still See that in page.aspx and when I refresh page, that record delete from DataRepeater.it PURPORST : I must refresh page until this record that I dele...

Deleting a read only file using batch file or command

Hi I would like to know a way of deleting a read only file using a batch file or a command. Suppose i have a dll abc.dll and i am trying to delete this dll using the following command in a batch file del "C:\test\abcd.dll". It does not allow me to do that and it throws access denied message. However if i change the read only attribute ...

Removing rows from datatable + AcceptChanges

Hi everybody, I have 2 datatables in my ASP.NET application. I loop though both of them, and if I find a match, I delete that particular row from the outer datatable, lik so: For i As Integer = 0 To dtFixedActs.Count - 1 For j As Integer = 0 To dtTotals.Count - 1 If dtFixedActs.Rows(i).Item("Activity...

NHibernate: How to automatically delete many-to-many associations (cascade)

In my database I've got Users and UserGroups which have a many-to-many relation. The User has a set of UserGroup, the UserGroup domain object does not see the User. <class name="User" table="UserTable"> <set name="UserGroup" cascade="save-update" access="field.pascalcase-underscore" table="User2UserGroup"> <key column="User_...

C++ Linked List Memory Management

I'm attempting to craft my own basic singly linked list in C++ as a learning exercise, and I'm encountering some difficulty in the memory management department. As it stands I have... A 'Node' class: class Node { public: char *value; Node *next; Node(); ~Node(); }; Node::Node() { } Node::~Node() { delete[] value; ...

How can I delete data with specific row number (sqlite)

I have a table people(name, address, phone), my table have 2000+ rows. I want to delete 1000 rows. How's about the query? ...

How to delete empty subfolders with PowerShell

I have a share that is a "junk drawer" for end-users. They are able to create folders and subfolders as they see fit. I need to implement a script to delete files created more than 31 days old. I have that started with Powershell. I need to follow up the file deletion script by deleting subfolders that are now empty. Because of the ...

Deleting files on a remote machine

Is it possible to connect to a remote machine and delete files from it? If not, are there any other approaches that can achieve this task? Quick and dirty suggestions as well as 'proper' approaches are both welcome! One thought is that I could create a service that runs on each machine, implement a method that deletes local files, and ...

sql server 2005 delete all table data in a set [DB].[audit].[tables]

So I have a database with around 100 audit tables and I want to empty them out preferably in 1 sql query. The database has 2 sets of tables [audit] and [dbo]. I'm not even sure what I should be calling these groups of tables so finding any kind of results from google is proving difficult. Any suggestions? ...

I want to leave always one record if table record count = 1 with SQL

I can delete record with this SQL clause DELETE FROM TABLE WHERE ID = 2 Anyway i want to leave always one record if table count = 1 even if "ID=2". Thank you for help already now. ...

Problem deleting multiple rows in an unbound datagridview

Hi: I am a programmer teaching myself C#. I have a project that reads rows from an SQL database and displays them in a datagridview. That part works great. I want to show a subset of these records by deleting every non selected row in the grid. This is the code: foreach (DataGridViewRow row in dataGridView1.Rows) { if (!row.Selected...

Delete using 2 tables join and wheres using subsonic 3

I have 2 tables POST (idpost, user, text) COMMENT (idcomment, idpost, text) i want do delete all comment with post have a user like "usertest" delete from COMMENT c join POST p on c.idpost = p.idpost where p.user like 'usertest' who i make this in subsonic 3??? i try something like this, but, offcourse, don't work hehehehehe COM...

How to use sed to delete a string with wildcards

File1: <a>hello</b> <c>foo</d> <a>world</b> <c>bar</d> Is an example of the file this would work on. How can one remove all strings which have a <c>*</d> using sed? ...

Use sed to delete all leading/following blank spaces in a text file

File1: hello world How would one delete the leading/trailing blank spaces within this file using sed - using one command (no intermediate files)? I've currently got: sed -e 's/^[ \t]*//' a > b For leading spaces. sed 's/ *$//' b > c And this for trailing spaces. ...

LinqDataSource does not support the Select property when the Delete, Insert or Update operations are enabled

Hello, I am getting this error when clicking the Delete button / link in a GridView control LinqDataSource [DataSource] does not support the Select property when the Delete, Insert or Update operations are enabled I don't really understand why I'm getting this error because I have already done the same thing on a different webpage in...

TFS rollback when user deleted file and created new one with same name

Someone (other than myself) accidentally deleted files in TFS and checked it in. He then discovered his error and wanted to replace the lost files, which he did - from his own hard drive. In between his error and my discovery of it, others have made changes to adjacent files. Now, I want to roll the deleted files back to their state befo...

Deleting files from a client machine

Is there a way to delete files on a client computer after they've been uploaded to a server? My web application allows users to upload files to a server and I'm trying to find a way to have the original files deleted from the computer on which they reside. Specifically, the web application provides the user with the ability to delete fi...