This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
“Uncaught ReferenceError: JQueryValidatorUI is not defined”?
Any familiar with jquery-validation-ui plugin for grails, when I use it I get the error in chrome script tab, that JQueryValidatorUI can not be found. ("Uncaught ReferenceError: JQueryValidatorUI is not defined")
Here's the code that the chrome is complaining about:
// amended from existing remote method
JQueryValidatorUI = {
remote: function(validator, constraint, value, element, params) {
if ( validator.optional(element) )
It can be found here:
https://github.com/limcheekin/jquery-validation-ui/blob/master/web-app/js/jquery-validation-ui/grails-validation-methods.js
Thanks in advance,
Mika
removed JQueryValidatorUI and left the remote function named as remoteCall and called this one instead of JQueryValidatorUI.remote and it works...
Related
This question already has answers here:
Difference between . and : in Lua
(3 answers)
Closed 8 months ago.
local tab ={};
function tab:myFun(var,va1)
print(self) -- output 3
print(var,va1) -- output 4, nil
end
tab.myFun(3,4)
Instead of this:
tab.myFun(3,4)
You need to call it with:
tab:myFun(3,4)
I am using .net Graph SDK (Microsoft.Graph) version 3.21. I am following the below documentation link from Microsoft:
https://learn.microsoft.com/en-us/graph/api/range-clear?view=graph-rest-1.0&tabs=csharp
In this link, it is said that we can clear a range of cells and C# code to do so is given. When I try, I am getting error for the Clear
I am able to get Range, but the clear shows error.
Error CS1061 'IWorkbookWorksheetRangeRequestBuilder' does not contain a definition for 'Clear' and no accessible extension method 'Clear' accepting a first argument of type 'IWorkbookWorksheetRangeRequestBuilder' could be found (are you missing a using directive or an assembly reference?)
Am I missing something? What else am I supposed to do?
Note:
All other Graph calls work. I am able to retrieve Range:
var range = await _graphServiceClient.Sites["root"].Drives[file.ParentReference.DriveId]
.Items[file.Id].Workbook.Worksheets["Sheet1"].Range().Request().GetAsync();
It seems a bug, not only Clear but also Delete/Format/Merge... are not contained. There is a similar issue. The methods work in Java but not C#, Filipowicz251 has commented it in Github.
You could call HTTP Request to clear range values without sdk.
POST https://graph.microsoft.com/v1.0/me/drive/items/{id}/workbook/names/{name}/range/clear
Content-type: application/json
Content-length: 32
{
"applyTo": "applyTo-value"
}
Example here: https://vincentlauzon.com/2017/01/31/using-microsoft-graph-api-to-interact-with-azure-ad/
This question already has answers here:
How to escape a JSON string to have it in a URL?
(6 answers)
Closed 6 years ago.
I need to pass the following URL:
https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests?objectFilter={"virtualGuests":{"hostname":{"operation":"hostnameTest"}}}
I tried by different ways, but it doesn't work, this is part of my code:
System.out.println(
given().
when().get("https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests?objectFilter={\"virtualGuests\":{\"hostname\":{\"operation\":\"hostnameTest\"}}}").asString());
}
Exception:
java.lang.IllegalArgumentException: Invalid number of path parameters. Expected 1, was 0. Undefined path parameters are: "virtualGuests":{"hostname":{"operation":"hostnameTest".
According to the exception, I think I should need to use path parameters, I tried with that but I didn't have success.
Also, I tried to replace { with character escape code %7B.
Any ideas? Thanks in advance
I just tried this:
encodeURI('{"virtualGuests":{"hostname":{"operation":"hostnameTest"}}}')
And it gives me:
"%7B%22virtualGuests%22:%7B%22hostname%22:%7B%22operation%22:%22hostnameTest%22%7D%7D%7D"
Thanks a lot Sebastian and Robert!
I didn't have success using the encodeURI, however I used queryParam and it works
given().
queryParam("objectFilter", "{\"virtualGuests\":{\"hostname\":{\"operation\":\"hostnameTest\"}}}").
when().get("/SoftLayer_Account/getVirtualGuests")
.then().assertThat().body("id", hasItem(1111111));
Many Thanks!
This question already has an answer here:
WebStorm DartUnit with test api, run/debug error
(1 answer)
Closed 7 years ago.
This should be trivial but it is not working as I think it should. I am new to WebStorm.
I have a simple test taken from Dart's new test offering at https://pub.dartlang.org/packages/test
.dart
import "package:test/test.dart";
void main() {
test("String.split() splits the string on the delimiter", () {
var string = "foo,bar,baz";
expect(string.split(","), equals(["foo", "bar", "baz"]));
});
test("String.trim() removes surrounding whitespace", () {
var string = " foo ";
expect(string.trim(), equals("foo"));
});
}
Running this simple test gives the following exception:
J:\dart\dart-sdk\bin\dart.exe --ignore-unrecognized-flags --checked --package-root=J:\workspace\epimss\dart\epimss_shared\packages --enable-vm-service:60110 --trace_service_pause_events C:\Users\st.clair.clarke\AppData\Local\Temp\jetbrains_unit_config.dart
Testing started at 3:07 AM ...
Observatory listening on http://127.0.0.1:60110
Unhandled exception:
No top-level setter 'unittestConfiguration=' declared.
NoSuchMethodError: method not found: 'unittestConfiguration='
Receiver: top-level
Arguments: [Instance of 'JetBrainsUnitConfig']
#0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:188)
#1 main (file:///x:/Users/zang/AppData/Local/Temp/jetbrains_unit_config.dart:10:3)
#2 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:259)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)
Process finished with exit code 255
The problem seems to be the line unittestConfiguration = config; in the jetbrains configuration - something is expected for the config.
Any help is appreciated.
According to this issue, test package is not yet supported by WebStorm's testing framework.
You have two ways right now:
Run it as usual dart application, not as a test
Use deprecated unittest package instead of test until issue is resolved.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I've created custom 404 error pages for my symfony application, but they don't seem to work. In dev I see :
This request has been forwarded to a 404 error page by the action "blabla".
But in prod, the page is just blank; I get a 500 error.
In the logs, the error is :
PHP Parse error: syntax error, unexpected T_PUBLIC in /var/www/myproject/apps/myapp/modules/default/actions/actions.class.php on line 7
default/actions/actions.class.php is the following :
<?php
/**
* Error page for page not found (404) error
*
*/
public function executeError404()
{
}
public function executeSecure()
{
}
?>
I followed this tutorial on symfony-check.org
I found the answer all by myself :D
I'd forgotten part of the file :
class defaultActions extends sfActions
{
public function executeError404() {}
}