Search Results

Search found 34195 results on 1368 pages for 'try'.

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

  • Can't copy paste on the first try

    - by Sunny88
    When I try to copy and paste something from firefox to say notepad or word, it doesn't work on the first try. That is I go to firefox, select text, right click, select copy, then switch to notepad, right click, select paste, but it pastes not the thing which I copied just now, but whatever was in the clipboard before I copied. If after this I go back to firefox and copy that text again, and then go back to notepad, then it will paste correctly. So in order to copy paste something it takes me 2 tries. This doesn't always happen this way, but only sometimes. So sometimes I can paste on first try, but sometimes it takes me two tries. I am using firefox 7.0.1 and windows 7. Also it is not only with firefox, sometimes the same thing happens when I copy paste from other programs. What could be the reason, and how can I fix this?

    Read the article

  • When to use try/catch

    - by coffeeaddict
    I'm always finding myself wanting to put a try/catch around the lets say Business Layer methods. But I feel though that I don't need a try/catch if I'm simply rethrowing it up to the Presentation Layer. Is that right? I should not be rethrowing an exception from code that's wrapped in a try/catch in a BL method and should be letting the caller which would be from the Presentation Layer code be using a try/catch to handle it there? The BL method will throw an error without the try/catch anyway..the compiler will. So it wouldn't make sense to use a try/catch in a BL method that's to be consumed by a layer higher up correct?

    Read the article

  • Try/Catch with jquery ajax request

    - by Anthony
    I am trying to build a Google Chrome extension that makes an ajax request. Something similar to the GMail Checker extension. The problem is that when I do the request using jquery, and I put in the wrong username/password, it fails silently, with the error callback function ignored. If I move the ajax call out of the background.html script (where I can't see the requests in the developer window), to the options.html script, I get a dialog box to re-authenticate. If I hit cancel, THEN the jquery error callback fires. But in the original model extension (again, the Gmail checker), they use plain (non-jquery) ajax calls with a try/catch, and if I put in the wrong credentials, I get an alert saying as much. I tried wrapping the entire jquery call in a try/catch, like so: try { $.ajax({ type: "POST", url: someurl, contentType : "text/xml", data: somedata, username: user, password: pass, success: function(data,status,xhr){ alert("Hurrah!"); }, error: function(xhr, status, error){ alert("Error!" + xhr.status); }, dataType: "xml" }); } catch(e) { alert("You messed something up!"); } But still nothing. Is the error due to it being asynchronous, or is Chrome not returning the request as an error since it wants to re-prompt for credentials? Or do I just not know how to use try/catch? Update Here is a very slimmed down version of how the model code does the request: var req = new XMLHttpRequest(); req.onreadystatechange = function() { try { if ( req.readyState == 4 ) { //Do some stuff with results } } catch (ex) { alert('Error parsing response.'); } } try { req.send (data); } catch (ex) { alert ('Something went wrong with the request.'); }

    Read the article

  • Does everything after my try statement have to be encompassed in that try statement to access variab

    - by Mithrax
    I'm learning java and one thing I've found that I don't like, is generally when I have code like this: import java.util.*; import java.io.*; public class GraphProblem { public static void main(String[] args) { if (args.length < 2) { System.out.println("Error: Please specify a graph file!"); return; } FileReader in = new FileReader(args[1]); Scanner input = new Scanner(in); int size = input.nextInt(); WeightedGraph graph = new WeightedGraph(size); for(int i = 0; i < size; i++) { graph.setLabel(i,Character.toString((char)('A' + i))); } for(int i = 0; i < size; i++) { for(int j = 0; j < size; j++) { graph.addEdge(i, j, input.nextInt()); } } // .. lots more code } } I have an uncaught exception around my FileReader. So, I have to wrap it in a try-catch to catch that specific exception. My question is does that try { } have to encompass everything after that in my method that wants to use either my FileReader (in) or my Scanner (input)? If I don't wrap the whole remainder of the program in that try statement, then anything outside of it can't access the in/input because it may of not been initialized or has been initialized outside of its scope. So I can't isolate the try-catch to just say the portion that intializes the FileReader and close the try statement immediately after that. So, is it the "best practice" to have the try statement wrapping all portions of the code that are going to access variables initialized in it? Thanks!

    Read the article

  • help me understand try and catch

    - by user295189
    I have this try and catch problem. I am trying to redirect to a different page. But sometimes it does and some times it doesnt. I think the problem is in try and catch . can someone help me understand this. Thanks var pg = new Object(); var da = document.all; var wo = window.opener; pg.changeHideReasonID = function(){ if(pg.hideReasonID.value == 0 && pg.hideReasonID.selectedIndex > 0){ pg.otherReason.style.backgroundColor = "ffffff"; pg.otherReason.disabled = 0; pg.otherReason.focus(); } else { pg.otherReason.style.backgroundColor = "f5f5f5"; pg.otherReason.disabled = 1; } } pg.exit = function(pid){ try { if(window.opener.hideRecordReload){ window.opener.hideRecordReload(pg.recordID, pg.recordTypeID); } else { window.opener.pg.hideRecord(pg.recordID, pg.recordTypeID); } } catch(e) {} try { window.opener.pg.hideEncounter(pg.recordID); } catch(e) {} try { window.opener.pg.hideRecordResponse(pg.hideReasonID.value == 0 ? pg.otherReason.value : pg.hideReasonID.options[pg.hideReasonID.selectedIndex].text); } catch(e) {} try { window.opener.pg.hideRecord_Response(pg.recordID, pg.recordTypeID); } catch(e) {} try { window.opener.pg.hideRecord_Response(pg.recordID, pg.recordTypeID); } catch(e) {} try { window.opener.window.parent.frames[1].pg.loadQualityMeasureRequest(); } catch(e) {} try { window.opener.pg.closeWindow(); } catch(e) {} parent.loadCenter2({reportName:'redirectedpage',patientID:pid}); parent.$.fancybox.close(); } pg.hideRecord = function(){ var pid = this.pid; pg.otherReason.value = pg.otherReason.value.trim(); if(pg.hideReasonID.selectedIndex == 0){ alert("You have not indicated your reason for hiding this record."); pg.hideReasonID.focus(); } else if(pg.hideReasonID.value == 0 && pg.hideReasonID.selectedIndex > 0 && pg.otherReason.value.length < 2){ alert("You have indicated that you wish to enter a reason\nnot on the list, but you have not entered a reason."); pg.otherReason.focus(); } else { pg.workin(1); var n = new Object(); n.noheaders = 1; n.recordID = pg.recordID; n.recordType = pg.recordType; n.recordTypeID = pg.recordTypeID; n.encounterID = request.encounterID; n.hideReasonID = pg.hideReasonID.value; n.hideReason = pg.hideReasonID.value == 0 ? pg.otherReason.value : pg.hideReasonID.options[pg.hideReasonID.selectedIndex].text; Connect.Ajax.Post("/emr/hideRecord/act_hideRecord.php", n, pg.exit(pid)); } } pg.init = function(){ pg.blocker = da.blocker; pg.hourglass = da.hourglass; pg.content = da.pageContent; pg.recordType = da.recordType.value; pg.recordID = parseInt(da.recordID.value); pg.recordTypeID = parseInt(da.recordTypeID.value); pg.information = da.information; pg.hideReasonID = da.hideReasonID; pg.hideReasonID.onchange = pg.changeHideReasonID; pg.hideReasonID.tabIndex = 1; pg.otherReason = da.otherReason; pg.otherReason.tabIndex = 2; pg.otherReason.onblur = function(){ this.value = this.value.trim(); } pg.otherReason.onfocus = function(){ this.select(); } pg.btnCancel = da.btnCancel; pg.btnCancel.tabIndex = 4; pg.btnCancel.title = "Close this window"; pg.btnCancel.onclick = function(){ //window.close(); parent.$.fancybox.close(); } pg.btnHide = da.btnHide; pg.btnHide.tabIndex = 3; pg.btnHide.onclick = pg.hideRecord; pg.btnHide.title = "Hide " + pg.recordType.toLowerCase() + " record"; document.body.onselectstart = function(){ if(event.srcElement.tagName.search(/INPUT|TEXT/i)){ return false; } } pg.workin(0); } pg.workin = function(){ var n = arguments.length ? arguments[0] : 1; pg.content.disabled = pg.hideReasonID.disabled = n; pg.blocker.style.display = pg.hourglass.style.display = n ? "block" : "none"; if(n){ pg.otherReason.disabled = 1; pg.otherReason.style.backgroundColor = "f5f5f5"; } else { pg.otherReason.disabled = !(pg.hideReasonID.value == 0 && pg.hideReasonID.selectedIndex > 0); pg.otherReason.style.backgroundColor = pg.otherReason.disabled ? "f5f5f5" : "ffffff"; pg.hideReasonID.focus(); } }

    Read the article

  • Windows crashes when I try to compress large .MOV file from iPhone

    - by Andrew
    I have a 40 minute, 6 gigabyte .MOV file that I transferred from my iPhone to my PC. I need to upload the video to Youtube but the file is too large. When I try to compress the video, my computer will shut off when the process reaches 3 or 4 percent. This has happened in Windows Live Movie Maker, Riva FLV encoder, and VLC. Any ideas on how I can get this file down to a reasonable size so I can upload it online?

    Read the article

  • Firefox or IE crashes when I try to print

    - by Vidar
    When I try to print a web page in either IE or Firefox - it just crashes? Any ideas? Printer works with other applications fine - like Word etc. It's only browser related for some strange reason. I am running XP SP3 - the printer is a Canon Laser Shot LBP 1120

    Read the article

  • Windows Media Center says "Searching for tuners" when I try to play live TV

    - by Louis
    After upgrading from Windows 8 Pro with Media Center to the 8.1 preview, I need some help in being able to watch live TV again. When I try to now, it says Please Wait. Searching for tuners. I tried reinstalling the software for the Hauppauge WinTV DCR-2650 TV tuner, and upgrading the firmware for both the tuner and the Cisco STA-1520 tuning adapter. I also tried swapping around the USB ports, cold-booting the devices, and running the Set Up TV Signal setting in WMC, but that says The TV signal cannot be configured because a TV tuner was not detected. Both devices look fine in Device Manager, reporting the "This device is working properly" status. I'm not sure if this is related, but I did have some network connectivity issues immediately after upgrading to Windows 8.1 where my either my subnet mask or default gateway was missing, and since the TV tuner shows up as a network device, I wonder if that might be related. However, I really don't know how those settings should look and Hyper-V sort of further complicates things with the virtual Ethernet adapters:

    Read the article

  • Lemonldap::ng + OpenID error in try generate

    - by spy86
    I am trying to configure authentication by OpenID in lemonldap::ng with this When I try http://auth.example.com/openidserver/username, I see following error: Unable to load Net::OpenID::Server Base class package "Net::OpenID::Server" is empty. (Perhaps you need to 'use' the module which defines that package first, or make that module available in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /etc/httpd). at /usr/share/perl5/vendor_perl/Lemonldap/NG/Portal/OpenID/Server.pm line 9 BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Lemonldap/NG/Portal/OpenID/Server.pm line 9, line 522. Compilation failed in require at /usr/share/perl5/vendor_perl/Lemonldap/NG/Portal/IssuerDBOpenID.pm line 40, line 522. LemonLDAP::NG Lemonldap::ng works in CentOS 6.4 and server have all update's

    Read the article

  • Ubuntu Deluge shows errors when downloading large bit torrent files and keeps erroring out after try

    - by MikeN
    Ubuntu Deluge shows errors when downloading large bit torrent files and keeps erroring out after trying to resume. The error on details shows: "Invalid argument". This happens for many large torrents that are running for several days (trying to download.) I try to "resume" and "force rechceck" but it never works. Smaller torrents seem to work ok. What is causing these torrents to never complete? Is there a way to force Deluge to keep auto-resuming every few minutes after a failure instead of just giving up?

    Read the article

  • webmin bind issue- error when i try to start bind

    - by Arvind
    I am setting up a domain = mydomain.com with 2 nameservers ns1.mydomain.com and ns2.mydomain.com in Webmin - BIND. For this, I have registered 2 child nameservers at my domain registrar, and in Webmin-Bind I have set up a new zone for this domain. In this zone, i have specified 2 nameserver records- one each for ns1 and ns2. Also, I have defined 2 address records- one each for ns1.mydomain.com -> IP Address #1 and for ns2.mydomain.com -> IP Address #2 However when I try to start BIND in Webmin, I get the following error-- Failed to start BIND : Starting named: Error in named configuration: zone mydomain.com/IN: has no NS records zone mydomain.com/IN: not loaded due to errors. _default/mydomain.com/IN: bad zone [FAILED]

    Read the article

  • Graphics card failure, anything I could try...

    - by ILMV
    My gaming PC has decided to die, it's not the first time but usually a quick ATX reset brings it back to life. Today it didn't. I disconnect all unessasary devices so I've only got the case button / LED cables, GPU, CPU, RAM and power connected, the computer still didn't turn on. I've not got a speaker on my motherboard so found a spare one I have for testing and when the machine starts up I get one long beep and two short beeps from my Award BIOS, which apparently means a video card error. I change it with the GPU from another machine and all works well. Q: So I have a faulty graphics card (an nVidia 8800GT OC), is there anything I can try to resurect it?

    Read the article

  • XenServer 6.2 crashes everytime I try to install a new Windows 7 x64 vm

    - by Erik
    I'm running XenServer 6.2 with all patches and updates on two boxes. One box is an intel core i7 2600K.. works great. My latest box is an AMD A10 APU.. and everytime I try to install Windows 7 OS as a guest.. I get to the screen where Windows files start to expand, and suddenly the entire box freezes up. Is there a log I can check, and or a way to migrate a working Windows 7 image I created on Box 1 over to Box 2?

    Read the article

  • Try exchange in real domain

    - by AndreaCi
    We (as a company) 'd like to try exchange server to replace our mail server. I downloaded the demo version from Microsoft website, but during the installation it wants administrator access to domain to edit the Active Directory database structure. The test will last for (at least) a month to see if it will bring real advantages to our management systems. Here is my question: Is it "dangerous"? If I uninstall the exchange server everything will be reverted to previous state? I'm kind of "scared" about the changes he may apply to our domain controllers.

    Read the article

  • Visual Studio 2008 crashes whenever I try to add a file to TFS

    - by Herms
    Wondering if anyone else has seen this or knows of a way to fix it. I have Visual Studio 2008 Pro with Team Explorer 2008 installed. Starting a couple of weeks ago any time I try to add a file to TFS (using the "Add Items to Folder" button in the Source Control Explorer window) VS crashes. I briefly see an "unhandled exception" dialog appear, but VS quits right after the dialog opens. I was able to see the exception at one point, and it looked like an index out of bounds exception trying to access some UI component list at -1 (can't remember the specifics, and it closes before I can bring it up now). I've tried uninstalling and reinstalling VS a couple of times already, along with resetting all of my settings. Neither helped.

    Read the article

  • Java io ugly try-finally block

    - by Tom Brito
    Is there a not so ugly way of treat the close() exception to close both streams then: InputStream in = new FileInputStream(inputFileName); OutputStream out = new FileOutputStream(outputFileName); try { copy(in, out); } finally { try { in.close(); } catch (Exception e) { try { // event if in.close fails, need to close the out out.close(); } catch (Exception e2) {} throw e; // and throw the 'in' exception } out.close(); }

    Read the article

  • How to show why "try" failed in python

    - by calccrypto
    is there anyway to show why a "try" failed, and skipped to "except", without writing out all the possible errors by hand, and without ending the program? example: try: 1/0 except: someway to show "Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> 1/0 ZeroDivisionError: integer division or modulo by zero" i dont want to doif:print error 1, elif: print error 2, elif: etc.... i want to see the error that would be shown had try not been there

    Read the article

  • php crashes when I try to add extensions

    - by Christy
    Hi all, I am trying to install phpmyadmin on my web server with Windows 2008 and iis 7. PHP is running fine and I have several sites that rely on it. When installing phpmyadmin - it has errors at the bottom that crypt and mbstring are not properly installed. When I try to add the php_mcrypt.dll and/or the php_mbstring.dll to the php.ini file (I verified the location and the right file through phpinfo) it crashes. I get a 500 error on all the websites, and I get an error on the server saying FastCGI has failed. Does anyone know how to fix this or why it is happening? Shouldn't I be able to add extenstions? I have the dll files in the extension folder, which is referenced in the php.ini and other extensions (installed previously) are working as expected. Other info: php version 5.2.8, pdo driver for mysql version 5.0.51a Thanks in advance!

    Read the article

  • "input cannot be resolved" when added a try..catch

    - by Mark
    I originally tried to get my throw statement to work without a try catch and the userInput = input.nextInt(); line worked fine. But when I tried adding the try..catch it didn't like my input saying it cannot be resolved. I don't think my try..catch is correct yet but I am planning on tackling that after I can get this input to be recognized but I would appreciate any feedback on things you see with that as well. Thanks import java.util.Scanner; public class Program6 { public static void main(String[] args) { final int NUMBER_HIGH_LIMIT = 100; final int NUMBER_LOW_LIMIT = 10; int userInput; try { System.out.print("Enter a number between 10 and 100: "); userInput = input.nextInt();//Says input cannot be resolved Verify v = new Verify(NUMBER_HIGH_LIMIT, NUMBER_LOW_LIMIT); } catch(NumberHighException exception) { userInput = 0; } catch(NumberLowException exception) { userInput = 0; } } }

    Read the article

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