Intellij IDEA cannot evaluate Groovy expression - grails

Sometimes Idea cannot evaluate Groovy expression and rises an error: java.lang.IllegalArgumentException : Invalid method. You can check it on the screen - experiment variable exists and it should be displayed...
What's the problem and how can it be solved?

I think that problem can be in your object toString metod which deguger uses.

Related

How to pass on Jenkins Build Parameters to JMETER Property Variable

I am trying to configure Jenkins Build Parameter "users" ,to be passed as input to JMETER (v5.1) --> No.Of Threads using the function:${__javaScript(Math.round(${XX}))}
While executing test i am getting following error
error : caused by jdk.nashorn.internal.runtime.ParserException::1:12 Expected but found { Math.round(${__jexl())}
Use a variable to store Math.round(${. Test it with println. Then Invoke ${__javaScript(myVariable)}. Nested ${} is a bad idea, groovy interprets them.
as M Navneet Krishna said, your question is a bit succinct for us to provide better answer. But I gave you a method that should help you debug your stuff

Fix "Procedure execution of ... failed on invalid input arguments" error

I've been trying to write a script-fu script for GIMP 2.6+ that uses one of the built-in script-fu methods, namely the script-fu-add-bevel method. My problem is that whenever I call it, either in the console or in my script, I get:
Error: Procedure execution of gimp-drawable-type-with-alpha failed on invalid input
arguments: Procedure 'gimp-drawable-type-with-alpha' has been called with an
invalid ID for argument 'drawable'. Most likely a plug-in is trying to work on a layer that
doesn't exist any longer.
This is really strange because I can clearly see by calling gimp-image-get-active-drawable with my image ID as the parameter that the layer ID that I'm passing to the script-fu method exists. The script is erroring while calling gimp-drawable-type-with-alpha, but I can call this method with the same ID in the console with no error. How can I fix this problem?
From this forum post, I learned that when calling a script-fu method, you shouldn't pass in the run-mode argument. This is done behind the scenes, and if you pass anything for that value, it will be interpreted as the second argument! This means that every argument you send in will be one parameter off, and it's only a matter of time before the script crashes.
So calling script-fu-add-bevel from another script-fu would look something like this:
(script-fu-add-bevel img layer bevel-width FALSE FALSE)

Does Rascal Java method AST also contain super() Expression for calls to super with arguments?

When I look at Java method AST declaration in Rascal, I see under Expression \super() node.
However in Java, you can also call super() with parameters. So, I expected to see something like : \super(list[Expression] arguments), but I do not see it.
Is it traced via \methodCall() or in some other way?
I could not try it myself because I get an error when I try to build an AST from a constructor with getMethodASTEclipse() method. I already opened an issue about this getMethodASTEclipse() error in the GitHub.

Using GCMathParser for iphone development

I am trying to use GCMathParser in my iPhone application. To compile it, I changed #import <Cocoa/Cocoa.h> to #import <UIKit/UIKit.h> and replaced pi with M_PI and successfully compiled the codes.
It works basically fine, but when I input wrong syntax like 3.3.3 or 3.. , I get syntax error as I am supposed to. But the next time I parse a very simple formula such as 5 , I still get syntax error for that. I made sure to allocate new instance to make sure it starts new, but still i get it. Does anyone have the same issue?
There seems to be a bug in the GCMathParser; however there is a way around. There is a fixed pattern : when a malformed expression is fed into the parser an exception is raised. Right after that even if a well formed expression is fed, the exception is raised again. The key point is to evaluate the well formed expression twice. First check if an exception was raised; if YES simply reevaluate the same expression. Upon evaluating the well formed expression the second time, exception is not raised.Voila!

Delphi: Closing Brackets Optional?

I have noticed quite a few times that syntax errors like
Exit(push(ASBDD(asPixmap, _ScriptSavePixmap(Script, PMRGBAdjust(_ScriptGetPixmap(Script, Args[0].Index), adjparams))));
actually compiles. Notice that one closing bracket ) is missing. (Of course it also compiles if I add this missing bracket!)
Is this a documented feature?
Additional info: The statement in question is the last statement in a code block. Inserting any statement after this statement will cause the compiler to report the correct missing ")" error.
It would appear that the compiler loses track of the missing ")" error when it encounters the end of the block. This is most likely a compiler bug. It seems likely to me that this anomaly has been around for a long time. Don't rely on it.

Resources