on(rollover) and on(rollOver) both work,but I'm not sure if it's case sensitive?
A simple Google search has turned up: AS 1.0 was NOT case-sensitive, AS 2.0 and 3.0 ARE case-sensitive.
But,
Have you double checked your variable usage to make sure that you don't have variables with those names in scope?
Related
I have a list of domain name with parameters
http://www.anandinfra.net/project.php?id=2
http://artlinkinteriors.com/page.php?id=1
http://www.rabinmukherjeecollege.in/notice_details.php?id=1
I need to find other parts with domain and I have to replace those parts.
Finally my result should look as follows. Expected result:
http://www.anandinfra.net/
http://artlinkinteriors.com/
http://www.rabinmukherjeecollege.in/
How can I attain this result?
Hi you can create a CNAME in the DNS setting with the
http://www.anandinfra.net/project.php?id=2 pointing to http://www.anandinfra.net/
and same for the rest
In whatever programming language you use (which you don't disclose), find the relevant library handling URLs and use it to mutate them. DO NOT attempt to do that by string manipulation.
I have a lot of dialog files to translate from English to French. Google cloud translation API works fine but sometimes the translation returns "tu" and other times it returns "vous". In a nutshell, "tu" is informal and singular, while "vous" is formal and/or plural.
How to force the vous (formal) in all translations?
I checked documentation about glossaries, but it does not seem to be supported.
It is supported in this translator, but their API is not free.
Just checked myself and I don't believe this is possible with the API to simply favour formality, unfortunately.
Your best bet, if you don't want to use an alternative service, is to replace all instances of "tu" with "vous".
To achieve this, without replacing "tu" inside other words, you'll want to match and replace only "tu" as a standalone word, ensuring the size of each match is a length of 2.
Otherwise, you may end up creating things like tulip -> vouslip.
Unfortunately vous/tu is not a direct translation of a single word so the dictionary approach doesn't seem viable.
We can use
'PATCH /companies/:id' : 'CompanyController.find'
to update data.
One suggested me that I can use the alternative way:
'PATCH /companies/find?key=Value'
But I do not know what it works. Please explain me why we prefer ? mark than : mark in search path.
You can use either or. The biggest reason most people chose one or the other is just how they want to present the URL to the user.
Using a path variable (:) can symbolize you're accessing a defined resource, like a user ID, where as an argument (?) can symbolize you're are dynamically changing/searching something within a defined resource, like a token or search term.
From what I can tell that's the general practice I see:
example.com/user/:username
versus
example.com/user/?search="foo"
http://en.wikipedia.org/wiki/URL
If we are firing GET request, ? symbol is used to let the server know the url parameter variables starts from there. And this is commonly used. I didn't used : symbol instead of ?
You are probably messing the things up:
According to your example, :id indicates a variable that must me replaced by an actual value in some frameworks such as Express. See the documentation for details.
And ? indicates the beginning of the query string component according to the RFC 3986.
It's a rule to design rest api
you can find 'how to design a rest api'
Assuming below code is Sails.js
'PATCH /companies/:id' : 'CompanyController.find'
It will makes REST API that be mapped onto 'CompanyController.find' by using PathParam. Like this
www.example.com/companies/100
Second one will makes REST API by using QueryParam.
It also be mapped onto 'CompanyController.find'
/companies/find?key=Value
But the API format is different. Like this
www.example.com/companies/find?key=100
PathParam or QueryParam is fine to make REST API.
If the Key is primary for company entity,
I think PathParam is more proper than QueryParam.
I want to use Url-Mappings to transform the url.
"/blog/$system?"(controller:"blog", action:"home")
What I want to achieve is
"/blog/bob"
should become
"/blog/home?system=bob"
It doesn't seem to work as I excpected. What is my misunderstanding? Can I get this done? How?
remove the mapping, then Grails will use the default one:
"/$controller/$action"()
which in your case would be
/blog/home?system=bob
I am facing problem with the query parameters if they are in camelCase format.
for ex : http://localhost:9000/api/hello?personName=test
This format doesnt work with the Swagger UI. Swagger is not able to pickup any parameter defined in camelCase. It shows error "missing required params: presonName".
Hope this is clear now.
Adding one more screen shot with error
thanks
Wierd but true. I ended up finding something which is a very rare case. As you can see in the screen shot, I was using nodeType as a parameter and to my surprise, the word nodeType is a reserved word in "document" object of html. and thats the reason it creates a problem. I just changed the nodeType to nodeTypeStr and it works fine for me. But still it will be good if Swagger developers take care of handling the reserved words.