FAQ Database Discussion Community


Adding modify and delete to insert trigger

sql-server,triggers,insert,delete,dml
Good morning everyone, I've been tasked with pushing records from one table (T1) to another (T2). I have the insert portion complete as follows: CREATE TRIGGER [dbo].[CP_to_TW2] ON [dbo].[TEST_PROJ] FOR INSERT AS BEGIN INSERT INTO dbo.TEST_TW (PROJECT_ID,PROJECT_DESC,PROJECT_MANAGER) SELECT PROJ_ID,PROJ_ID+PROJ_NAME,PROJECT_MANAGER FROM inserted END TEST_PROJ is T1 and TEST_TW is T2. The...

Update and delete, with value typed, in MySQL using Python

python,mysql,delete,mysql-python,value
I am trying to update and delete a row of a field, which row has a name same as the value typed, from a MySQL database. I am using python 2.7 and MySQLdb. Here is the part of the script: Value = int(input("Type a number between 1 and 10: "))...

Inner join on delete query is that bad?

c#,mysql,delete,inner-join,sql-delete
I'm currently trying to delete a row from a MySQL table using C#. I have two very basic tables: 'head_doc' and 'Doc_details'. Head_doc contains a field called id_doc. Doc_details has also a field called id_doc and various other fields. I'm trying to delete all of the details within Doc_details for...

Linux/shell - Remove all (sub)subfolders from a directory except one

linux,delete,find,folder,rm
I've inherited a structure like the below, a result of years of spaghetti code... gallery ├── 1 │   ├── deleteme1 │   ├── deleteme2 │   ├── deleteme3 │   └── full │   ├── file1 │   ├── file2 │   └── file3 ├── 2 │   ├── deleteme1 │   ├── deleteme2 │   ├── deleteme3 │  ...

swipe to delete javascript

javascript,mobile,delete,swipe
I am working on a function that will delete a div when you swipe it left... Here is a div that I would like to delete when it is swiped: <div class="listItem">Stuff here</div> I have javascript to determine where on the page I have swiped by using the touchstart and...

Delete query with conditions in NotORM

pdo,delete,notorm
How can I implement the below query using pdo notorm? mysql_query("DELETE FROM table WHERE (down-up)>=some value AND id=$id"); I know the below statement will delete the selected row with id of value $id. But I am confused on, how can I check the condition, "(down-up)>=some value" in my delete statement....

node remove a directory after gzipping it

node.js,delete,gzip
I got the following code from SO to gzip a directory: fstream.Reader({'path':'mydir','type':'Directory'}).pipe(tar.Pack()).pipe(zlib.Gzip()).pipe(fstream.Writer({'path': 'mygz.tar.gz'})); And to delete a directory: rm_rf('mydir',function(error){}); I need to put them together, so that I can gzip a dir and delete the original directory. To do this, I need to find a way to listen to the...

Batch file to delete files with relative name contained in text list?

batch-file,delete
I need a bat to delete all files with the RELATIVE name contained in a text file In the files directory the files are named like: 1_a.jpg 1_b.jpg 1_c.jpg 2_a.jpg 3_a.jpg 3_b.jpg In the file list to delete the RELATIVE name is 2 3 I want to delete all files...

How to delete images from our app?

android,bitmap,delete
I am using certain bitmaps in my app which I am storing in the Drawable folder. When the user uses these bitmap in some kind, I want those bitmaps to be deleted. How shall I Implement this without using any kind of databases? Thanks in advance. Edit: I came to...

C++ delete key from registry HKEY_LOCAL_MACHINE

c++,visual-studio,delete,registry
I want to make uninstaller which should delete registry key from HKEY_LOCAL_MACHINE. Problem is that every time when i try delete location get LASTERROR 2, which is usually wrong name. HKEY hKey = HKEY_LOCAL_MACHINE; LSTATUS deletes = SHDeleteKey(hKey, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\NameOfApp\\"); if (deletes == ERROR_SUCCESS) { return true; } I have same...

“The DELETE statement conflicted with the REFERENCE constraint” while there is no data in referenced table

sql,sql-server,delete,foreign-key-relationship
I have two related tables: [GameDataGroup] with PK [Arena_GameData] with FK I try to execute query: DELETE FROM [ACP_MAIN_STABLE_DB_content].[dbo].[GameDataGroup] WHERE [key] LIKE '%' + '_test_group' + '%' And have a message: The DELETE statement conflicted with the REFERENCE constraint "FK__Arena_GameData__GameDataGroup". The conflict occurred in database "ACP_MAIN_STABLE_DB_content", table "dbo.Arena_GameData", column 'gameDataGroupId'....

Delete item “Object required” excel VBA

excel,vba,excel-vba,dynamic,delete
I understand what the problem is, but i don't have a clue on how to solve it... So what I am doing is that I click on a button (addSceneButton) in my worksheet("costing") and it is going to insert a copy of another sheet("Scene Template") just above of the...

Delete from aliased table doesn't work (but select does)

sql-server,delete,alias
I need to delete some rows from a table which are not available in another similar table. I can correctly select the rows to be deleted using this piece of code SELECT * FROM [DB01].[forward].[forward_value] as DB01 WHERE Id_forward like 'test' and NOT EXISTS (SELECT * FROM [DB02].[db_marketdata].[forward].[forward_value] as DB02...

Delete File from Jlist

java,swing,file,delete,jlist
Don't know what I'm doing wrong here. I'm trying to delete the selected file from my directory but it's only deleting it from the list. Thanks private void deletecustButtonActionPerformed(java.awt.event.ActionEvent evt) { DefaultListModel model = (DefaultListModel) customerList.getModel(); int selectedIndex = customerList.getSelectedIndex(); File customer = new File("Customers/" + selectedIndex); if (selectedIndex !=...

AngularJs - Delete dynamic generated data?

json,angularjs,sorting,dynamic,delete
I have a problem with my delete function ! As long as I delete data which comes from my json file everything works fine. But if you will add some more data - it will delete the wrong trips or days depending wether it is older or newer(e.g. if you...

postLink() in cakePHP 3.x

cakephp,hyperlink,delete
I just created the CRUD operations in cakephp 3.x. I am deleting the records using postLink() function. $this->Form->postLink("<i class='fa fa-remove'></i>", ['action' => 'delete', $role->id], ['escape' => false],['title' => 'Delete', 'class' => 'users'])]); It doesn't set the class for my delete icon. I need set the class name for this delete...

Does the the dynamic array need to be deleted or deallocated if the return is not assigned? Or is it deleted by the function?

c++,arrays,memory,dynamic,delete
#include <iostream> using namespace std; int *arrExpand(int *arr, int arrSize) { int *p = new int [arrSize * 2]; for(int i =0; i < arrSize * 2; i++) { if(i < arrSize) p[i] = arr[i]; if(i > arrSize) p[i] = 0; } return p; } int main() { int mySize...

Delete data using modal box in laravel

laravel,controller,routes,delete,modal-dialog
guys. I have some problem to delete data with confirmation (in this case using modal box) in laravel. This is my delete button {{ Form::open(array( 'route' => array('delete_spk', $spk_data->id), 'method' => 'put', 'style' => 'display:inline' )) }} <button class="btn btn-danger btn-line btn-rect" type="submit" data-toggle="modal" data-target="#delSpk" data-title="Delete SPK" data-message='Are you sure...

UITableViewCell get deleted directly by tapping delete control on the left but not show delete button on the right

ios,uitableview,uiscrollview,delete,edit
When I involve [tableView setEditing:YES animated:YES], delete control shows on every cell on the left,what I want to do is to get the event when I tap delete control,and directly delete cell but not to show delete button on the right. I know apple's standard way to do this is...

Batch to remove all files in folder + subfolder except some filetypes

batch-file,delete,file-extension,subfolder
I have a folder with thousand of subfolders. There are many files like .cfg's or .txt's, that are unnecessary. I only need the folders with files that contain .png and .jpg . So the procedure should be: Find all files except .png and .jpg files and delete them Check all...

I need to delete the last 7 characters of a specific range of cells that are already selected

vba,delete,selection
I'm trying to remove the last 7 characters, which are jibberish in a report i run, but only for the cells i have selected in the spreadsheet. i keep on getting a Run-Time Error 13 though. Sub Mitts() With Selection .Value = Left(.Value, Len(.Value) - 7) End With End Sub...

Python script to find and delete oldest files until free HDD space threshold is met

python,file,python-2.7,delete
I'm absolutely brand new to Python, and though I've done a bit of searching already (and have found a few good answers) I'm still having issues getting a script that's supposed to do exactly this to work. That is, I'd like the script to delete the oldest files in a...

incompatible types when assigning to type 'char[50]' from type 'char *'

c,list,hyperlink,crash,delete
I am trying to create a link list. I have a function that deletes (delete function) stuff from my link list. But it seems to crash when I try to compare strings. It works up until the last random printf statement. Here is the code: #include <stdio.h> #include <stdlib.h> #include...

SQLiteException near “<” while delete query

android,sqlite,delete,android-sqlite,where-clause
I am trying to delete a few rows from my SQLite database like this: dbUtilsObj.delete(EngineUtiReport.TABLE_NAME, EngineUtiReport.Columns.KEY_ENGINE_UTI_UNIX_TIME + DBUtils.IS_LESS_THAN, new String[] { String.valueOf(nDaysOldUnixTime) }); In the above code nDayOldTimeInMills = 1429963811949 and DBUtils.IS_LESS_THAN = " < ". But I am getting this syntax error exception and I just can't figure out...

AngularJS - How to delete Data from subarray?

javascript,angularjs,delete,sub-arrays
within the following table I have a two small problems! First: Adding and deleting trips works fine. Maybe someone can give me a hint how to delete my entries from subarray - DAYS within a trip? Second: When I create a new trip, I am not able to create new...

Deleting dynamic char** in C++

c++,arrays,dynamic,delete,char
Disclosure: Hi, I'm trying to solve a challenge with strict time and memory limits. I would normally use vectors and strings, but here I need the fastest and smallest solution (with vectors it actually ran above the time limit), so I turned to dynamic arrays of char*. The relevant parts...

Delete Words w/Upper And Lowercase Letters or Only Lowercase Letters

sql,ms-access,delete,uppercase,lowercase
Objective: I have an Access table with a column Item_Desc. I want this column to only contain the brand names of clothing. The brand names are always written in ALL CAPS, e.g., "RALPH LAUREN". Problem: The Item_Desc column is populated with both brand names and type of article of clothing...

Override django's model delete method for bulk deletion

django,model,delete,bulk,imagefield
I'm overriding Django's model delete method in order to delete orphan files in the disk for image fields, something like this: class Image(models.Model): img = models.ImageField(upload_to=get_image_path) ... def delete(self, *args, **kwargs): self.img.delete() super(Image, self).delete(*args, **kwargs) This works fine when i delete single objects from the admin, but when i select...

How can i delete and refresh my listview?

android,listview,delete,refresh
I have created a method deleteItem that would have to delete the row, but after i click the button the continues there and if i try again i got an exception. (Sorry for the english mistakes). public class WITHistory extends WITBase implements OnItemClickListener{ private ListView listView; public int del; @Override...

find and remove all closed files that are not modified in some-time

linux,delete,find,filesystems
I'm building a script in linux that will remove files from the disc that aren't in used corrently by the OS. I want to use find command so i can execute rm for all the files that i find that are not open. I tried so far this command without...

can't clear cache Symfony

symfony2,caching,delete,size
My project symfony some to be more than 240 Mb (because of the cache). When I try to delete them, they show to me this message in console: [Symfony\Component\Filesystem\Exception\IOException] Failed to remove directory "C:\wamp\www\FirstProject\Symfony\app\cache\dev_ old\profiler\82". cache:clear [--no-warmup] [--no-optional-warmers] ...

Removing Alert When Using DeleteFile API

vb.net,vba,api,delete
I'm writing a VBA application which involves looping a large number of directories recursively. I am using the FindFirstFile API to to achieve this, as it offers a substantial performance boost over the FileSystemObject. In order to remove the FSO from my code entirely, I need a routine to delete...

R delete non max values in redundant rows

r,matrix,delete
I have a matrix that contains following: A B C D a 1 3 2 5 b 3 2 5 8 a 2 1 0 9 a 4 2 1 3 c 4 3 1 1 b 2 5 1 9 A, B, C, D are column names and a,...

remove nodes listed into XmlNodeList from XML file

c#,xml,delete,xmlnodelist
I have a problem with my XML file. <?xml version="1.0" encoding="UTF-8"?> <config> <settings> <excelFilePath>C:\Temp\</excelFilePath> <mailHost>smtp</mailHost> <mailPort>25</mailPort> <mailFrom>[email protected]</mailFrom> <keepInCopy> <mailCC>[email protected]</mailCC> <mailCC>[email protected]</mailCC> <mailCC>[email protected]</mailCC> </keepInCopy> <mailSubject>My Mail subject</mailSubject>...

In Ruby, if array string equals any of the second array string, thenhow can I delete from file or array?

arrays,ruby,string,delete
I'm trying to read a file of key words (1 word per line), and I put each word into an array. I am trying to delete any of the words that match the 'useless words' array, so my code reads: useless_words = ["a","the","at","we","are","be","i","what", "want","you","oh","u"] word1 = [] puts file2.count file2.each...

RAILS 4: problems with 'delete' button

ruby-on-rails,delete,nested,nested-resources
I have a nested resource, comments like so.... resources :microposts do member do get :upvote, :undo_upvote end member do get :follow, :unfollow end resources :responses do member do get :upvote, :undo_upvote end resources :comments end end I have a delete button on the comments index page.... <div class = "Comment"...

How to change the functionality of a button so that it can work as the backspace button

delete,keyboard,backspace
Okay, so I have a Compaq laptop [American keyboard]. It is a few days that the backspace button is broken - I mean, it is totally popped off. It ought to be replaced but it is hard to find it out. Now, I was wondering whether or not there was...

Add items to ul and delete them

jquery,delete,add
I have a question! I want to add some list items to and unorderdlist with a click on a button. And i want to delete those items when i click on a button. This is what i have made.. i can add them but not delete them.. Can you guys...

Delete an element from peewee Query select

python,select,delete,peewee
I have a Query result by Peewee's table.select(), lets say that i want to delete a part of the resulting list(QuerySelect) how is that done? or exclude certain elements from the query? #Edited result = users.select(); for element in result: for name in list: if(element.name == name): removeThisElement() i want...

Postgres SQL: how to delete rows of Table1 where category = x (but Category is defined in Table 2)?

database,postgresql,join,delete
I have a Postgres Database. I am trying to delete rows in Table 1, based on a condition expressed in Table 2. Table 1: id, object_id, time, action_type Table 2: object_id, object_name, object_category I would like to delete all rows in Table 1, where object_category = x. Thanks!...

how to retrieve duplicate records and delete them in table A, also insert these duplicate records in another table B (in postgres)

postgresql,delete,duplicates,records
how to retrieve duplicate records and delete them in table A, also insert these retrieved duplicate records in another table B (in postgres db) SQL query's are required for my project. Thanks...

delete an entry from a table A if that entry is already present in a table B

sql,oracle,oracle11g,delete
My question is somewhat similar to this one SQL Delete Rows Based on Another Table except for the fact two entries match if 4 columns match! So, I have: Table1: Field | Type | Null | Key | Default | Extra f1 | int(32) unsigned | NO | PRI |...

jqGrid onDelete event handler

events,jqgrid,delete,handler,extend
I'm using a jqGrid with datatype: 'local'. The data of the grid is being set dynamically via addRowData. I don't use the asynchronous ajax stuff such as url + datatype: json because the grid has to display only client state. Now I want to use the jqGrid delete row functionality...

PDO delete specified row from table

php,mysql,pdo,delete,delete-row
I have a little problem ... I am using PDO and part of my code is to delete a specific row from the table in my database. My code is the below ... function deleteFromWorkWhere($db,$table,$user,$rowId){ switch($table){ case 'work': $tbl = 'work'; break; } if($rowId=='all'){ // delete all records $sql =...

Renaming files programatically, decrementing

c#,file,delete,rename
I have a folder with a certain number of text files named 1.txt, 2.txt 3.txt etc. My goal is that when one of them is deleted, to rename any of the files greater than the file deleted down one. Ex. if 1.txt is deleted, 2 should be renamed to 1,...

LinkedList iterator remove

java,linked-list,delete,iterator
I have a question on linkedlist iterator If I'm using next , previous and remove methods for example : name.add("Alvin") name.add("Keven") name.add("Jack") ListIterator<String> iterator = name.listIteraot(); //|AKJ iterator.next(); // A|KJ iterator.next(); // AK|J iterator.add("Nina") // AKN|J iterator.next(); // AKNJ| iterator.remove(); // AKN| In the next and then remove method we...

Set Wordpress post status to 'Draft' from front end similar to get_delete_post_link

wordpress,post,delete,frontend,status
I am using the below code to allow a logged in user to set delete their own posts from the front end. Is there a way to do the same thing but setting the post to 'draft' rather than deleting it completely? <?php if ($post->post_author == $current_user->ID) { ?> <p><a...

using ruby to delete duplicate words from text file

ruby,delete,duplicates,readfile
how would i use ruby to delete duplicate lines of word from a text file? for exmaple: file reads = line 1 = 345 line 2 = 234 line 3 = 456 line 4 = 789 line 5 = 234 line 6 = 345 I'm trying to write a script...

Deleting by ROWID

oracle,delete,rowid
I'd like to run this query. DELETE FROM A006873.GC_CLIENTS WHERE ROWID = '14519'; But I get this error: SQL.sql: Error (2,15): ORA-01410: invalid ROWID I got in GC_CLIENTS ID NUMBER NAME 14519 0000017690 VILLAVINE I don't realize what's wrong if I'm in the correct ID. I'm using a sequence by...

“dt” motion in Vim working with mutiple lines

vim,delete,text-editor
I very often use dt-some_character motion in Vim, to delete every character upto some_character. However, it works only for a single line. Is there any analogue that would work for multiple lines?...

Memory Management with delete

c++,memory-management,delete
I have a little program: #include <iostream> using namespace std; void inputArray(int*& p, int& n); void print(int *p, int n); int main() { int size = 0; int *arr; inputArray(arr, size); } void inputArray(int*& p, int& n) { int *q = new int[n]; int m = n; for (int i...

Declare pointer inside a function that is called several times

c++,loops,pointers,delete,declare
I would like to know whether or not I can do this with a function Idle() which is called several times in an opengl program.Is this OK or will I get a memory leak? void Idle() { //PXCPointF32 is a struct PXCPointF32 *uvmap=0; uvmap=new PXCPointF32[640*480]; if(uvmap!=NULL) { //do some processing...

delete three columns of two grouped columns according to common value of two column

excel,excel-vba,delete
I have 2 sets of three grouped columns in one worksheet. This stretches for 30000 rows. Sample data is below: i want a macro Do like this code : Code: when (old seial)=(new serial) then delete (new code) AND (new serial) AND(new amount) old code old serial old amount new...

delete spiders from scrapinghub

delete,web-crawler,scrapy,scrapy-spider,scrapinghub
I am a new user of scrapinghub. I already searched on googled and had read the scrapinghub docs but I could not find any information about removing spiders from a project. Is it possible, how? I do not want to replace a spider, I want to delete/remove it from scrapinghub...

Removing only blank cells in R (not the entire row or column)

r,delete
So I want to remove all cells that are blank within my dataset. So for example, if I had something like this, where the (..) represents blank numbers:- 1 10 .. 4 .. 9 10 8 14 8 12 16 I want to be able to remove the blank cells...

Delete the checkout botton in sidebar

wordpress,delete,widget,woocommerce
I want to remove the woo commerce checkout botton on the right widgetbar wich says Kasse. http://vinesso.dk/produkt-kategori/vine/ Can anyone help me?...

I'm trying to delete an entry by using a checkbox from my psql database using jsp and servlet

java,jsp,servlets,checkbox,delete
I'm trying to delete a checked entry from my database but it's not working. The jsp page code is as follows: <c:forEach var="raportti" items="${raportit}"> <tr value="${raportti.raportti_id}" > <td><c:out value="${raportti.potilasraportti}"/></td> <td ><c:out value="${raportti.hoito_ohjeet}"/></td> <td> <input type="checkbox" name="checkbox" value="${raportti.raportti_id}"/></td> </tr> </c:forEach> The servlet looks like this: else if...

pouchdb delete allDocs javascript

javascript,delete,pouchdb
I am new in pouchdb and I can't understand the API. I want to know what is the best way to delete all documents with a javascript code. I try many things but nothing seams to work. Do I have to use some options in the allDocs method like: db.allDocs({include_docs:...

Where do I delete objects? I'm out of scope

c++,object,delete,stack
From what I have gathered it's imperative to delete anything that has been allocated with new. Having said that I feel I'm out of scope in my program to be able to access & delete those objects. GameStateStack.h #include <iostream> class node { public: std::string gameState; node * nextGameState; };...

rm -r in shell script (my first *.sh)

bash,shell,delete,rm
I've a (newby) question. I would like to delete some folder on an Ubuntu 8.04 Server. I would like to start a script to delete this folder. I start an ssh session to the server. My script looks like this: #!/bin/bash rm -r /var/lib/backuppc/pc/PC1/ rm -r /var/lib/backuppc/pc/PC2/ I run the...

Delete the last item element JQuery

javascript,jquery,html,delete
I'm working on something, basically I have this Add Parameter button which adds 2 new text field namely a parameter name and parameter value. I have a button which is delete parameter. How can I delete the last parameter name and value? The button should delete the last. Here's my...

Deleting a range of items in a list versus printing a range of items in a list

python,list,printing,delete,append
Observe the code below: 1 names = ['Louisa', 'Mean Girl Star Wars Fan', 'Olive'] 2 names.append('Stephen') 3 names.append('Lucia') 4 names.append('Gianna') 5 names.append('Sal') 6 names.append('Andrew') 7 names.append('Francesca...we think') 8 names.append('Peter or John') 9 del names[0:3] 10 print(names[0:6]) Why is it that I must specify a range of [0:3] to delete the...

Breakpoint on delete[] when destroying char *

c++,memory,delete,breakpoints,operator-keyword
I'm doing an assignment for class in which i can't use the string class. I need to use char* as arrays and doing arithmetic with them. My code being executed in main is the following: I create 2 myString objects and I add them. Then this is done correctly. Both...

How I can delete grails domain object with many-to-many relationship?

grails,delete,many-to-many,relationship
class Client { String name String surname String address static hasMany = [departments:Department] } class Department { /*static constraints = { }*/ String depName String location static hasMany = [clients:Client] static belongsTo = Client } def deleteDepartment(){ def values = params.list('departments') def checkedID = new Integer[values.size()] for(int i=0; i<values.size(); i++){...

Destroy an object with variables (free memory)

c++,object,memory,delete,free
I am trying to create an event/date orginaizer in C++. The overview is like a calender show one month and every Day in this calender is an Object (type: EventCell) The class EventCell stores the events for his day in a vector (name: eventData with type: "EventInfo": class for storing...

Recognizing when the UITableViewCell delete button is shown

uitableview,delete,uibutton
I have the following problem: My UITableViewCell contains an UIButton and if the user swipes from right to left to show the deletion button the button in the Cell gets triggered sometimes. Is there a way to recognize the swipe or that the deletion button is shown, so i could...

Git Branch Delete Warning - What to Do?

git,merge,delete,branch
I'm new to Git and I am using it for the first time as I develop a Flex application using IntelliJ 14. I am developing on my MacBook and have a local repository. I have created a remote repository on our Fileserver, which is backed up nightly, which I push...

Form to delete data from MySQL database using PHP

php,mysql,database,forms,delete
So I'm creating a small program with 2 forms, one to add data to a database, and one to delete from it. I've managed to create the first input form, but I'm slightly confused as to how I would get the second form to work. In the database "tasks" I...

delete sql rows that have same value in other rows

sql-server-2008-r2,delete,rows
I've a table having data as: C1 || C2 ----------------- a || 1 b || 1 c || 1 a || 0 b || 0 c || 0 d || 0 I've to delete row 4,5,6. All rows with C2 = 0, that have same C1 and C2 = 1....

How to automatically delete file older than 24 hours of a .pdf format in a specific folder with PHP

php,delete,directory,file-manipulation
I keep getting many pdf file in my directory root/files/pdfs. I want a PHP script to automatically delete only the .pdf files from the pdfs folder that are older than 24 hours (86400 seconds). What permissions will the .php file require? Where to put the file? Should I have to...

Delete spaces and column in csv with powershell

file,powershell,csv,delete,space
I'm trying to convert a downloaded ".txt" file into a goodlooking and useful ".csv" file using powershell. I'm kindly advanced with this task but shortly before the goal I have some problems which I can not manage. It is a list with the OUI-Part of mac-addresses and its names. This...

How to simplify/improve this mysql delete query

mysql,delete
We regularly send a newsletter to our subscribers. We want to remove subscribers who never open our emails nor read them. Here's the query I have put together for this - it removes subscribers/their events where they have not replied to 5 emails or more. It seems a little awkward...

Can I delete an item of a queryset in python but without deleting that item on the database?

python,delete,django-queryset
I am creating an app in django, and I have the next problem: I get a queryset using the next command line: queryset = Persons.objects.all() Assume the resulting list is the next one: ['x', 'y', 'z'] And I want to remove an element x of that list, so that the...

WA_DeleteOnClose delete all members?

c++,delete,heap,qt5,destructor
I'm in trouble with Qt5's WA_DeleteOnClose attribute. This is the situation: I have a class M that extends QMainWindow, and in this class I use an heap-allocated array. I read that with WA_DeleteOnClose when the window M is closed, and the destructor called, every member with M as parent is...

Hot to delete all files by a specific name? CryptoWall trojan [closed]

windows,delete,trojan
how can I delete all file that by this name: HELP_DECRYPT.url on internet there is a way but it doesn't work. that solution is this: in cmd del /s HELP_DECRYPT.url

C - deleting n-ary tree nodes

c,tree,delete,n-ary-tree
I have implemented in C an m,n,k-game with AI. The game works fine but when I have to free the decision tree it always throws an "Access violation reading location" exception. This is the implementation of the decision tree structure: typedef struct decision_tree_s { unsigned short **board; status_t status; struct...

Debug assertion failed C++ while deleting a pointer vector

c++,debugging,delete,assertion
I have been working on this for a while now and it may all just be turning into mush. I am a beginner in C++ and I am running into a problem when calling delete to delete the elements in my array. It says that the debug assertion failed. In...

trying to delete automatically added and sorted answers from a VBA textbox into excel cells

excel,vba,delete,duplicates,add
I have code that adds and that if an answer is provided based on a certain criteria it adds itself to a list. as i have been troubleshooting the rest of the program i have accrued a lot of answers that have been added. if i select the cells it...

Whats the easiest way to empty and save a Core Data Table in Swift?

xcode,sqlite,swift,core-data,delete
So I have a entity, which I am treating as a simple Database Table in iOS8 XCODE and SWIFT. I want to delete every entry in the table. Permanently. So when I start up the app again they do not reload.This is my code. func deleteAllItems(){ println("All Items are being...

How to implement custom delete in Django?

django,model,delete
When I delete records of table-A, I'd like to move the rows to table-A-history table. Is it suffice to override manager's delete() method to actually move and delete? All the soft delete I've been able to find uses bool flag to indicate a soft-delete....

Use Join In Delete Zend 2

delete,zend-framework2,left-join
How can i use join in zend 2 delete query? For example : DELETE t1 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.id IS NULL; I won't write query directly. $Delete = new Delete(); $Delete->from("example"); $Delete->join // join is not available Sincenrely....

How can I delete spaces on php [closed]

php,forms,delete,trim
PHP delete spaces if $adsoyad comes like "hello____", where _ are spaces. I need to delete all spaces and save the string as "hello". I used trim(), but I couldn't do it....

If I use delete in Javascript, what is the difference in var x, and simple x declaration?

javascript,delete
x = 42; // creates the property x on the global object var y = 43; // creates the property y on the global object, and marks it as non-configurable // x is a property of the global object and can be deleted delete x; // returns true // y...

Remove rows that do not contain certain words/phrases

list,csv,batch-file,delete
I need to remove some rows from a list. I need to remove all of the rows that do not contain certain words or phrases. I am using code that removes certain rows. I need to change this code to save only the rows that contain certain words I am...

Operator delete associativity

c++,delete,operators
Whilst looking up operator associativity on wikipedia, I noticed that delete has an associativity of right to left. The source is cited as msdn, I checked it and it comes under group 3 precedence, right to left associativity. So I checked the C++ standard (n4296) 5.3 Unary expressions [expr.unary] 1)...

CakePHP 3.0.0 cascade dependent deletes

delete,cascade,cakephp-3.0
If I have the following in some model tables; As, Bs, Cs and Ds. They have these associations defined: AsTable: $this->hasOne('Bs', [ 'dependent' => true, 'cascadeCallbacks' => true, ]); BsTable: $this->belongsTo('As', [ 'foreignKey' => 'A_id', ]); $this->hasMany('Cs', [ 'foreignKey' => 'B_id', 'dependent' => true, 'cascadeCallbacks' => true, ]); CsTable: $this->belongsTo('Bs',...

set database object to be deleted android

android,database,delete
i've setup a database in android for my app however i'm stuck trying to delete a object within the database. i'd like the button within BasicButtonsCard to delete the item that has been clicked on for example cardX holds data ABCD while cardY hold EFGH and on clicking the delete...

DELETE Function in UcanAccess throws strange exception

java,sql,delete,ucanaccess
Since the elimination of the JDBC bridge from Java 1.8 (which we still mourn) and the move to UcanAccess, I've been debugging SQL code that in the past never gave me any issues.. One of the statements are: DELETE TreatmentRecords.DateGiven, TreatmentRecords.TimeGiven, SInformation.Surname, SInformation.FirstNames, TreatmentRecords.Diagnosis, TreatmentRecords.* FROM SInformation INNER JOIN TreatmentRecords...

How to delete data from html form php mysql

php,html,mysql,forms,delete
Im new to php and i learned some stuffs like adding data but i got stuck in deleting data from html form. Heres my code. database name: mydb tablename : registered HTML <HTML> <BODY> <form method="post" action="dataout.php"> ID:<input type="Text" id="idelete" name="idelete"><br> <input type="Submit" name="submit" value="delete"> </form> </HTML> dataout.php <HTML> <head>...

SQL Oracle | How to delete records from a table when they match another table?

sql,oracle,delete
How would I delete records from a table where they match a delete table? As in, I have a table of record keys that say what need to be deleted from my main table. How would I write a delete to say "delete anything from my main table where this...

$_ROW 'id' delete user with Get doesn't work

php,delete
I have the following code to load users in a table: register.php here I want to delete users from. Only the second script deleteUsers.php doesn't work. Can any body help me out? register.php` <?php $edit = 'edit:'; $account = 'Username:'; $account = '<font size="4">'.$account.'</font>'; $password1 = 'Password:'; $password1 = '<font...

Python: Is it possible to delete (not just unlink) a class?

python,class,delete
Suppose I define a class. >>> class A(object): >>> pass Then I want to delete that class. I can use del to unlink it from the variable A. >>> del A >>> A Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'A' is not defined...

Why doesn't this FOR command delete all files except the one I want to keep?

windows,batch-file,for-loop,delete
I have the following files in a folder download\gutt_menu_win (from a dir command) 27/04/2015 09:02 <DIR> . 27/04/2015 09:02 <DIR> .. 26/08/2013 01:38 274,218 autorun.csp 22/04/2013 18:26 2,120,704 autorun.exe 22/04/2013 18:09 32,038 autorun.ico 03/11/2009 04:34 350 disclaimer.txt 22/04/2013 18:26 2,120,704 gutt_v1.0.0.exe 27/04/2015 09:02 277 list.txt 05/11/2012 20:57 957 readme.txt 27/04/2015...

Talend: tRESTClient returns empty response after delete

xml,rest,delete,talend
I'm new to Talend. I use 5.6.1 Talend Studio. I'm sending DELETE request using tRESTClient to a service. I expect to get xml response with error codes. In client log I can see xml that I need, but both body and string values in response row are empty. tRESTClient log:...

Delete files based on backlist word

shell,delete,unlink,blacklist
I am loocking for bash on linux or php file file: cron.php or cron.sh dir: /files blacklist: blacklist.txt cron.php runs every minute and search for file names containing blacklist. delete files based on file name reasson: clean download center from explicit files ; $blacklist = 'blacklist.txt'; for each /files/*.* echo...

Deleting specific files from a directory

file,delete,python-3.2
I am trying to delete all files from a directory apart from two (which will be erased, then re-written). One of these files, not to be deleted, contains the names of all files in the folder/directory (the other contains the number of files in the directory). I believe there (possibly?)...

PHP login system help needed for deletion

php,login,delete,user
Help with user deletion: Hello I am creating a user creation system for a project of mine, I am still very new to PHP, my issue is getting the user from the MySQL database and then deleting it, I will show you my code below: <?php require_once("config/db.php"); if ($login->isUserLoggedIn() ==...

python pandas: drop a df column if condition

python,pandas,delete,dataframes
I would like to drop a given column from a pandas dataframe IF all the values in the column is "0%". my df: data = {'UK': ['11%', '16%', '7%', '52%', '2%', '5%', '3%', '3%'], 'US': ['0%', '0%', '0%', '0%', '0%', '0%', '0%', '0%'], 'DE': ['11%', '16%', '7%', '52%', '2%', '5%',...

Correct way of using REST DELETE?

rest,delete
I am trying to delete some items connected to a product. Like this: DELETE /products/Special product/11 So item 11 in "Special product" will be deleted? Is this a correct way of using the DELETE verb? I should probably url encode Special product right? Special product is not stored in a...

Swift: Stop table from generating cell that has already been deleted

swift,table,delete,cell,generated
This is the code that I use to generate a regular table cell in my RSS feed reader: override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { // Function adds the title to each cell let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell let item = feedItems[indexPath.row] as MWFeedItem...