w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do I assign an error message, if the user does something wrong? Python
The standard way of issuing errors in python is with raise Exception("error message"). Or to use a subclass of Exception but in the same way. If you don't want to dump a stack track on the user, you can wrap the entire script in a try...except statement and use something like sys.stderr.write(str(e)) in the except block to just print the error message to STDERR. Then use sys.exit(1) to exit with a non-zero return code, or better use choose an appropriate return code from the errno module to pass to sys.exit. So I would do something like this (if I understand your question): import sys, errno try: for column in df: os.chdir(directory) if len(sys.argv)>2: for x in arguments: if x.endswith(column): # code to make histog

Categories : Python

Android "wrong password or username " message box display error
You should write this alertview code in click event. log.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { if(text1.getText().toString().equals(nam) && text2.getText().toString().equals(pass) ) { AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this); dlgAlert.setMessage("wrong password or username"); dlgAlert.setTitle("Error Message..."); dlgAlert.setPositiveButton("OK", null); dlgAlert.setCancelable(true); dlgAlert.create().show(); dlgAlert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { }

Categories : Android

error message appears in wrong place using jquery Validation plugin
I always seem to have the same problem. You can solve it with the errorPlacement parameter. $('form').validate({ errorPlacement: function(error, element) { // Get inputs with this name var obj = $('[name="'+element.attr('name')+'"]'); // Are there multiple? if (obj.length > 1) { // Add error after whatever the parent element is of the last one error.insertAfter(obj.last().parent()); } else { // Default, add error after the input error.insertAfter(obj); } } }); You'll have to figure out how you want to handle it, this is just one way. Demo: http://jsfiddle.net/PgAyp/

Categories : Jquery

Create a batch script to find the error message from output file, if error message found it has to run a java program
you can try this: find /i "ERROR" pdm_webstat.txt >nul 2>&1 && ( echo "ERROR" found REM run your Java program here ) || ( echo "ERROR" not found REM command if "ERROR" not found )

Categories : Batch File

Python error message 'No error message is available' using win32api
So you're new to Python--as I suggested in a comment, you need to figure out which values cause the error when the function is called. Try this: try: win32api.SetCursorPos((int(x1 + var_x + i*(float(dis_x)/n)), int(y1 + var_y + i*(float(dis_y)/n)))) except: print "error in SetCursorPos() with x1", x1, "y1", y1, "var_x", var_x, "var_y", var_y, "dis_x", dis_x, "dis_y", dis_y, "n", n raise The idea is to briefly intercept the exception, print all the arguments which caused it, then let it propagate as it did before (possibly terminating the program). Hopefully this will help you understand which arguments lead to errors.

Categories : Python

Spring form binding - use IllegalArgumentException message as error message
You might want to check BindingErrorProcessor used by WebDataBinder. There you can implement your own custom logic for translating exceptions to validation errors. Notes: You should implement your own exception (to be able to distinguish it from IllegalArgumentException thorwn by other components). You can initialize WebDataBinder with your custom BindingErrorProcessor within your @InitBinder method (or set specific WebBindingInitializer to your handler adapter).

Categories : Spring

Openfire offline message in wrong order
This seems to be an Openfire bug or misconfiguration. XMPP messages should be delivered in order: An XMPP server MUST ensure in-order processing of the stanzas and other XML elements it receives over a given input stream from a connected client or remote server. In-order processing applies (a) to any XML elements used to negotiate and manage XML streams, and (b) to all uses of XML stanzas, [...] -- RFC6120 Section 10.1 Offline messages are not explicitly mentioned, but they are just a server feature and not documented in the protocol. However there is no exception for them either - servers should still follow these rules. I recommend posting to the Openfire forum or filing a bug report.

Categories : Android

Mouse-Wheel sending message to the wrong control
VirtualTrees.pas includes the following declaration in the TBaseVirtualTree class: private procedure CMMouseWheel(var Message: TCMMouseWheel); message CM_MOUSEWHEEL; The component author captured the mouse wheel messages so he could first scroll vertically and then horizontally. The custom code is the reason that the mouse wheel messages are being sent to the TVirtualStringTree instead of the TComboBox. I commented out his code and the TComboBox drop-down list scrolled as expected. Since I really don't want to remove the TBaseVirtualTree code, I created my own TMyComboBox with the following code to use as the in-place editor. Now scrolling works correctly in both the drop-down list and in the tree control. interface type TMyCombBox = class(TComboBox) private procedure CM

Categories : Delphi

Compiler error message error:expected ')' before '*' token. Error with my constructor
costmap_2d::costmap2DROS* needs a forward declaration or you need to include the header file where it is defined. Because it is a pointer, a forward declarion is better. So before the class definition do this: namespace costmap_2d{ class costmap2DROS; }

Categories : C++

Parsley.js - Messages (data-error-message and data-type-number-message)
You should be using data-required-message instead of data-error-message for the "Port is required" message. Also, you may want digits instead of number if this is for a port-number field.

Categories : Validation

jquery ajax error message on 500 Internal Server Error different on tomcat and jetty
Sounds like Jetty and Tomcat are handling the response differently. Take a look at the Content-Type HTTP header, the HTTP status code returned by the server, and see if any error handlers are redirecting the response on the server before it makes it to the client. Some pseudo code that might serve as an example of what might work on the server: HttpServletResponse resp; // likely passed in as argument resp.setContentType("application/json"); try { // do something } catch (Exception e) { String jsonError = "{"error":"" + e.getMessage() + ""}"; resp.getWriter().print(jsonError); resp.sendError(500); } This way you should be able to use JQuery's $.ajaxError() event handler and parse the error message.

Categories : Jquery

How to solve error message about squirrel mail (ERROR: Connection dropped by IMAP)
Did you tried telnet to the server to port 143 try "telnet hostname _or_IP 143" Make sure that the entered E-mail account mailbox is exists in the server. Also make sure that the its MX is local domain if the domain points to the server in which you have installed squirrel mail. In case if its using remote MX then you need to use a domain that is having MX on the current server. dig +trace domain_name MX will show you the domain's MX record.

Categories : Misc

Try to use quatitize.js but got error message "Uncaught TypeError: Object # has no method 'palette'"
If you open the link to the current version of the script, you will see that this section of the code is commented out. Also on lines 38 and 39 it is specified that: * Returns a color map you can use to map original pixels to the reduced * palette. Still a work in progress. Therefore, I wouldn't expect it to work, perhaps there are some missing libraries. I suggest you update your code with the latest version at https://gist.github.com/nrabinowitz/1104622. Also, you can keep your page clean and separate the module. For example create a subdirectory assets, put the quantize.js in there and in your page include: <script src="/assets/quantize.js" type="text/javascript"></script>

Categories : Javascript

Google Drive API 1.4 error : Error occurred while sending a direct message or getting the response
I was having the same problem. I got it working eventually; I had a few things wrong. I went to the Google Cloud Console and regenerated and downloaded my key file. Go to APIs & auth->Registered Apps. The ONLY properties I put in the provider object are .ServiceAccountId and .Scope. I had to replace Scope with the actual scope and not use the enum value (This is only a problem because I am using VB). I'm working in Fusion Tables and the scope was rendering as just "Fusiontables" because VB.NET does not use the GetStringValue() enum function. Now I'm using "https://www.googleapis.com/auth/fusiontables". Go here for a list of valid scopes. For the ServiceAccountId, I used the service account "Email address:" with the "@" in it. (12345@developer.gserviceaccount.com), and not the on

Categories : C#

How do I combat "Error in Polygon" error message when trying to find centroid for map labeling?
The problem stems from splitting the dataframe on the wrong variable. You should use group, not subregion (see end of post), however, rather than by how about trying sapply instead? I think it gives nicer formatted and more easily useable output: t( sapply( unique(df$group) , function(x) Polygon(df[df$group==x,c("long","lat")])@labpt ) ) # [,1] [,2] # [1,] -92.40716 30.29909 # [2,] -92.82364 30.65532 # [3,] -90.91371 30.20234 # [4,] -91.06610 29.90319 # [5,] -92.00565 31.08009 # [6,] -93.34896 30.65511 # .......... edit the problem was more simple than I imagined! You were splitting on the wrong group variable, should be group NOT subregion. However, my solution gives nicer more useable output for placing labels than the funny formatting of by (IMHumbleO) centroids <-

Categories : R

R: error message --- package error: "functionName" not resolved from current namespace
This may have been solved by now; however, try setting the PACKAGE argument for the .C call in SolarSpectrum.PAR to "SolarSpectrum" (this may involve altering the package source files for SolarSpectrum.PAR). That may get R to look in the correct namespace (I haven't actually tried this, but it worked for a different package with the same error).

Categories : R

Error consuming Web Service: SOAP-ENV:Client Internal Server Error SoapDoc::CheckNameSpace: Wrong xml name space
After hours of investigation, i solved it, the problem was the Soap version, by default, Zend uses Soap 1.2. When i changed it to the 1.1 version, everything works perfectly. $params = array( 'soapVersion' => SOAP_1_1 ); $client = new Zend_Soap_Client($url, $params); I hope help somebody with this :D Greetings

Categories : PHP

Azure (HTTP 500 Internal Server Error). I need a better error message
Taken from the question: I figured it out. Go to your website in Azure Go to the configure page Roll down to a heading called site diagnostics Turn on detailed error message then click save at the bottom of the page. Your detailed errors will be logged in the diagnostics FTP site. Don't know why it took me so long to find it.

Categories : Azure

AWS data pipeline job failing but there is no error message or error code
Here are couple of things you could try Go to "https://console.aws.amazon.com/elasticmapreduce/home", find the corresponding cluster that got started (based on timestamp), click on "Debug", you should find logs about each step. Or start an EMR cluster from AWS Console, login into the Master node, run the Pig script to check if its working.

Categories : Amazon

Error: You have exceeded your disk space quota error message in git
I was hoping I can cleanup some redundant stuff and create more space You couldn't reduce significantly the size of an upstream repo from a downstream location. That upstream repo is likely a bare repo, and even deleting a branch wouldn't change much (a branch is just a pointer, and the reflog of that repo would still have the reference of the commits for that branch. All the commands mentioned in "Reduce git repository size" are local commands. So even without increasing the disk space, you would still need an admin to go on that server an clean that repo for you.

Categories : GIT

Twitter message posting issue ( Request failed with error: Error Domain=HTTP Code=410 "The operation couldn’t be completed. in ios app
It's not clear if you are using the iOS Twitter functionality, or another framework (but the oAuth makes me think it's another framework). The Twitter V1 API has been deprecated and retired. You should now use the 1.1 version: https://dev.twitter.com/blog/api-v1-is-retired This means the URI should have 1.1 in it, as opposed to just "1". https://dev.twitter.com/docs/api/1.1 I would try updating the framework you are using, or perhaps switching to the built in Twitter functionality, which streamlines the authentication process if the user has a Twitter account on their phone.

Categories : IOS

Java - sending a message to WebSphere message broker and its altering my message
How are you reading the message after it is received? are using readUTF method? If you have used writeUTF while sending a message, then you must use readUTF method retrieve the message body after receive. The "n" could actually be the length of the XML message as, in UTF string, the first two bytes indicate the length of the string that follows.

Categories : Java

Wrong kohana3 error when i have syntax error
I guess it's pretty normal that you don't see a syntax error, because kohana don't know where to start your application. Go to your bootstrap file in the application folder and fix that specific route.

Categories : Misc

Getting Error Message in Error Logcat and app not responding
you cant make network calls on your UI thread you need to move your login method to a new thread by either using the Async Class or by just starting a new thread and doing the login on there.

Categories : Android

Typescript Error Message error TS2173: Generic type references must include all type arguments
That line should have been: promise(type?: any, target?: any): JQueryPromise<any>; I'll send them a pull request. Thanks. JQueryPromise is a generic interface. i.e. it takes type parameters. Starting with TS 0.9.1.1 they are more strict about generic parameters. They must be specified from now on. This was allowed in previous versions (where the type was assumed to any implicitly) but the compiler analysis is stricter now (and the type must be specified explicitly).

Categories : Typescript

SQL Error Message
Try SELECT MATERIALID, MATERIALNAME, MATERIALTYPEID, CURECODEID, COMBINATIONCODE, MATERIALSTATUSID, ACTIVATED, DEACTIVATED FROM MATERIAL_HEADER WHERE MATERIALID = 112 AND MATERIALNAME = 3 AND MATERIALTYPEID = 2 AND CURECODEID = 0 AND COMBINATIONCODE = 3 AND MATERIALSTATUSID = 3; AND instead of ,

Categories : SQL

Cannot get SQL error message
Microsoft have an article on this, How to Retrieve Values in SQL Server Stored Procedures. This should give you an idea on how to resolve your problem.

Categories : C#

what is wrong with this code it gives error
dos.writeBytes("Content-Disposition: form-data; name="uploaded_file";"filename=""+ fileName + """ + lineEnd); double qoutes are not used within double qoutes, you need to put "" (backslash)

Categories : Android

MVC PHP - Displaying error message
In this case you can redirect like this header('location: '. URL .'myaccount/index?error'); and check in the view if $_GET['error'] is set echo the error. :D stupid way but I think it will work

Categories : PHP

Why will my error message not work?
It is because of the total conditions at the bottom, it is overriding the error messages you need something like if(!msg){ if (total < 10) { msg = "should be higher..."; } else if (total > 20) { msg = "super good ..."; } else { msg = "not bad."; } } Demo: Fiddle

Categories : Javascript

PowerPivot Error Message
You need to follow the instructions at the fowllowing website to turn off the UAC in Windows 7. That will allow PowerPivot to work. The link is http://technet.microsoft.com/en-us/library/cc731416(WS.10).aspx Jim

Categories : Excel

Message Queue Error
This error can occur when you exceed the MSMQ storage quota limits (default value is 1 GB for sum of bytes all queues). Check if your consumer can handle the amount of messages you send. The MSMQ performance counters are good tools to monitor this (MSMQ Service > Total bytes in all queues, for instance). If you have bursts of messages that make you hit the quota, you could possibly need to increase the quota. This is done in the Computer Management console > Services and Applications > Message Queuing > Properties.

Categories : C#

Diplay error message
You might want to use decorator @login_required: from django.contrib.auth.decorators import login_required @login_required(login_url='/your/login/url') def your_view(request): # your view code here Hope this helps.

Categories : Django

Creating an error message
A much easier way would be to simply create a CSS class error: .error { color: red; } Then just add the class to the p element on append: $("#intButton").click(function() { var errorMsg = ""; if (!$("#intMin").val()) errorMsg += "Enter a minimum value. <br />"; if (!$("#intMax").val()) errorMsg += "Enter a maximum value. "; //Display the error: $("#intResult").html("<p class='error'>" + errorMsg + "</p>"); });

Categories : Javascript

unknown RT error message
You'll find much more information in the logs on the RT server itself, especially if you up the log level to debug. You might have better luck using one of the python libraries available for calling RT. However, the version of RT you're running is fairly old, released in Jan. 2008. You may have trouble using current libraries with an old version of RT.

Categories : Python

Using resources with error message in mvc
Try this [Required(ErrorMessageResourceType = typeof(Resources.Resources), ErrorMessageResourceName = "enterYourEmail")] public String Email{ get; set; } [Required(ErrorMessageResourceType = typeof(Resources.Resources), ErrorMessageResourceName = "enterPassword")] public String Password { get; set;

Categories : Asp Net Mvc

php "hello word" error message when run on GAE
I believe there was a glitch in the just-released 1.8.1 SDK for PHP, and that the fix is to edit /google/appengine/tools/devappserver2/php/setup.php, adding the following to the $setup function definition: $allowed_buckets = ini_get( 'google_app_engine.allow_include_gs_buckets'); define('GAE_INCLUDE_REQUIRE_GS_STREAMS', // All values are considered true except the empty string. $allowed_buckets ? 1 : 0); (I'll confirm and update this message). I expect that a new version of the SDK will be uploaded very soon that fixes that issue. Update: yes, this is the correct patch. The SDK for the next release, which fixes this, should be available within a few weeks.

Categories : PHP

Exponent error message
You need to use the POWER function for exponents. ^ is Bitwise Exclusive OR

Categories : SQL

NSTimer with error message?
You misspelled 'target' as 'taget' in your method call. Do: self.timer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(timerFireMethod:) userInfo:nil repeats:NO]; Instead.

Categories : IOS

Joomla - PHP error message
I'm sure you can understand PHP, if not the error means that it cannot locate the file 'include/defines.php' from your website. Checking Have you got these files? includes/defines.php Side note We require more information, I shall edit my answer after getting these information from you: Version PHP version (phpinfo())

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.