delete

ASP.NET MVC - delete a user in default account system?

How does one delete a user from the system in ASP.NET MVC? Is there any facility built in that I'm just not seeing? I have a Customers controller which ties into the default Account controller well for the most part but when it comes to deleting them, deleting from the Customers table isn't enough as the user name is now effectively "r...

Directory.Delete(path, true) always gives error - ASP.NET 3.5 MVC

Hi, I'm using MVC ASP.NET 3.5 and I'm trying to delete a folder with all files within using standard .NET method that I've always used in .NET 2.0. I found this but the first answer doesn't seem to work. I've tried this one try { Directory.Delete(path, true); } catch (IOException) { Thread.Sleep(0); Directory.Delete(path, t...

Is there any way to specify delete permissions in svn?

Some users are committing svn deletes by mistake, and I would like to restrict these accidental deletes, while retaining read/write permissions. Of course, they could overwrite files with zeros, but that doesn't accidentally. I did some googling and found there was a python file that claimed to do this, but as svn has changed sites, the ...

Delete Folders and Containing Files - VB.NET

Hello everyone, I have a really quick question. My program actually downloads a zip file then extracts it onto their desktop. But I need an uninstall feature for it, which is basically deleting multiple folders and containing files. How can I do this in vb.net? Thanks ...

Why does my C++ code fail to delete all nodes in my BST?

This is supposed to traverse a BST and delete every node, including the root node. However, at the end, I get the message "root still has a left node." Why aren't all nodes deleted? void deleteTree() { deleteNode(root); if(root->right) cout << "root still has a right node" << endl; if(root->left) cout <<...

MYSQL mass deletion FROM 80 tables

Hi, I have 50GB mysql data base (80 tables) that i need to delete some contents from it. I have a reference table that contains list if product ids that needs to be deleted from the the other tables. now, the other tables can be 2 GB each, contains the items that needs to be deleted. my question is: since it is not a small database, ...

Hibernate many-to-many delete.

Hello, I have many-to-many relationship in NHibernate between two classes Actor and Movie. public ActionResult removeMovieFromActor(int MovieId, int ActorId) { ViewData["SectionTitle"] = "Usunięcie filmu"; ActorsRepository ar = new ActorsRepository(); Actor act = ar.getActor(ActorId); //what to ...

How can I make my .NET application erase itself?

How can I make my C# app erase itself (self-destruct)? Here's two ways that I think might work: Supply another program that deletes the main program. How is this deleter program deleted then, though? Create a process to CMD that waits a few seconds then deletes your file. During those few seconds, you close your application. Both of ...

What is the syntax for a multi-table delete on a MySQL database using Doctrine?

Using Doctrine, I am trying to delete records in a single table based on data gathered from multiple tables. 'companies_groups' is an association table linking 'companies' to 'groups'. I want to delete all records in this table linked to a specific company, with the restriction that only 'companies_groups' records linked to a 'public' g...

how to keep last n number of line from log file in php

hi i want to delete all lines from old log files and keep fresh 50 lines which is at the bottom plz give me the php code do something like this and if possible can we change the orientation of these lines normal input 111111 2222222 3333333 44444444 5555555 output like 555555 4444444 3333333 22222 111111 to see the fresh log at ...

How to get the number of deleted rows in PostgreSQL?

Hi, I am looking for a way to return the number of rows affected by a DELETE clause in PostgreSQL. The documentation states that; On successful completion, a DELETE command returns a command tag of the form DELETE count The count is the number of rows deleted. If count is 0, no rows matched the condition (this is no...

.obj to .cpp converter?

Is there any .obj to .cpp converter? Is it possible to do it? MICROSOFT VISUAL STUDIO auto-magically deleted my code files when pressed the F5 key. Please help me. i have the .obj files(VS forgot to delete them.ha ha ha). ...

python : file deletion using rm command

I want to make sure that I delete required files. I have code something like dir="/some/path/" file = "somefile.txt" cmd_rm= "rm -rf "+dir + file os.system(cmd_rm) The dir and file values are fetched from a database. How can I make sure I never end up running rm -rf /? What things should I check before doing rm -rf? ...

How to Delete (desired text), delete (undesired text), and paste (desired text) in Vim

I don't know if its a retarded problem but its a funny dilemma. When I want to delete text that I want to place somewhere else, but that place has other bunch of text that I don't want, I would delete that text, but in the process I copy a new clipboard so the previously deleted text disappear. Any suggestions to solve this? ...

why does c++ have its separate syntax for new & delete?

Why can't it just be regular function calls? New is essentially: malloc(sizeof(Foo)); Foo::Foo(); while delete is Foo:~Foo(); free(...); So why does new/delete end up having it's own syntax rather than being regular functions? ...

Is it a good practice to free memory via a pointer-to-const

There are many questions discussing the details of C and C++ dealing with pointer-to-const deletion, namely that free() does not accept them and that delete and delete[] do and that constness doesn't prevent object destruction. What I am interested on is whether you think it is a good practice to do so, not what the languages (C and C++...

Fixing pointers in binary tree delete function (node with 2 children)

Hi, I'm a having a little trouble thinking how the hell do I fix the appropriate pointers when trying to delete a node from a binary tree where that node has 2 children. I understand the basic concept and I'm basically just having trouble fixing the pointers... So, basically, my delete function is mostly done and every case is already...

NHibernate - How to find if a referenced object can be deleted?

I have an object called "Customer" which will be used in the other tables as foreign keys. The problem is that I want to know if a "Customer" can be deleted (ie, it is not being referenced in any other tables). Is this possible with Nhibernate? Thanks ...

How can I opt the user to delete all files in a folder (but no subdirectories)?

I've got a folder path. The folder contains a lot of files as well as some subfolders. I'd like to let the user delete the files (but not the folders) using the standard windows dialog. I'm currently using this code, which deletes the whole folder. Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory ( path, UIOption.AllDial...

How to get the affected rows of the Zend_DB_table?

After you do get the number of rows affected when you do $table->delete($query) does it return the number affected rows?? ...