delete

Deleting temp files in batch file

Hey guys Just building a batch file to delete temp files on my vista machines @ home that i want to add to task scheduler. i have this so far, but i get alot of access denied, and it never finds a thumbs.db file or index.dat and there are heaps of them. what am i doing wrong? attrib +a -s -h -r "%windir%\Temp\*.*" /s del /f /s /q "%...

Deleting a const pointer

I have a basic question regarding the const pointers. I am not allowed to call any non-const member functions using a const pointer. However, I am allowed to do this on a const pointer: delete p; This will call the destructor of the class which by in essense is a non-const 'method'. Why is this allowed ? Is just to support this: dele...

How to delete many-to-many relationship in Entity Framework without loading all of the data

Does anyone know how to delete many-to-many relationship in ADO.NET Entity Framework without having to load all of the data? In my case I have an entity Topic that has a property Subscriptions and I need to remove a single subscription. The code myTopic.Subscriptions.Remove(...) works but I need to load all subscriptions first (e.g. myTo...

PHP: Delete first four lines from the top in content stored in a variable

I have a variable that needs the first four lines stripped out before being displayed: Error Report Submission From: First Last, [email protected], 12345 Date: 2009-04-16 04:33:31 pm Eastern The content to be output starts here and can go on for any number of lines. I need to remove the 'header' from this data before I display it as ...

IPhone UITableView missing disclosure-button after pressing Delete Button when reusing UITableViewCell

Hi, I've got an iPhone UITableView displaying custom UITableViewCells that display on their right the disclosure-button icon. When I swipe the cell, the disclosure button is automatically replaced by the red "Delete" button. If I press the "Delete" button the row is removed from the table, but then something strange happens. When I scro...

SSIS mismatched Join

I have two sets of data which I need to join, but there is an added problem because the data quality is not great. The two data sets are Calls (phone calls) and Communications (records created about phone calls). They have ID's called call_id and comm_id respectively. The communication records also have call_ids to perform the join. The...

Why should you delete using an HTTP POST or DELETE, rather than GET?

I have been working through Microsoft's ASP.NET MVC tutorials, ending up at this page http://www.asp.net/learn/mvc/tutorial-32-cs.aspx The following statement is made towards the bottom of this page: In general, you don’t want to perform an HTTP GET operation when invoking an action that modifies the state of your web application. ...

NTFS pending delete question

In my apps (VB6 and C# 2008) on Windows 2003 twice now I have seen similar behavior regarding deletion of folders containing files. My code will build some temp folder and generate files in that folder for subsequent processing. Upon processing completion, my code will try to delete the generated temp folder. The delete operation com...

jquery delete array from the textarea

How can I use jQuery to delete the text in the textarea that gets from the input_one when it not checked (one_1 one_3 one_4) ,and when it checked add it into textarea again? The code is below: <div id="input_one"> <input type="checkbox" checked value="one"> <input type="checkbox" checked value="one_1"> <input type="checkbox" valu...

delete[] supplied a modified new-ed pointer. Undefined Behaviour?

I saw some code as below during a peer-code-review session: char *s = new char[3]; *s++ = 'a'; *s++ = 'b'; *s++='\0'; delete []s; // this may or may not crash on some or any day !! Firstly, I know that in Standard C++, pointing to one-past the array-size is O.K. though accessing it results in undefined behaviour. So I b...

delete list item

hi, i have a contact list that i use in a issue list(lookup). When i delete the contact in the contact list is also gone in my already created issue. Someone? thx ...

SQl Delete top 100 from table

I am trying to delete the all but the most recent 3,000 items in a table. The table has 105,000 records. I am trying this, but an error is generated incorrect syntax. delete tRealtyTrac where creation in( select top 103000 from tRealtyTrac order by creation) ...

Faster way to delete matching rows?

I'm a relative novice when it comes to databases. We are using MySQL and I'm currently trying to speed up a SQL statement that seems to take a while to run. I looked around on SO for a similar question but didn't find one. The goal is to remove all the rows in table A that have a matching id in table B. I'm currently doing the follow...

SQL delete loop

I have a table of housing listings. I would like to keep a maximum of 10 listings per city. (Most cities have less than 10 listings). When I do this query: select city, count(city) as cityCount from tREaltyTrac group by city SQL returns: Acampo 1 Acton 1 Adelanto 20 Agua Dulce 1 Aguanga 1 Akron 19 Albany 12 Albion 3 Al...

In Unix, how do you remove everything in the current directory and below it?

I know this will delete everything in a subdirectory and below it: rm -rf <subdir-name> But how do you delete everything in the current directory as well as every subdirectory below it and the contents of all of those subdirectories? ...

Powershell script to delete old files

The following script will delete files in a named directory that are older than 14 days and write to a .txt with the path and the files deleted (found this script on another forum..credit to shay): dir c:\tmp -recurse | where {!$.PsIsContainer -AND $.lastWriteTime -lt (Get-Date).AddDays(-14) } | select LastWriteTime,@{n="Path";e={conver...

C# Linq Delete over Join

Hello, I have a Question table which joins to a Solution table. The solutions are linked to the questions but in order to delete a question, i must delete the solutions for that question first and then delete the question itself. I have a linq query that retrieves all solutions for a specified question however i am unsure how to proceed...

What determines what is written to a C++ pointer when delete is called?

I have a pointer to a given class. Lets say, for example, the pointer is: 0x24083094 That pointer points to: 0x03ac9184 Which is the virtual function table of my class. That makes sense to me. In windbg, everything looks correct. I delete said pointer. Now at 0x24083094 is: 0x604751f8 But it isn't some random garbage, that ...

Delete Duplicate SQL Records

What is the simplest way to delete records with duplicate name in a table? The answers I came across are very confusing. Related: Removing duplicate records from table ...

How can I remove missing files with spaces in svn?

I have this snippet i found. svn status | grep '\!' | awk '{print $2;}' | xargs svn rm It removes all missing files, if I or someone deletes the files manually (via the editor or they are deleted via the system) But my bash coding is not great, what it's missing is that it does not work with files that have spaces in it. svn rm Supe...