Search Results

Search found 9599 results on 384 pages for 'delete overload'.

Page 2/384 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Puzzle: Overload a C++ function according to the return value

    - by Motti
    We all know that you can overload a function according to the parameters: int mul(int i, int j) { return i*j; } std::string mul(char c, int n) { return std::string(n, c); } Can you overload a function according to the return value? Define a function that returns different things according to how the return value is used: int n = mul(6, 3); // n = 18 std::string s = mul(6, 3); // s = "666" // Note that both invocations take the exact same parameters (same types) You can assume the first parameter is between 0-9, no need to verify the input or have any error handling.

    Read the article

  • To Delete a tape from the ACSLSlibrary

    - by Senthil Kumar
    Hi Anyone there can help me out for an issue as below: There was a stuck tape in the drive and so the stuck tape was removed, but i need to logically delete the tape entry from NB, so that the same media can be inserted back for operations. Netback thinks that the tape is still in that location, hence it should be removed so that the entry is not there and NB does not recognise that the tape in that location, so the same tape can be taken in through inventory. The NB used is NB5.1 Any command to delete this entry, this is a clustered based Environment (Active/Passive), and we use a ACSLS library (Physical) as well a Switch-SN6000(Logical) Kindly help me out as when we tried to delete the media from GUI it said- Could not delete- Cannot delete assigned volume (92).

    Read the article

  • Is there any danger in calling free() or delete instead of delete[]? [closed]

    - by Matt Joiner
    Possible Duplicate: ( POD )freeing memory : is delete[] equal to delete ? Does delete deallocate the elements beyond the first in an array? char *s = new char[n]; delete s; Does it matter in the above case seeing as all the elements of s are allocated contiguously, and it shouldn't be possible to delete only a portion of the array? For more complex types, would delete call the destructor of objects beyond the first one? Object *p = new Object[n]; delete p; How can delete[] deduce the number of Objects beyond the first, wouldn't this mean it must know the size of the allocated memory region? What if the memory region was allocated with some overhang for performance reasons? For example one could assume that not all allocators would provide a granularity of a single byte. Then any particular allocation could exceed the required size for each element by a whole element or more. For primitive types, such as char, int, is there any difference between: int *p = new int[n]; delete p; delete[] p; free p; Except for the routes taken by the respective calls through the delete-free deallocation machinery?

    Read the article

  • Overload Anonymous Functions

    - by Nissan Fan
    Still wrapping my head around Delegates and I'm curious: Is it possible to overload anonymous functions? Such that: delegate void Output(string x, int y); Supports: Output show = (x, y) => Console.WriteLine("{0}: {1}", x.ToString(), y.ToString()); And: delegate void Output(string x, string y); Allowing: show( "ABC", "EFG" ); And: show( "ABC", 123 );

    Read the article

  • How to delete this file: Thumbs.db:encryptable

    - by Richard Lopes
    Thumbs.db:encryptable I found this file on my image folder, and i can't delete this. I've tryed reboot my pc, but doesn't works... please help me! Delete Thumbs.db:encryptable Edit1: When i try to delete a folder that contains this file, this message appears: del Thumbs.db* /s /f D: \ My Documents \ My Pictures \ My Photos Christmas \ Thumbs.db: encryptable The system can not find the file specified.

    Read the article

  • UX question: is better to have "serious delete" or have "trash"

    - by ftrotter
    I am developing an application that allows for a user to manage some individual data points. One of the things that my users will want to do is "delete" but what should that mean? For a web application is it better to present a user with the option to have serious delete or to use a "trash" system? Under "serious delete" (would love to know if there is a better name for this...) you click "delete" and then the user is warned "this is final and tragic action. Once you do this you will not be able to get -insert data point name here- back, even if you are crying..." Then if they click delete... well it truly is gone forever. Under the "trash" model, you never trust that the user really wants to delete... instead you remove the data point from the "main display" and put into a bucket called "the trash". This gets it out of the users way, which is what they usually want, but they can get it back if they make a mistake. Obviously this is the way most operating systems have gone. The advantages of "serious delete" are: Easy to implement Easy to explain to users The disadvantages of "serious delete" are: it can be tragically final sometimes, cats walk on keyboards The advantages of the "trash" system are: user is safe from themselves bulk methods like "delete a bunch at once" make more sense saves support headaches The disadvantages of the "trash" system are": For sensitive data, you create an illusion of destruction users think something is gone, but it is not. Lots of subtle distinctions make implementation more difficult Do you "eventually" delete the contents of the trash? My question is which one is the right design pattern for modern web applications? With enough discussion to justify your answer... Would love to be pointed towards some relevant research. -FT

    Read the article

  • Active Directory: delete vs. disable departed employees

    - by Matt Rogish
    When an employee leaves your organization, do you delete or disable their Active Directory account? Our SOP is to disable, export/purge the Exchange mailbox, and then after "some time" has elapsed (usually quarterly), delete the account. Is there any need for that delay? After exporting and purging their mailbox, why shouldn't I delete the account right then and there?

    Read the article

  • reg delete gives me "access is denied" but regedit delete is ok

    - by Radek
    I need to delete a key from a command line. So I wanted to use reg delete "the key to be deleted" /f but I get ERROR: access is denied. From the same login session (the same user) I am able to delete the key without any troubles from regedit.exe that is not run as administrator. I cannot use runas command to execute reg that I believe would be to solution because in fact I want to use reg to delete registry entry for administrator profile so runas works again. More info in my other question Windows7 corrupted profile - prevention exists?

    Read the article

  • User unable to delete folder / files "File in use by another user" Server 2003

    - by Az
    I am administering a standalone Windows 2003 Terminal Server with no domain membership. Occasionally (about once a week or so) a user will attempt to delete a sub-folder in a Shared folder and gets denied with "File in use by another user". I tried checking the shared folder snap-in and that folder is not open. She has full control and is the owner of the folder as well. I even checked in "Effective permissions" for some of the folders / files she cant delete and she truly has full control. I am able to delete the folder as Administrator with no problem. Another odd thing, she can delete the files IN the folder most of the time (this issue happens on both folders and files in the share). Sometimes merely waiting a day or two will allow her to delete the folder or files. I am curious as to why she gets the message that it is in use as creator/owner with full control yet I don't get it simply as a member of the Admin group. If anyone out there has any ideas I'd love to hear them! THANK YOU.

    Read the article

  • Rails 3) Delete, Destory, and Routing

    - by Maximus S
    The problem is the code below <%= button_to t('.delete'), @post, :method => :delete, :class => :destroy %> My Post model has many relations that are dependent on delete. However, the code above will only remove the post, leaving its relations intact. The problem is that methods delete and destroy are different in that method delete doesn't instantiate the object. So I need to use "destroy" instead of "delete" my post. <%= button_to t('.delete'), @post, :method => :destroy %> gives me routing error. No route matches [POST] "/posts/2" <%= button_to t('.delete'), @post, Post.destroy(@post) %> deletes the post without clicking the button. Could anyone help me with this? UPDATE: application.js //= require jquery //= require jquery-ui //= require jquery_ujs //= require bootstrap-modal //= require bootstrap-typeahead //= require_tree . rake routes DELETE (/:locale)/posts/:id(.:format) posts#destroy Post model has_many :tag_links, :dependent => :destroy has_many :tags, :through => :tag_links Tag model has_many :tag_links, :dependent => :destroy has_many :posts, :through => :tag_links Problem: When I delete a post, all the tag_links are destroyed but tags still exist.

    Read the article

  • Windows 8 delete key always delete file permanently

    - by imgen
    Don't know why, but now my Delete key works the same as Shift + Delete which shows a 'Do you want to delete XXX permanently dialog. And it does not go through Recycle Bin anymore. How so? I am using the Windows 8 x64 edition. Update: My recycle bin setting is fine, that's why this is tricky. But the "Display delete confirmation dialog" check is checked and grayed out. That's one bit that is. The radio button of "Don't move files to recycle bin" is not checked.

    Read the article

  • unable to delete file (jpeg)

    - by ile
    I implemented helper for showing thumbnails from here Next to thumbnail, there is delete link which calls this controller // // HTTP POST: /Photo/Delete/1 [AcceptVerbs(HttpVerbs.Post)] public ActionResult Delete(int id, string confirmButton) { var path = "~/Uploads/Photos/"; Photo photo = photoRepository.GetPhoto(id); if (photo == null) return View("NotFound"); FileInfo TheFile = new FileInfo(Server.MapPath(path + photo.PhotoID + ".jpg")); if (TheFile.Exists) { photoRepository.Delete(photo); photoRepository.Save(); TheFile.Delete(); } else return View("NotFound"); return View(); } If I disable showing thumbnails then the file is deleted. Otherwise it sends error: System.IO.IOException: The process cannot access the file 'C:\Documents and Settings\ilija\My Documents\Visual Studio 2008\Projects\CMS\CMS\Uploads\Photos\26.jpg' because it is being used by another process. I also don't know if my file delete function is properly written. Searching on the net, I see everyone uses File.Delete(TheFile);, which i'm unable to use and I use TheFile.Delete(); For File.Delete(TheFile); i get following error: Error 1 'System.Web.Mvc.Controller.File(string, string, string)' is a 'method', which is not valid in the given context C:\Documents and Settings\ilija\My Documents\Visual Studio 2008\Projects\CMS\CMS\Controllers\PhotoController.cs 109 17 CMS Am I missing something here? Thanks in advance

    Read the article

  • Can't delete a directory on external drive (OS X)

    - by Martin Tóth
    I have a brand new Transcend StoreJet 25M3 (external HDD) mounted to MacBook (Leopard 10.5.8) at /Volumes/Transcend. I copied some data from my old Windows (XP) machine on it, and now, after cleaning some stuff up, I wanted to delete some directories, but this is what happened: $ rmdir My\ Pictures/ rmdir: My Pictures/: Operation not permitted Using Finder just asks for password, but does not delete the directory (sound of "moved to Trash" is played). I thought it's some permission "thing", but: $ ls -l drwxrwxrwx 1 martin staff 32768 5 jan 16:11 My Pictures/ $ sudo rm -rf My\ Pictures rm: My Pictures: Operation not permitted I re-mounted, rebooted (thinking that there's some file lock), but that did not help. What might have happened here? How to delete it?

    Read the article

  • How do you delete an iFolder from iFolder admin interface

    - by cheshirekow
    There are only two buttons at the bottom of the screen "enable" and "disable". When I check the box next to an iFolder one of them is lit (depending on what the state of the folder is)... but there is no button to delete the folder (as it seems there should be from the documentation). There is a delete button in the "orphaned" tab but how do you "orphan" an iFolder? I'm logged in to the admin interface as admin, who is currently the owner of the folder I wish to delete.

    Read the article

  • Cannot delete folder - Content seems to be nested recursively

    - by RikuXan
    I cannot delete a folder located on my hard disk by any means. I don't quite know how it was created, all I know is, that it is a pretty deep structure of folders (too deep to delete it at once, since Windows restriction path name too long), but the problem in the end is, that I can't "pull out" the inner folders, because they don't seem to be folders anymore (Context menu lacks things like "Properties", "Cut", "Copy", "Delete" etc.) Here a picture of how a right click looks like on one of these "folders": As you can see, the current folder is in very deep, but that is not the problem, rather the one I left-clicked on. Has anyone any advice on how to get rid of these? I tried a chkdsk, said no errors. I also tried deleting those folder via a VMWare Ubuntu, to no success. I also tried a batch file from a volunteer at MS boards, that should automatically de-nest such folders, but I guess mine is a special case, since the tool only created more such folders.

    Read the article

  • Can't delete file from windows 7

    - by r.s.mahanti
    I downloaded a torrent file from internet. The problem is it's size is showing 0 bytes. I tried to scan it with antivirus, upload it to virus total, delete it but it's showing the file is not found. I tried to delete it in safe mode also but no success. Can anybody explain me, what can be reason for this and what is the way to delete this file? Thanks in advance. My operating system is windows 7. EDIT : the name of the file is "[Torrentreactor.to] - Site Translator 4.06.torrent."

    Read the article

  • Can't delete folder in Windows 7

    - by user18526
    I'm trying to delete a folder in Windows 7 and get a perplexing error message: "Could not find this item: This is no longer located in G:\Graphics. Verify the item's location and try again. I can see the folder -- I can find it. I just can't delete it. I also get a second error message (sometimes) when I click on the folder: G:\Graphics 2009-11-17 refers to a location that is unavailable...this information might have been moved to a different location. I'm using Windows 7; this folder is on an external hard drive. I've emptied the folder (there were items in it); I've scanned that external hard drive for errors. Trying to rename the folder yields the same enigmatic error message. Is there a way to delete this folder?

    Read the article

  • mysql delete and foreign key constraint

    - by user121196
    I'm deleting selected rows from both table in MYSQL, the two tables have foreign keys. delete d,b from A as b inner join B as d on b.bid=d.bid where b.name like '%xxxx%'; MYSQL complains about foreign keys even though I'm trying to delete from both tables: Error: Cannot delete or update a parent row: a foreign key constraint fails (yyy/d, CONSTRAINT fk_d_bid FOREIGN KEY (bid) REFERENCES b (bid) ON DELETE NO ACTION ON UPDATE NO ACTION) what's the best solution here to delete from both table?

    Read the article

  • Delete a directory with pipe (|) in its name?

    - by Dave Jarvis
    Without booting to Linux, how do you delete a directory that was created in Linux on an NTFS partition that contains a pipe in the file name? For example: f:\flac\foreign\Yoshida_Brothers\Best_of_Yoshida_Brothers_|_Tsugaru_Shamisen Tried and failed: Midnight Commander Recursively deleting the parent folder del /f /s /q Yoshida_Brothers del /f /s /q "\\?f:\flac\foreign\Yoshida_Brothers\" rmdir /s Yoshida_Brothers rmdir Best* FileASSASSIN Cannot delete folder Other ideas?

    Read the article

  • How to delete corrupt folder?

    - by Ram Kumar
    I have a folder on the desktop which is about 1.6 GB in size. When I try to open it I get a message like this: The file or directory is corrupt or unreadable Fortunately, I have a backup of that folder so I want to get rid of this folder. If I try to delete it, it fails to delete however I can rename the folder, move it and do whatever except deletion. I've tried various methods but could not succeed. I am using Windows 8.1 Pro.

    Read the article

  • Excel 2010 Delete Rows with Locked Cells

    - by Roger
    I have a spreadsheet that has formulas that I want to lock, once the information in the row is completed, i.e. there is a discharge date, I want the end-user to be able to delete the row and insert it into another worksheet. I do not want to use VBA, I was successful in sequencing the protection steps, but now can not repeat the process. There has to be a way to use the protect sheet "delete rows" check box and locked cells together to enable this process

    Read the article

  • Delete files from directory: memory exhausted

    - by codeholic
    This question is a logical continuation of http://serverfault.com/questions/45245/how-can-i-delete-all-files-from-a-directory-when-it-reports-argument-list-too-lo I have drwxr-xr-x 2 doreshkin doreshkin 198291456 Apr 6 21:35 session_data I tried find session_data -type f -delete find session_data -type f | xargs rm -f find session_data -maxdepth 1 -type f -print0 | xargs -r0 rm -f The result is the same: find: memory exhausted What can I do to remove this directory?

    Read the article

  • Delete set of files using find command

    - by Dave Jarvis
    Background Delete a set of files, scattered across different directories. Problem The following code does not work (the unescaped | causes issues); for %i in (dir /s/b | find "lock") do echo del %i Question Without writing a batch file, how would you delete all files named "lock" (i.e., found using the find command) within the current directory and all subdirectories (including hidden directories)? Thank you!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >