What's the difference between domain.errors.hasErrors() and just domain.hasErrors()? - grails

Can someone please explain why sometimes grails developers use foo.errors.hasErrors() and other times they use just foo.hasErrors()? Are they synonymous or is one correct while the other is not?

Both are synonymous. See GormValidationApi.groovy. Domain.hasErrors delegates to underlying Errors object.

Related

OpenLayers 4 webmapcontext

In one of my projects i want to use OL-4.6.5 instead of OL-2. But one key feature that we are using is the OpelLayers.Format.WMC().
Is this functionallity available in OL-4.6.5.
Regards
Magnus
It is not, and it probably will never be, but you should be able to use JSONIX with ogc-schemas for this.

Cant update table in using isset

I have a table called settings, when I would change or enter data into the form it did not change the data in the table. In addition on form an image upload file is not running, There may be the wrong code below.
(Solved by me)
Maybe someone can help me Related to this.
What you are doing here is tottaly in secure and your data can be hacked / manipulate really fast.
Why dont you use a framework like codeignighter there are about 100 easy frameworks that will help you manage database a lot easyer.
Are you sure that you are updating the wrond ID? where id = 1, seems to be not dynamic.
Please post your error http://www.w3schools.com/php/func_mysql_error.asp
I know it is not so related to your question, but you should see these light frameworks:
http://kohanaframework.org/
https://github.com/ElbertF/Swiftlet
http://ellislab.com/codeigniter
You're not checking the return status of of your query, so if it's not working you wouldn't know. Do this:
mysql_query("UPDATE settings SET site='$name',keywords='$keys',descrp='$desc',email='$email',fbpage='$fbpage',twitter='$twitter',gplus='$gplus',disclaimer='$disclaimer',template='$template' WHERE id=1")
or die(mysql_error());
Note: mysql_*() is deprecated: you shouldn't use it. Use mysqli_*() or PDO instead.
Also: You are susceptible to an SQL Injection attack. You should escape your input variables with mysql_real_escape_string() (or the equivalent if you switch to mysqli), or consider moving to prepared statements.

Is ImageFigure() Constructor present in graphiti.js like draw2d?

i found one method ImageFigure() in draw2d. So i want to know is it presnt in graphiti.js also. If it present in graphiti then it solves my problem on grouping object.
Thanks In advance.
ImageShape or ImageFigure is not part of the current graphiti version. Graphiti tries to implement almost all functions/object from Draw2D......but it requires some time.

What is a "NullReferenceError" in ASP.NET MVC?

I keep getting "NullReferenceError" in my output, could someone kindly explain what exactly this statement means.
Somewhere in your code, you are trying to access a member of a reference type, but the variable actually is null. Without code and a stacktrace it's impossible to say what exactly happens. It might be because some parameter is expecting a value but isn't supplied one.
If it helps, a decent description of NullReferenceException -- why/when they occur, and how to prevent them -- at http://www.dotnetperls.com/nullreferenceexception

What/Where is the value of E_CLR_ALREADY_STARTED?

The docs for ICLRRuntimeHost::SetHostControl claim that it can return E_CLR_ALREADY_STARTED. I have been unable to find a definition for this value. Ideally, I'd like to know what the appropriate header to include is (it does not appear to be in corerror.h) but if someone can provide me with the canonical value too I can live with that.
Thanks
I can't seem to find it either and I'm usually pretty good at finding missing or misspelled constants. You could try calling the method after initializing the CLR and if it does in fact return the HRESULT that it's documented to return, you could just trace it. But it definitely seems like a documentation bug.

Resources