Search Results

Search found 14047 results on 562 pages for 'ctrl alt delete'.

Page 41/562 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • Delete MSMQ Queue During Uninstall

    - by Todd Kobus
    Is it possible to delete a private message queue that was created by the service user? During uninstallation, we would like to clean up any message queues created by our application. For security purposes, access to these queues has been restricted to the current user (ServiceUser). During uninstall, we have admin privileges, but still get an access denied MessageQueueException when we attempt to delete the queue or modify the privs on the queue. Here is the cleanup code: public void DeleteAppQueues() { List<string> trash = new List<string>(); var machineQueues = MessageQueue.GetPrivateQueuesByMachine("."); foreach (var q in machineQueues) { if (IsAppQueue(q.QueueName)) { trash.Add(".\\" + q.QueueName); } q.Dispose(); } foreach (var queueName in trash) { try { using (MessageQueue delQueue = new MessageQueue(queueName)) { delQueue.SetPermissions("Everyone", MessageQueueAccessRights.FullControl, AccessControlEntryType.Allow); } MessageQueue.Delete(queueName); } catch (MessageQueueException ex) { // ex.Message is "Access to Message Queuing system is denied." } } }

    Read the article

  • MySQL Delete from 1 table, using multiple tables

    - by nute
    I would like to delete all the rows found by that query: SELECT cart_abandon.* FROM cart_abandon, cart_product, txn_product, users WHERE cart_abandon.cartid = cart_product.cartid AND cart_product.productid = txn_product.productid AND txn_product.username = users.username AND users.id = cart_abandon.userid AND txn_product.txndate >= cart_abandon.abandondate The thing to keep in mind is that the query here uses 4 different tables, however I only want to delete rows from 1 table (cart_abandon). Is there an easy way to do that? Maybe this: ? DELETE cart_abandon FROM cart_abandon, cart_product, txn_product, users WHERE cart_abandon.cartid = cart_product.cartid AND cart_product.productid = txn_product.productid AND txn_product.username = users.username AND users.id = cart_abandon.userid AND txn_product.txndate >= cart_abandon.abandondate Is that valid? Correct?

    Read the article

  • Deleting an element from an array in perl

    - by Flamewires
    Hey I'm wondering how i can get this code to work, basically i want to keep the lines of $filename as long as they contain the $user in the path. Sry, perl noob. open STDERR, ">/dev/null"; $filename=`find -H /home | grep $file`; @filenames = split(/\n/, $filename); for $i (@filenames) { if ($i =~ m/$user/) { #keep results } else { delete $i; # does not work. } } $filename = join ("\n", @filenames); close STDERR; I know you can delete like delete $array[index] but I don't have an index with this kind of loop that I know of.

    Read the article

  • Android: How do you delete a folder starts with period

    - by jclova
    I am trying to delete a folder in sdcard. I can delete normal directories, but a directory that starts with period cannot be deleted. (ex. ".helloDir") if (dir.isDirectory()) { String[] children = dir.list(); for (int i = 0; i < children.length; i++) { new File(dir, children[i]).delete(); } } children is null if dir starts with period (ex. ".helloDir").

    Read the article

  • Best way to perform DELETE that uses ids from a SELECT statement in MYSQL

    - by Aglystas
    I'm working on a stored procedure, that needs to delete specific rows based on a timestamp. Here's what I was going to use until I found out you can't include a select clause in the delete statement if they are both working on the same table. DELETE FROM product WHERE merchant_id = 2 AND product_id IN (SELECT product_id FROM product WHERE merchant_id = 1 AND timestamp_updated > 1275062558); Is there a good way to handle this within a stored procedure. Normally I would just throw the logic to build the product_id list in php, but I'm trying to have all the processing done on the data server.

    Read the article

  • Can an app delete its own internal resources?

    - by user637884
    I am trying to find a way to delete an internal resource after an app installs. More specifically, I have a zip file included in the apk, that I unzip to the SD Card when the app is first run. But then want to delete the now unneeded zip file (the purpose being to save the user internal phone memory). I access the zip file with, Resources resources = this.getResources(); InputStream is = resources.openRawResource(R.raw.assets); But am uncertain how to then delete the resource (if even possible). I know one may ask why not simply install the app to SD Card at download. But the app includes a screen widget, and installing apps to the SD Card and using a screen widget is problematic. Thanks, Matt

    Read the article

  • bulk update/delete entities of different kind in db.run_in_transaction

    - by Ray Yun
    Here goes pseudo code of bulk update/delete entities of different kind in single transaction. Note that Album and Song entities have AlbumGroup as root entity. class AlbumGroup: pass class Album: group = db.ReferenceProperty(reference_class=AlbumGroup,collection_name="albums") class Song: album = db.ReferenceProperty(reference_class=Album,collection_name="songs") def bulk_update_album_group(album_group): updated = [album_group] deleted = [] for album in album_group.albums: updated.append(album) for song in album.songs: if song.is_updated: updated.append(song) if song.is_deleted: deleted.append(song) db.put(updated) db.delete(deleted) a = AlbumGroup.all().filter("...").get() # bulk update/delete album group. for simplicity, album cannot be deleted. db.run_in_transaction(bulk_update_album_group,a) But I met a famous "Only Ancestor Queries in Transactions" error at the iterating reference properties like album.songs or album_group.albums. I guess ancestor() filter does not help because those entities are modified in memory. Should I not to iterate reference property in transaction function and always provide them as function parameters like def bulk_update_album_group(updated,deleted): ??? Is there any good coding pattern for this situation?

    Read the article

  • delete & new in c++

    - by singh
    Hi This may be very simple question,But please help me. i wanted to know what exactly happens when i call new & delete , For example in below code char * ptr=new char [10]; delete [] ptr; call to new returns me memory address. Does it allocate exact 10 bytes on heap, Where information about size is stored.When i call delete on same pointer,i see in debugger that there are a lot of byte get changed before and after the 10 Bytes. Is there any header for each new which contain information about number of byte allocated by new. Thanks a lot

    Read the article

  • Can't delete a file created by mkstemp() on Mac OS X

    - by splicer
    Apparently, NSFileManager is unable to delete files created by mkstemp(). Here's some test code to demonstrate this: char pathCString[] = "/tmp/temp.XXXXXX"; int fileDescriptor = mkstemp(pathCString); if (fileDescriptor == -1) { NSLog(@"mkstemp failed"); } else { close(fileDescriptor); NSURL *url = [NSURL URLWithString:[NSString stringWithCString:pathCString encoding:NSASCIIStringEncoding]]; NSLog(@"URL: %@", url); NSError *error; if (![[NSFileManager defaultManager] removeItemAtURL:url error:&error]) { NSLog(@"could not delete file: %@", error); } } Here's what I see in the log when I run the above code: URL: /tmp/temp.A7DsLW could not delete file: Error Domain=NSCocoaErrorDomain Code=4 UserInfo=0x1001108a0 "The file “temp.A7DsLW” doesn’t exist." I'm running this on Snow Leopard. Any ideas on why the problem is occurring and/or how to work around it? Thanks!

    Read the article

  • Excel VBA: can delete validation but not add new one

    - by user1882965
    My code is as follows If Cells(Target.Row, 2) = "" And (Cells(Target.Row, 3) = "" Or Cells(Target.Row, 3) = "") Then Sheets("MySheet").Activate Cells(Target.Row, 3).Activate ActiveCell.Validation.Delete If (Cells(Target.Row, 2) = "Type A") Then ActiveCell.Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=AvailableVersions" ElseIf (Cells(Target.Row, 2) = "Type B") Then ActiveCell.Validation.Delete Else ActiveCell.Validation.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertInformation, Formula1:="0", Formula2:="9999999" End If End If So the issue I am having comes whenever I reach ActiveCell.Validation.Add Run Time Error '1004': Application-defined or object-defined error Not a very helpful error, and also this occurs with both number and list validation type, so I am sure it is not an issue with the list itself which has workbook level scope anyway. It never occurs on ActiveCell.Validation.Delete which I find weird? I have been all over google trying to find a solution, and most suggest that it is caused by running dynamic validation code from a button which hogs focus despite the Activate call, but I am running on sheet change event rather than on button press so I don't think this is my issue - any ideas? I've wasted basically a whole day on this! :(

    Read the article

  • C Remove the first line from a text file without rewriting file

    - by Tom Van den Bon
    Hi, I've got a service which runs all the time and also keeps a log file. It basically adds new lines to the log file every few seconds. I'm written a small file which reads these lines and then parses them to various actions. The question I have is how can I delete the lines which I have already parsed from the log file without disrupting the writing of the log file by the service? Usually when I need to delete a line in a file then I open the original one and a temporary one and then I just write all the lines to the temp file except the original which I want to delete. Obviously this method will not word here. So how do I go about deleting them ?

    Read the article

  • why single SQL delete statement will cause deadlock?

    - by George2
    Hello everyone, I am using SQL Server 2008 Enterprise. I am wondering why even a single delete statement of this store procedure will cause deadlock if executed by multiple threads at the same time? For the delete statement, Param1 is a column of table FooTable, Param1 is a foreign key of another table (refers to another primary key clustered index column of the other table). There is no index on Param1 itself for table FooTable. FooTable has another column which is used as clustered primary key, but not Param1 column. create PROCEDURE [dbo].[FooProc] ( @Param1 int ,@Param2 int ,@Param3 int ) AS DELETE FooTable WHERE Param1 = @Param1 INSERT INTO FooTable ( Param1 ,Param2 ,Param3 ) VALUES ( @Param1 ,@Param2 ,@Param3 ) DECLARE @ID bigint SET @ID = ISNULL(@@Identity,-1) IF @ID > 0 BEGIN SELECT IdentityStr FROM FooTable WHERE ID = @ID END thanks in advance, George

    Read the article

  • Create a link to delete membership in web2py

    - by user1741325
    I'm trying to do something really simple but it's taking me ages to figure out how to do it properly. I want to have a button that simply deletes a member from a group. So in my view I have <div id="del-role">{{=A('Delete Role',_class="btn btn-danger", callback=URL('test'),delete='#del-role')}}</div> However, when I click the button, the only thing I get is a Javascript prompt asking whether I'm sure I want to delete the specified object, yes/no. That's fine but, what I'd really like to do is just auth.del_membership('role') What needs to go in my controller? I do not want any page redirection, I just want to auth.del_membership(role) This seemingly simple thing is taking me forever to understand. Thanks!

    Read the article

  • SharePoint form-based authentication problem with itemDeleting event?

    - by Clodin
    Hi! I have a SharePoint site (I'm the farm administrator with full control over the farm and site) and I used Windows authentication. I had a event receiver feature installed which manage add/update/delete for my lists to have custom behavior. Everything worked ok on Windows Authentication. But... now I am using form-based authentication (the same, I'm the site administrator with full control), but my feature works fine only with add/update events.... delete doesn't work any more, and it's the same code (damn it) as it was on windows authentication. Where am I doing wrong? why delete items don't work any more? Thanks in advance

    Read the article

  • Should I 'delete' this CDC?

    - by Binary Worrier
    Folks, I'm trying to track down an intermittant bug that's showing up on site. I've a feeling it's in some GDI code I'd to cobble together to get a tally printer working. I'm connfused over how to delete this CDC, my code looks OK to me, but is this correct. // Create a device context for printing CDC* dc = new CDC(); if(! dc->CreateDC(safeDriverName.AsBSTR(), safePrinterName.AsBSTR(), NULL, NULL)) { throw . . . } // as I finish with the CDC dc->DeleteDC(); delete dc; Do I need delete dc after dc->DeleteDC();? Thanks

    Read the article

  • How do I delete in Django? (mysql transactions)

    - by alex
    If you are familiar with Django, you know that they have a Authentication system with User model. Of course, I have many other tables that have a Foreign Key to this User model. If I want to delete this user, how do I architect a script (or through mysql itself) to delete every table that is related to this user? My only worry is that I can do this manually...but if I add a table , but I forget to add that table to my DELETE operation...then I have a row that links to a deleted, non-existing User.

    Read the article

  • How to do REST with PUT and DELETE

    - by Svish
    It says about the type option of the jQuery.ajax() method that The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. So... Does that mean that PUT and DELETE won't work if the browser does not support it, or just that PUT and DELETE can not be done natively by the user in the browser? If I can't or shouldn't use those, what do people usually do instead? Send the method as a a GET or POST parameter instead? Or?

    Read the article

  • How to delete unused sequences?

    - by user1023877
    We are using PostgreSQL. My requirement is to delete unused sequences from my database. For example, if I create any table through my application, one sequence will be created, but for deleting the table we are not deleting the sequence, too. If want to create the same table another sequence is being created. Example: table: file; automatically created sequence for id coumn: file_id_seq When I delete the table file and create it with same name again, a new sequence is being created (i.e. file_id_seq1). I have accumulated a huge number of unused sequences in my application database this way. How to delete these unused sequences?

    Read the article

  • How to delete a post in Nhibernate?

    - by marko
    I try to delete a post in NHibernate but nothing happens. Updating, selecting and inserting new items works fine but when I try to delete nothing happens. IQuery query = session.CreateQuery("from Color where name like '%" + TextBox2.Text.Trim() + "%'"); Color color = query.List<Color>()[0]; session.Delete(color); Edit: I forgot to call the flush method. Now works fine. Like this: session.Flush();

    Read the article

  • How listview delete data in database

    - by Bud33
    I have a problem to delete data in listview, I was able to delete data in listview select record, but data which selected is not deleted in the database, I have a source code Private _updateinputalltrans As Boolean Private Sub btndelete_Click(sender As System.Object, e As System.EventArgs) Handles btndelete.Click With Me.listviewpos.SelectedItem .Remove() End With MessageBox.Show("Are you sure delete this record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, New EventHandler(AddressOf DeleteData)) End Sub Private Sub DeleteData(ByVal sender As Object, ByVal e As EventArgs) Dim conn As New Connection(Connectiondb) If Me.updateinputalltrans = False Then If Me.listviewpos.Items.Count > 0 Then For Each del As ListViewItem In listviewpos.Items conn.delete_dtpospart(del.Text) Next End If End If End Sub delete_dtpospart a declare which connection to the database using a stored procedure

    Read the article

  • delete a row in html table using a hidden type and javascript

    - by kawtousse
    Hi, I have a table with HTML constructed using my servlet class. When trying to delete a row in this table using a javascript function I must first of all put different id to separate elements.and i resolove it with hidden type like that: retour.append("<td>"); retour.append("<input type=\"hidden\" id=\"id_"+nomTab+"_"+compteur+"\" value=\""+object.getIdDailyTimeSheet()+"\"/>"); retour.append("<button id=\"del\" name=\"del\" type=\"button\" onClick=DeleteARow('+id_"+nomTab+"_"+compteur+"')>"); retour.append("<img src=icon_delete.gif />"); retour.append("</button>"); retour.append("</td>"); As you can see each element has a delete button. What i want to know how can i delete one row. thinks.

    Read the article

  • How to retain a row which is foreign key in another table and remove other duplicate rows?

    - by Mithril
    I have two table: A: id code 1 A1 2 A1 3 B1 4 B1 5 C1 6 C1 ===================== B: id Aid 1 1 2 4 (B doesn't contain the Aid which link to code C1) Let me explain the overall flow: I want to make each row in table A have different code(by delete duplicate),and I want to retain the Aid which I can find in table B.If Aid which not be saved in table B,I retain the id bigger one. so I can not just do something as below: DELETE FROM A WHERE id NOT IN (SELECT MAX(id) FROM A GROUP BY code, ) I can get each duplicate_code_groups by below sql statement: SELECT code FROM A GROUP BY code HAVING COUNT(*) > 1 Is there some code in sql like for (var ids in duplicate_code_groups){ for (var id in ids) { if (id in B){ return id } } return max(ids) } and put the return id into a idtable?? I just don't know how to write such code in sql. then I can do DELETE FROM A WHERE id NOT IN idtable

    Read the article

  • simple query Delete records in a table based on count logic

    - by user1905941
    a table with a pk and status column which is having values as 'Y','N','NULL' Query: get the count of records with status column as 'Y', if this count exceeds 1% of total count of records then dont delete , else delete the records in the table. i tried like this Declare v_count Number; v_count1 Number; BEGIN v_count := select count(*) from temp; v_count1 := select count(*) from temp where status = 'Y' ; v_count := v_count + ((0.1) * (v_count)) if (v_count1 > v_count) { insert into temp1 values(pk,status) } else { Delete from temp ; } END;

    Read the article

  • mySQL .NET API - Delete all data from table

    - by keynesiancross
    Hi all, I'm trying to figure out if there is an easy way to delete all the data in a table using the mySQL .NET API. The only slightly more tricky part to this is that in the C# code, the business logic can be run in both cases where there is, or isn't, data in teh table. So in some regards I almost need an If statement... Currently I am using the following code, but it doesn't seem to ever delete data... string deleteSQL = "DELETE FROM `data`.`currentData`"; MySqlCommand cmd2 = new MySqlCommand(deleteSQL, conn); Any thoughts would be much appreciated! Cheers

    Read the article

  • Image SEO - always repeat main keyword in alt text?

    - by Marcus Edensky
    I'm working on an Easter Island website and I'm currently redesigning my image system. Virtually all my photos are of Easter Island. My question is, should I always include the keywords "Easter Island" for Google to easier understand that my photos are from Easter Island, or is it sufficient that the "Easter Island" keywords are in the domain, as well as in all other pages of the site? For example, Alt text 1: "Moai statues at volcano Rano Raraku at Easter Island (Rapa Nui)" or Alt text 2: "Moai statues at volcano Rano Raraku" Would example 1 be considered keyword stuffing by Google

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >