Search Results

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

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

  • Error when I try to connect to a SQL Server 2005 from the internet

    - by Manish
    My SQL Server is on a local machine. I want to access it through internet. I created a website through I want to connect local SQL Server 2005. This is the error message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Thanks for a reply!

    Read the article

  • What virtualization solution should I try next, after hitting problems w/ VMWare Player in dual-netw

    - by Alex R
    I have been using VMWare Player 2.5 for a while (Ubuntu guest on Vista host, 32-bit). VMWare had worked great until now but then I hit a brick wall: Due to some reorganization of my home network, the host machine now has to use a wireless connection to reach the Internet, while the printer, fileserver, and other important stuff are attached to a local gigabit hub. I have tried several tricks, such as editing the .vmx file, changing settings in vmnetcfg, etc, but I'm still unable to get the virtual Ubuntu box to connect each of the two virtual NICs to different networks (I did get it to recognize two NICs, but both DHCP'd onto the gigabit LAN). So, I'm ready to dump vmware for something with a little more low-level control of network settings. Virtualization is such a crowded space, I could spend months evaluating every product out there. I'm hoping for a shortcut... Can anyone recommend the best VM for my situation described above? Thanks

    Read the article

  • getting a weird error whenever I try restarting apache

    - by Binny Zupnick
    I'm trying to install apache, php5, mysql, and phpmyadmin. And I'm following a tutorial but this error keeps happening here's the error: apache2: Syntax error on line 227 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpmyadmin/apache.conf: No such file or directory Action 'configtest' failed. The Apache error log may have more information. ...fail! I've tried removing all of them and reinstalling but, to no avail. I'm pulling my hair out over this so, thanks in advance! =) edit: during the tutorial I screwed up and deleting something, lol, so I know that's the issue I just don't know what to do about it now

    Read the article

  • Someone try to hack my site, want to understand the log

    - by garconcn
    I have a wordpress site hosted on CentOS 6. After see the following access log, I checked the server, it seems ok. Can anyone explain what does this guy trying to do? Did they get what they want? I have disabled allow_url_include, and restricted open_basedir to web dir and tmp(/etc is not in the path). 190.26.208.130 - - [05/Sep/2012:21:24:42 -0700] "POST http://my_ip/?-d%20allow_url_include%3DOn+-d%20auto_prepend_file%3D../../../../../../../../../../../../etc/passwd%00%20-n/?-d%20allow_url_include%3DOn+-d%20auto_prepend_file%3D../../../../../../../../../../../../etc/passwd%00%20-n HTTP/1.1" 200 32656 "-" "Mozilla/5.0"

    Read the article

  • Error when I try to install Windows 7

    - by zorgo
    I currently have Ubuntu and I downloaded Windows 7 because I want change to that. But when I put the installation dvd in it starts up fine but when I start to install an error message comes: Windows installation encountered an unexpected error. Verify that the installation sources are accessible, and restart the installation. Error code: 0x80000100 I would be thankful for any help

    Read the article

  • Error when I try to install Windows 7

    - by zorgo
    I currently have Ubuntu and I downloaded Windows 7 because I want change to that. But when I put the installation dvd in it starts up fine but when I start to install an error message comes: Windows installation encountered an unexpected error. Verify that the installation sources are accessible, and restart the installation. Error code: 0x80000100 I would be thankful for any help

    Read the article

  • Block unknown callers at work, but let them through if they try again [migrated]

    - by Blazemore
    I have Tasker for Android but I don't know enough about it to be able to implement this. I'd like this to occur when I am connected to a specific wireless network: If someone phones who isn't in my contact list, reject the call immediately (straight to voicemail). If they call again within a certain amount of time (say, 30 seconds) allow the call to come through. Frankly, I can't even get the first one working. I know it's possible. The time thing is a kind of added bonus

    Read the article

  • How can I print the argument value that caused Exception in Java?

    - by Sanoj
    I am writing a parser for csv-files, and sometimes I get NumberFormatException. Is there an easy way to print the argument value that caused the exception? For the moment do I have many try-catch blocks that look like this: String ean; String price; try { builder.ean(Long.parseLong(ean)); } catch (NumberFormatException e) { System.out.println("EAN: " + ean); e.printStackTrace(); } try { builder.price(new BigDecimal(price)); } catch (NumberFormatException e) { System.out.println("Price: " + price); e.printStackTrace(); } I would like to be able to write something like: try { builder.ean(Long.parseLong(ean)); } catch (NumberFormatException e) { e.printMethod(); // Long.parseLong() e.printArgument(); // should print the string ean "99013241.23" e.printStackTrace(); } Is there any way that I at least can improve my code? And do this kind of printing/logging more programmatically?

    Read the article

  • Python try...except comma vs 'as' in except

    - by peter
    What is the difference between ',' and 'as' in except statements, eg: try: pass except Exception, exception: pass and: try: pass except Exception as exception: pass Is the second syntax legal in 2.6? It works in CPython 2.6 on Windows but the 2.5 interpreter in cygwin complains that it is invalid. If they are both valid in 2.6 which should I use?

    Read the article

  • Try-Catch or Check Length? C# XNA

    - by Shaded
    I was just wondering which would be cheaper, using a try catch block for index out of bounds or checking the length of a multi dimensional array and comparing values? I have a feeling it's the length, since I can store the length in a variable and then just do if's which are relatively cheap. I'm just not sure how expensive try-catch is. Thanks!

    Read the article

  • Performance of "returning" from a Try block

    - by Mystagogue
    Exception handling on Windows boxes (at least for C++) takes a performance hit if you exit a try block prematurely (such as executing a return statement) the same as if an exception were thrown. But what about C#? Is there a performance hit for returning prematuraly from a try block, whether through a return statement or break statement?

    Read the article

  • Python: try statement single line

    - by Brant
    Is there a way in python to turn a try/except into a single line? something like... b = 'some variable' a = c | b #try statement goes here Where b is a declared variable and c is not... so c would throw an error and a would become b...

    Read the article

  • Python urllib2 multiple try statement on urlopen()

    - by Kura
    So, simply I want to be able to run a for across a list of URLs, if one fails then I want to continue on to try the next. I've tried using the following but sadly it throws and exception if the first URL doesn't work. servers = ('http://www.google.com', 'http://www.stackoverflow.com') for server in servers: try: u = urllib2.urlopen(server) except urllib2.URLError: continue else: break else: raise Any ideas? Thanks in advance.

    Read the article

  • While try to open the project - getting error.

    - by Gopal
    Using Visual Studio 2008 I have .net file name like UPS.Tek, version - Visual Studio 2005 C# files are UPSReport.cs (Visual C# Source File) UPSConn.Cs (Visual C# Source File) UPSBase.cs (Visual C# Source File) ...., When i try to open the C# files individually in VS 2008, the C# files are opening But When I try to open this UPS.Tek in Visual Studio 2008, It showing error as "make sure the application for the project type .csproj is installed" How to solve this error.

    Read the article

  • When I try to install a magento extension apache resets

    - by user1438487
    When I try to install an extension apache resets. Magento ver. 1.6.2.0 I have all required extensions..curl mcrypt etc. Windows 7 with wampserver 2.2 mysql 5.5 php 5.3 apache 2.2.21 Whenever I try and install an extension from magento connect it starts saying: checking on dependencies..then apache restarts with... Parent: child process exited with status 255 -- Restarting. being the only thing in the log

    Read the article

  • 550 Error When I try to get the size of a file on an FTP

    - by Eric
    I'm trying to use an FtpWebRequest to get the size of a file on a company FTP. Yet whenever I try to get the response an exception is thrown. See the error details in the catch block in the code below. string uri = "ftp://ftp.domain.com/folder/folder/file.xxx"; FtpWebRequest sizeReq = (FtpWebRequest)WebRequest.Create(uri); sizeReq.Method = WebRequestMethods.Ftp.GetFileSize; sizeReq.Credentials = cred; sizeReq.UsePassive = proj.ServerConfig.UsePassive; //true sizeReq.UseBinary = proj.ServerConfig.UseBinary; //true sizeReq.KeepAlive = proj.ServerConfig.KeepAlive; //false long size; try { //Exception thrown here when I try to get the response using (FtpWebResponse fileSizeResponse = (FtpWebResponse)sizeReq.GetResponse()) { size = fileSizeResponse.ContentLength; } } catch(WebException exp) { FtpWebResponse resp = (FtpWebResponse)exp.Response; MessageBox.Show(exp.Message); // "The remote server returned an error: (550) File unavailable (e.g., file not found, no access)." MessageBox.Show(exp.Status.ToString()); //ProtcolError MessageBox.Show(resp.StatusCode.ToString()); // ActionNotTakenFileUnavailable MessageBox.Show(resp.StatusDescription.ToString()); //"550 SIZE: Operation not permitted\r\n" } This code does work, however, when connected to my personal FTP. The StatusDescription of the response says that the operation is "not permitted". Could it be that my office FTP just wont allow for the querying of a file size? I've also tried listing the directory details, which will return the size, and have noticed that my office FTP reports the directory details in a different format then my personal FTP. Maybe this is the problem? //work ftp ListDirectoryDetails -rw-r--r-- 1 (?) user 12345 Nov 16 20:28 some file name.xxx //personal ftp ListDirectoryDetails -rw-r--r-- 1 user user 12345 Mar 13 some file name.xxx From reading this blog post I think that my personal ftp is returning a Unix formatted response, but my work is returning a windows formatted response. Maybe this is unrelated but I thought I'd mention it.

    Read the article

  • PHP: Exception not caught by try ... catch

    - by Christian Brenner
    I currently am working on an autoloader class for one of my projects. Below is the code for the controller library: public static function includeFileContainingClass($classname) { $classname_rectified = str_replace(__NAMESPACE__.'\\', '', $classname); $controller_path = ENVIRONMENT_DIRECTROY_CONTROLLERS.strtolower($classname_rectified).'.controller.php'; if (file_exists($controller_path)) { include $controller_path; return true; } else { // TODO: Implement gettext('MSG_FILE_CONTROLLER_NOTFOUND') throw new Exception('File '.strtolower($classname_rectified).'.controller.php not found.'); return false; } } And here's the code of the file I try to invoke the autoloader on: try { spl_autoload_register(__NAMESPACE__.'\\Controller::includeFileContainingClass'); } catch (Exception $malfunction) { die($malfunction->getMessage()); } // TESTING ONLY $test = new Testing(); When I try to force a malfunction, I get the following message: Fatal error: Uncaught exception 'Exception' with message 'File testing.controller.php not found.' in D:\cerophine-0.0.1-alpha1\application\libraries\controller.library.php:51 Stack trace: #0 [internal function]: application\Controller::includeFileContainingClass('application\Tes...') #1 D:\cerophine-0.0.1-alpha1\index.php(58): spl_autoload_call('application\Tes...') #2 {main} thrown in D:\cerophine-0.0.1-alpha1\application\libraries\controller.library.php on line 51 What seems to be wrong?

    Read the article

  • Catch Multiple Custom Exceptions? - C++

    - by Alex
    Hi all, I'm a student in my first C++ programming class, and I'm working on a project where we have to create multiple custom exception classes, and then in one of our event handlers, use a try/catch block to handle them appropriately. My question is: How do I catch my multiple custom exceptions in my try/catch block? GetMessage() is a custom method in my exception classes that returns the exception explanation as a std::string. Below I've included all the relevant code from my project. Thanks for your help! try/catch block // This is in one of my event handlers, newEnd is a wxTextCtrl try { first.ValidateData(); newEndT = first.ComputeEndTime(); *newEnd << newEndT; } catch (// don't know what do to here) { wxMessageBox(_(e.GetMessage()), _("Something Went Wrong!"), wxOK | wxICON_INFORMATION, this);; } ValidateData() Method void Time::ValidateData() { int startHours, startMins, endHours, endMins; startHours = startTime / MINUTES_TO_HOURS; startMins = startTime % MINUTES_TO_HOURS; endHours = endTime / MINUTES_TO_HOURS; endMins = endTime % MINUTES_TO_HOURS; if (!(startHours <= HOURS_MAX && startHours >= HOURS_MIN)) throw new HourOutOfRangeException("Beginning Time Hour Out of Range!"); if (!(endHours <= HOURS_MAX && endHours >= HOURS_MIN)) throw new HourOutOfRangeException("Ending Time Hour Out of Range!"); if (!(startMins <= MINUTE_MAX && startMins >= MINUTE_MIN)) throw new MinuteOutOfRangeException("Starting Time Minute Out of Range!"); if (!(endMins <= MINUTE_MAX && endMins >= MINUTE_MIN)) throw new MinuteOutOfRangeException("Ending Time Minute Out of Range!"); if(!(timeDifference <= P_MAX && timeDifference >= P_MIN)) throw new PercentageOutOfRangeException("Percentage Change Out of Range!"); if (!(startTime < endTime)) throw new StartEndException("Start Time Cannot Be Less Than End Time!"); } Just one of my custom exception classes, the others have the same structure as this one class HourOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type HourOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~HourOutOfRangeException() {} private: string message; };

    Read the article

  • Have I to count transactions before rollback one in catch block in T-SQL?

    - by abatishchev
    I have next block in the end of each my stored procedure for SQL Server 2008 BEGIN TRY BEGIN TRAN -- my code COMMIT END TRY BEGIN CATCH IF (@@trancount > 0) BEGIN ROLLBACK DECLARE @message NVARCHAR(MAX) DECLARE @state INT SELECT @message = ERROR_MESSAGE(), @state = ERROR_STATE() RAISERROR (@message, 11, @state) END END CATCH Is it possible to switch CATCH-block to BEGIN CATCH ROLLBACK DECLARE @message NVARCHAR(MAX) DECLARE @state INT SELECT @message = ERROR_MESSAGE(), @state = ERROR_STATE() RAISERROR (@message, 11, @state) END CATCH or just BEGIN CATCH ROLLBACK END CATCH ?

    Read the article

  • does code in finally get run after a return in objective-c?

    - by Kevlar
    consider the following code: @try { if (something.notvalid) { return; } // do something else } @catch (NSException *ex) { // handle exception } @finally { NSLog(@"finally!"); } if something is not valid and i return from within the try, does the code in @finally execute or not? I believe that it should but others I've spoken to don't think so and i'm unable to test this at the moment.

    Read the article

  • null checking edit textbox android

    - by sara brown
    i want to make empty textbox checking for android. i tried try catch but it was force to close. below is my codes try{ name = (EditText)findViewById(R.id.name); }catch(NullPointerException ex){ new AlertDialog.Builder(KawalanAppXTVT.this).setTitle("Error" ) .setMessage("That's not a number") .setPositiveButton("OK", null).show(); can someone help me?

    Read the article

  • Validating result of JsonConvert.DeserializeObject (think "try parse") using JSON.Net

    - by Riri
    I have incoming messages that I need to try and parse in my own objects structure. SOme of these are well formed JSON obejcts and some are just nonsense. I use JsonConvert.DeserializeObject<MyObject>(incmoingString); to do this. This however sometimes gives me a exception when the incoming is total garbage. Other times I get a non-complete object structure when the incoming string is kind of OK - and finally it sometimes work. I've wrapped the conversion in a try/catch and than manually validate that I've gotten the properties I need to the deserialized result. Is there a better way to do this?

    Read the article

  • Rows dropping when I try to join data from two tables

    - by blcArmadillo
    I have a fairly simple query I'm try to write. If I run the following query: SELECT parts.id, parts.type_id FROM parts WHERE parts.type_id=1 OR parts.type_id=2 OR parts.type_id=4 ORDER BY parts.type_id; I get all the rows I expect to be returned. Now when I try to grab the parent_unit from another table with the following query six rows suddenly drop out of the result: SELECT parts.id, parts.type_id, sp.parent_unit FROM parts, serialized_parts sp WHERE (parts.type_id=1 OR parts.type_id=2 OR parts.type_id=4) AND sp.parts_id = parts.id ORDER BY parts.type_id In the past I've never really dealt with ORs in my queries so maybe I'm just doing it wrong. That said I'm guessing it's just a simple mistake. Let me know if you need sample data and I'll post some. Thanks.

    Read the article

  • Check For Duplicate Records VS try/catch Unique Key Constraint

    - by Jed
    I have a database table that has a Unique Key constraint defined to avoid duplicate records from occurring. I'm curious if it is bad practice to NOT manually check for duplicate records prior to running an INSERT statement on the table. In other words, should I run a SELECT statement using a WHERE clause that checks for duplicate values of the record that I am about to INSERT. If a record is found, then do not run the INSERT statement, otherwise go ahead and run the INSERT.... OR Just run the INSERT statement and try/catch the exception that may be thrown due to a Unique Key violation. I'm weighing the two perspectives and can't decide which is best- 1. Don't waste a SELECT call to check for duplicates when I can just trap for an exception VS 2. Don't be lazy by implementing ugly try/catch logic VS 3. ???Your thoughts here??? :)

    Read the article

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