So I have to use a specific variable name (g-recaptcha-response) in my form post in order to pass a captcha process using google recaptcha V2. The thing is eslint will always complaint about the variable name wit the error "Parsing error: Const declarations require an initialization value". I know the problem it's because of the hyphenated name convention but I can't find anywhere the way to bypass this rule and I have to use that name since it's a re-captcha parameter that needs to be send with the form.
const g-recaptcha-response = await this.$recaptcha.getResponse(),
I need to make something like that work within an eslint /& vue-3 template with composition API, any feedback will be really appreciated.
Related
I created a Firebase Deep Link for my Flutter app to open the app after the registration process was successful. The link looks like the following:
https://myLinkDomain.page.link/routeName/
During the registration process, a parameter must be appended to the end of the link, which I must read out in the app for successful completion.
The problem is that if I append the parameter to the end of the link, I can no longer access it. The link in this case looked like this:
https://myLinkDomain.page.link/routeName/?myCustomParam=myValue
If the parameter is given in the middle of the link, I can use it in the app. Like this:
https://myLinkDomain.page.link/routeName/?myCustomParam=myValue&apn=someStuff&isi=someStuff&ibi=someStuff&ifl=someStuff
However, the registration process requires that the parameter be added to the end of the link.
Is there a way to build the Firebase Deep Link so that the parameter can be added at the end and still be recognised in the app?
Thanks for any help!
No matter when this parameter goes - at start or at the end of the line.
I had the same problem with passing some custom parameters to my app.
Here is we should start with manual url construction:
firebase manual link construction
I have no easy way to pass parameters, so I just change the link parameter body to put here more parameters:
https://example.page.link/?link=https://example.com/?route%3Dprofile%26param1%3DA%26param2%3DB&apn=some&isi=some&ibi=some
prefix: https://redecor.page.link/
main body in link parameter (should be encoded). There is the place for all needed parameters you want to pass (route=profile¶m1=A¶m2=B) - all parameters should be encoded!
encoded should be like this: route%3Dprofile%26param1%3DA%26param2%3DB
other parameters (what are they means you could read here) for firebase proposes (no needs to encode):
apn=some&isi=some&ibi=some
Never mind. The solution is to change the order of the url parameters: myLinkDomain.page.link/routeName/…
Sinon asserts are better when trying to check if a function was correctly called with arguments because it will tell you what part of the argument failed.
That said, I'm having trouble to get it to work with a custom matcher. The docs says that sinon.assert.calledWithMatch is the same as sinon.assert.calledWith(spy, sinon.match(args)), which led me to believe I could do
sinon.assert.calledWith(spy, sinon.match(args => args.foo = 'bar'))
But it seems that is not the case.
Am I doing something wrong?
I'm creating several commands programmatically and want to avoid having to add key mappings for them explicitly in keymap.cson.
The Flight Manual page for Keymap Manager shows an add method. It doesn't give an example of how to actually use this method, so my guess is that this should work:
atom.keymaps.add('atom-text-editor',{'alt-1':'custom:my-command'});
However, this does not appear to work. When I run this in the developer console, I get this message:
Encountered an invalid key binding when adding key bindings from 'atom-text-editor' 'custom:my-command'.
I got this message even if I changed alt to ctrl.
What does the correct method call on atom.keymaps look like.
I agree, the docs are not detailed enough. However, through trial and error, I managed to figure it out:
atom.keymaps.add('foo', {
'atom-text-editor' : {
'alt-1': 'custom:my-command',
'#': 'application:about'
// etc
}
});
Explanation:
atom.keymaps.add(source, bindings, priority);
The source argument is not the same as what is referred to as the selector in Atom speak. Instead, it's an identifier that can be used to remove the keybindings, should you wish to (except it seems they haven't actually implemented a remove method!).
Instead, the selector should go inside the bindings argument, as shown above.
in the following code what is the point of the third argument to rejectValue ?
errors.rejectValue("descriptions", "second_lang_desc_required", new String[] { secondLang.getCode() }, null );
I have this in the message value : Description in second language of application required {0} but this is exactly waht I see in the JSP, no replacement
According to Spring doc the purpose of the third argument is to provide a string array of arguments for replacing vars in messages.
In other words and telling from your code example its exactly what you expected it to be.
I guess you already checked if secondLang.getCode() is different from null. If so please have a look at whether or not you are using the latest release of org.springframework.
It is working in 4.2.4 but I remember having had to use a workaround before switching to 4.2.4 (Yes, of course - a clever guy would check change history and would 'know' instead of assuming, but I never claimed to be one, did I?)
Although you can generate by code contents with an id that starts with underscore, like "_foo" it seems that you can't traverse an item with this special id.
Every attempt to access a content named that way using a browser lead to a NotFound error. Neither methods like __bobotraverse__ or __getitem__ are called, like if this limitation is checked very early.
How this limitation works and how can I change it? Can I access subobjects with a prefix underscore in the id?
Found inside the unrestrictedTraverse implementation from OFS.Traversable:
if name[0] == '_':
# Never allowed in a URL.
raise NotFound, name
...but this is not enough. There's another check similar to the ones notified by #Mathias inside ZPublisher.BaseRequest.DefaultPublishTraverse in the publishTraverse method.
if name[:1]=='_':
raise Forbidden("Object name begins with an underscore at: %s" % URL)
The sad part is that is not simple to override this:
the unrestrictedTraverse is called on the Plone site context (so I can't customize it only for my content type)
the publishTraverse method is owned by the request implementation (maybe for this I can use ad custom publish traverser?)
The simplest way to fix this seems through monkeypatch.