Search Results

Search found 8982 results on 360 pages for 'delete'.

Page 19/360 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • nhibernate mapping: delete collection, insert new collection with old IDs

    - by npeBeg
    my issue lokks similar to this one: (link) but i have one-to-many association: <set name="Fields" cascade="all-delete-orphan" lazy="false" inverse="true"> <key column="[TEMPLATE_ID]"></key> <one-to-many class="MyNamespace.Field, MyLibrary"/> </set> (i also tried to use ) this mapping is for Template object. this one and the Field object has their ID generators set to identity. so when i call session.Update for the Template object it works fine, well, almost: if the Field object has an Id number, UPDATE sql request is called, if the Id is 0, the INSERT is performed. But if i delete a Field object from the collection it has no effect for the Database. I found that if i also call session.Delete for this Field object, everything will be ok, but due to client-server architecture i don't know what to delete. so i decided to delete all the collection elements from the DB and call session.Update with a new collection. and i've got an issue: nhibernate performs the UPDATE operation for the Field objects that has non-zero Id, but they are removed from DB! maybe i should use some other Id generator or smth.. what is the best way to make nhibernate perform "delete all"/"insert all" routine for the collection?

    Read the article

  • Deleting a single file from the trash in Mac OS X Snow Leopard

    - by SteveTheOcean
    In earlier versions of Mac OS X one could delete a file from the trash by opening a terminal window and typing rm ~/.Trash/file_i_want_to_delete. See this previous post. Unlike earlier versions in Mac OS X Snow Leopard one can "put back" a file from the trash into its original directory. Will the rm trick still work? Testing shows it does delete the file but what happens to the "put back" information that specifies the directory from which the file was deleted?

    Read the article

  • need to delete files owned by apache - unsure how to do that

    - by Brad
    Running apache on rhel server and sometimes I need to delete some files that I can not using my FTP program, because the FTP account I am logged into is not the apache user. I am on a Mac and there must be a way to accomplish this via terminal by either SSH'ing into the server. What credentials would I need to ssh into the server and delete the files/folders owned by apache Screen shot will show you what I mean when the file is owned by the apache user/group: http://cl.ly/e2192e6aadc8e4688c33 Any help is appreciated.

    Read the article

  • delete file issue for Mac

    - by George2
    I am using a MacBook Pro running Mac OS X 10.5. I am new to this development environment, and previously worked on Windows. I have tried when select a file (e.g. a ppt file on desktop), then I press Delete key on keyboard. The file is not deleted (seems no effect). How to delete a file from keyboard? Thanks in advance.

    Read the article

  • DELETE method not allow in IIS (7)?

    - by DucDigital
    some how im developing ASp.net mvc application, the DELETE method work fine in VS server, but however, when i test it in an IIS. it's not working and absolutly return a 405 Error.. and currently, I dont know where and how i can get IIS allow my DELETE/PUT HTTP method in my application.... Can some one help me please?

    Read the article

  • Is it possible for a directory to get unlinked while its contained files remain?

    - by Walkerneo
    I used to wonder why deleting directories via PHP or shell wasn't as easy as it was in Windows with just clicking delete. I realize now that deleting is simply unlinking files from the file allocation table, so to delete a directory, you must unlink all the files inside it. Is it ever possible for the directory's entry to be removed, but not those of the files inside it? Do operating systems periodically check for files that can't be reached in the file system?

    Read the article

  • Can I rename a file that is open on Windows XP?

    - by Radek
    I want to programatically rename a file and it could be open. It's a log file. When I was testing my code the rename part didn't work because the log file TestPro.log was open by the TAF (Test Automation Framework). When TestPro is running and I try to delete the file I get the error "Cannot delete because is being used by another person or program." Is there any way how to rename a file (programatically) that is open the way the log file was?

    Read the article

  • Using wildcards with the rmdir or rd command

    - by serdar
    Let's say there are some folder in the D: drive: D:\Air D:\Abonden D:\All D:\Whatever I want to delete all folders starting with "A" (including all subfolders and files). I tried this command: rmdir D:\A* /s /q I get an error, though :( The filename, directory name, or volume label syntax is incorrect. The del command works with *, but I need to delete folders as well. Is there a way to achieve that via the rmdir command?

    Read the article

  • Removing orphan vmware images

    - by Brad Bruce
    I am trying to remove some VMWare images that were created by a machine that is no longer available. We do not plan to use VMWare and would like to clear up the space. I get a message Cannot delete [filename]... for all of the files in these directories. Can anyone tell me how to delete them (short of reformatting)? Thanks

    Read the article

  • JSF: how to update the list after delete an item of that list

    - by Harry Pham
    It will take a moment for me to explain this, so please stay with me. I have table COMMENT that has OneToMany relationship with itself. @Entity public class Comment(){ ... @ManyToOne(optional=true, fetch=FetchType.LAZY) @JoinColumn(name="REPLYTO_ID") private Comment replyTo; @OneToMany(mappedBy="replyTo", cascade=CascadeType.ALL) private List<Comment> replies = new ArrayList<Comment>(); public void addReply(NewsFeed reply){ replies.add(reply); reply.setReplyTo(this); } public void removeReply(NewsFeed reply){ replies.remove(reply); } } So you can think like this. Each comment can have a List of replies which are also type Comment. Now it is very easy for me to delete the original comment and get the updated list back. All I need to do after delete is this. allComments = myEJB.getAllComments(); //This will query the db and return updated list But I am having problem when trying to delete replies and getting the updated list back. So here is how I delete the replies. Inside my managed bean I have //Before invoke this method, I have the value of originalFeed, and deletedFeed set. //These original comments are display inside a p:dataTable X, and the replies are //displayed inside p:dataTable Y which is inside X. So when I click the delete button //I know which comment I want to delete, and if it is the replies, I will know //which one is its original post public void deleteFeed(){ if(this.deletedFeed != null){ scholarEJB.deleteFeeds(this.deletedFeed); if(this.originalFeed != null){ //Since the originalFeed is not null, this is the `replies` //that I want to delete scholarEJB.removeReply(this.originalFeed, this.deletedFeed); } feeds = scholarEJB.findAllFeed(); } } Then inside my EJB scholarEJB, I have public void removeReply(NewsFeed comment, NewsFeed reply){ comment = em.merge(comment); comment.removeReply(reply); em.persist(comment); } public void deleteFeeds(NewsFeed e){ e = em.find(NewsFeed.class, e.getId()); em.remove(e); } When I get out, the entity (the reply) get correctly removed from the database, but inside the feeds List, reference of that reply still there. It only until I log out and log back in that the reply disappear. Please help

    Read the article

  • Cleaning up a dynamic array of Objects in C++

    - by Dr. Monkey
    I'm a bit confused about handling an array of objects in C++, as I can't seem to find information about how they are passed around (reference or value) and how they are stored in an array. I would expect an array of objects to be an array of pointers to that object type, but I haven't found this written anywhere. Would they be pointers, or would the objects themselves be laid out in memory in an array? In the example below, a custom class myClass holds a string (would this make it of variable size, or does the string object hold a pointer to a string and therefore take up a consistent amount of space. I try to create a dynamic array of myClass objects within a myContainer. In the myContainer.addObject() method I attempt to make a bigger array, copy all the objects into it along with a new object, then delete the old one. I'm not at all confident that I'm cleaning up my memory properly with my destructors - what improvements could I make in this area? class myClass { private string myName; public unsigned short myAmount; myClass(string name, unsigned short amount) { myName = name; myAmount = amount; } //Do I need a destructor here? I don't think so because I don't do any // dynamic memory allocation within this class } class myContainer { int numObjects; myClass * myObjects; myContainer() { numObjects = 0; } ~myContainer() { //Is this sufficient? //Or do I need to iterate through myObjects and delete each // individually? delete [] myObjects; } void addObject(string name, unsigned short amount) { myClass newObject = new myClass(name, amount); myClass * tempObjects; tempObjects = new myClass[numObjects+1]; for (int i=0; i<numObjects; i++) tempObjects[i] = myObjects[i]); tempObjects[numObjects] = newObject; numObjects++; delete newObject; //Will this delete all my objects? I think it won't. //I'm just trying to delete the old array, and have the new array hold // all the objects plus the new object. delete [] myObjects; myObjects = tempObjects; } }

    Read the article

  • Rails destroy confirm with Jquery AJAX

    - by Mike
    I have got this working for the most part. My rails link is: <%= link_to(image_tag('/images/bin.png', :alt => 'Remove'), @business, :class => 'delete', :confirm => 'Are you sure?', :id => 'trash') %> :class = "delete" is calling an ajax function so that it is deleted and the page isn't refreshed that works great. But because the page doesn't refresh, it is still there. So my id trash is calling this jquery function: $('[id^=trash]').click(function(){ var row = $(this).closest("tr").get(0); $(row).hide(); return false; }); Which is hiding the row of whatever trash icon i clicked on. This also works great. I thought I had it all worked out and then I hit this problem. When you click on my trash can I have this confirm box pop up to ask you if you are sure. Regardless of whether you choose cancel or accept, the jquery fires and it hides the row. It isn't deleted, only hidden till you refresh the page. I tried changing it so that the prompt is done through jquery, but then rails was deleteing the row regardless of what i choose in my prompt because the .destroy function was being called when the prompt was being called. My question really is how can i get the value to cancel or accept from the rails confirm pop up so that in my jquery I can have an if statement that hides if they click accept and does nothing if they click cancel. EDIT: Answering Question below. That did not work. I tried changing my link to: <%= link_to(image_tag('/images/bin.png', :alt => 'Remove'), @business, :class => "delete", :onclick => "trash") %> and putting this in my jquery function trash(){ if(confirm("Are you sure?")){ var row = $(this).closest("tr").get(0); $(row).hide(); return false; } else { //they clicked no. } } But the function was never called. It just deletes it with no prompt and doesn't hide it. But that gave me an idea. I took the delete function that ajax was calling $('a.delete').click (function(){ $.post(this.href, {_method:'delete'}, null, "script"); $(row).hide(); }); And modified it implementing your code: remove :confirm = 'Are you sure?' $('a.delete').click (function(){ if(confirm("Are you sure?")){ var row = $(this).closest("tr").get(0); $.post(this.href, {_method:'delete'}, null, "script"); $(row).hide(); return false; } else { //they clicked no. return false; } }); Which does the trick.

    Read the article

  • Trying to delete a directory stored on a WIndows server, mounted on a mac

    - by AdamG
    I am trying to delete a directory stored on a Windows 2008 R2 server, mounted on a Mac as network home (10.8.5). The directory was created by Safari and stores temporary internet files. I need to be able to delete this folder on logout from a Mac bash script. The Terminal on Mac shows the directory as empty: 36W-FacRm-02:History lwickham$ cd /home/lwickham/Library/Caches/Metadata/Safari/History 36W-FacRm-02:History lwickham$ ls -al total 0 drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:24 . drwx------ 1 lwickham CGPS\Domain Users 264 Nov 8 09:28 .. However, on the Windows server it has a single 0kb file that doesn't start with a "." but yet is invisible to the Mac. E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History>dir Volume in drive E is FacultyUsers2 Volume Serial Number is 8C17-4EF3 Directory of E:\FacultyHome2\lwickham\Library\Caches\Metadata\Safari\History 11/08/2013 09:24 AM <DIR> . 11/08/2013 09:24 AM <DIR> .. 11/07/2013 04:28 PM 0 http?%2F%2Fwww.google.com%2Furl?sa=t&rct= j&q=&esrc=s&source=web&cd=6&ved=0CFsQFjAF&url=http%253A%252F%252Fwww.usbanklocat ions.com%252Fhsbc-bank-usa-96th-street-branch.html&ei=5vR7UtmXEPjfsATe0YCIBA&usg =AFQjCNF9ypKbpYbXRng00FY3W8Y6cF1Tiw&bvm=bv.56146854,d. 1 File(s) 0 bytes 2 Dir(s) 514,231,967,744 bytes free All my attempts to delete the dir from the Mac have failed: 36W-FacRm-02:History lwickham$ rm -fr /home/lwickham/Library/Caches/Metadata/Safari/History/* 36W-FacRm-02:History lwickham$ rm -frd /home/lwickham/Library/Caches/ rm: /home/lwickham/Library/Caches//Metadata/Safari/History: Directory not empty rm: /home/lwickham/Library/Caches//Metadata/Safari: Directory not empty rm: /home/lwickham/Library/Caches//Metadata: Directory not empty rm: /home/lwickham/Library/Caches/: Directory not empty

    Read the article

  • Why can I not edit, delete directories inside of this directory

    - by user43053
    Hello there, First, I thought this was PHP related, but maybe it isn't. My original post, which may be irrelevant now is located at the bottom. The problem is I have a directory : /articles/. In it are 10 sub directories. I have been changing the permissions lately, but now it seems all the permissions of the parent folder, sub-folders and files are either chmod 755 or 777. I cannot move, delete or edit files inside of this parent directory or sub-directories with my FTP-client. I can however edit, delete, create new files and directories and change them with PHP-functions without problems. What may the problem be? OLD POST. Ignore everything below this line: If I create a directory with mkdir(), or create a file with fopen(), file_put_contents() or SimpleXMLElement::asXML(), I am unable to access the file with my FTP-client or c-Panel File Manager. If I try to delete or edit them, I get errors. Dreamweaver suggests it is a permission problem or a network or filesystem fault (but I've set the permissions with chmod() to 0777, and when I check the cPanel, it confirms chmod 777. I also tried to use fileowner() and the function returns int(99), the same owner as those files that I could access with my FTP-client. It seems files and directories created with PHP can only be modified or be deleted with PHP. I thought this must be a server setup related issue, so I write it here. I am on a shared server, and I have no idea about setting up servers. EDIT: It seems the problem is different. I cannot move files with FTP-client to the parent, or sub-directories either. This problem may not be PHP related, then. It seems the problem applies to any directory, regardless of whether it was created by PHP. EDIT 2: The parent directory has chmod 755. Thank you for your time. Kind regards Marius

    Read the article

  • How to delete IPSEC VPN tunnel from Fortigate 60

    - by Björn
    I have had a IPSEC connection setup between two firewalls. Now I want to remove the tunnel in my firewall, a "Fortigate 60". There are two phases, "Phase 1" and "Phase 2" for each IPSEC connection. I can delete the "Phase 2" entry by clicking the trashcan icon (in the web interface), but there is not such icon for "Phase 1". Is it possible to delete that? When I look at the log it alerts about this tunnel not working (after deleting "Phase 2") and it would be nice not ta have loads of such events in the log. All ideas are appreciated.

    Read the article

  • Reorder cells in a UITableView without displaying a "delete" button

    - by iter
    I want to be able to reorder cells in a table, but not to delete or insert them. I want a picture like this: This image appears in Apple's Table View Programming Guige, but the code samples there produce a table with red "delete" buttons when the table goes into editing mode. I can set editingStyleForRowAtIndexPath to UITableViewCellEditingStyleNone and that makes the delete buttons go away, but the rows are still indented as if to make room for these buttons.

    Read the article

  • OSX: The item XYZ.txt~ can’t be moved to the Trash because it can’t be deleted

    - by dsg
    I'm trying to delete a file under OSX Lion, but can't. I get the following message: The item XYZ.txt~ can’t be moved to the Trash because it can’t be deleted. Here's what I've tried: select file and press COMMAND + DELETE (I get the message above.) renaming the file in finder (There is no option to rename the file.) sudo ls -a in a terminal (The file does not appear.) sudo rm XYZ.txt~ (I get "No such file or directory".) How do I remove this file? EDIT The file went away after restarting. My guess is that it was a glitch in finder.

    Read the article

  • OSX: Undeletable files

    - by geoffjentry
    So via what I suspect is a cron'd rsync gone awry, I noticed that I have ~25000 variants of .DS_Store in a directory that's on an external disk, they're named "..DS_Store.FOO" where FOO varies. The problem is that I can seem to delete them, even using the various tricks I've seen over the years for removing files with oddball names. No problem, I said - I moved all of the real files into another directory and then just tried to do an 'rm -r' on the original directory ... no luck, it fails to delete those files and says directory not empty. Tried it again with 'rm -rf' and still no luck. I have no idea how to get rid of this thing, does anyone have any idea?

    Read the article

  • Can't delete some directories as Admin

    - by PencilPusher77
    I am unable to delete the following directory in Windows 7 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\iTunes The error message that is displayed when I try is: "You need permission to perform this action. You require permission from the computer's administrator to make changes to this folder." I am an Administrator and have UAC set to "Never Notify". iTunes is not running either (it's been uninstalled). I have tried running cmd.exe using "Run as administrator" from the right click context menu, then executing rmdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" but it just returns "Access is denied." Any ideas why I can't delete this dir? Thanks!

    Read the article

  • home, end, delete, pageup, pagedown with ksh

    - by Nicolas
    Hello. I want to use home, end, delete, pageup, pagedown with ksh. My TERM is xterm-color. These keys works fine with tcsh and zsh, but not with ksh (print a tilda ~) I found this: bind '^[[3'=prefix-2 bind '^[[3~'=delete-char-forward bind '^[[1'=prefix-2 bind '^[[1~'=beginning-of-line bind '^[[4'=prefix-2 bind '^[[4~'=end-of-line But when I set one bindkey, the last does not work anymore. How can I use these keys in ksh with a .kshrc ? Thanks.

    Read the article

  • Deleting items from a ListView using a custom BaseAdapter

    - by HXCaine
    I am using a customised BaseAdapter to display items on a ListView. The items are just strings held in an ArrayList. The list items have a delete button on them (big red X), and I'd like to remove the item from the ArrayList, and notify the ListView to update itself. However, every implementation I've tried gets mysterious position numbers given to it, so for example clicking item 2's delete button will delete item 5's. It seems to be almost entirely random. One thing to note is that elements may be repeated, but must be kept in the same order. For example, I can have "Irish" twice, as elements 3 and 7. My code is below: private static class ViewHolder { TextView lang; int position; } public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.language_link_row, null); holder = new ViewHolder(); holder.lang = (TextView)convertView.findViewById(R.id.language_link_text); holder.position = position; final ImageView deleteButton = (ImageView) convertView.findViewById(R.id.language_link_cross_delete); deleteButton.setOnClickListener(this); convertView.setTag(holder); deleteButton.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.lang.setText(mLanguages.get(position)); return convertView; } I later attempt to retrieve the deleted element's position by grabbing the tag, but it's always the wrong position in the list. There is no noticeable pattern to the position given here, it always seems random. // The delete button's listener public void onClick(View v) { ViewHolder deleteHolder = (ViewHolder) v.getTag(); int pos = deleteHolder.position; ... ... ... } I would be quite happy to just delete the item from the ArrayList and have the ListView update itself, but the position I'm getting is incorrect so I can't do that. Please note that I did, at first, have the deleteButton clickListener inside the getView method, and used 'position' to delete the value, but I had the same problem. Any suggestions appreciated, this is really irritating me.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >