Artifactory latestVersion search for groupId that includes "." (dot) - artifactory

When searching for artifactory artifact using the latestVersion API, the g= (groupId) parameter specifies the layout where the artifact should be located. If the layout includes dots, then it's unclear how to escape the dots and consider them part of the object names.
This search fails since the layout is sensor/release-1.23/installers, but because dots are present in the object names, it's treated as the layout for the search API.
/artifactory/api/search/latestVersion?g=sensor.release-1.23.installers&a=sensor&repos=dev
Is there a workaround? escaping that can be used to specify that "release-1.23" should be treated as a single layout object and not split to "release-1", "23" ?

Related

How to access map in template string?

I want to use values from gradle.properties that should go into a template string.
A naive first:
println("${project.properties[somekey]}")
doesn't work: Unresolved reference: somekey
So, quotes required?
println("${project.properties[\"somekey\"]}")
is completely broken syntax: Expecting an expression for the first .
I couldn't find any example how to do this, yet the official documentation says expressions.
Question: is it possible to access a map in string template, and if so, how?
Yes and as follows:
"${project.properties["someKey"]}"
assuming the Map has the following signature: Map<String, Any?> (or Map<Any...)
Alternatives:
"${project.properties.getValue("someKey")}"
"${project.properties.getOrElse("someKey") { "lazy-evaluation-default-value" }}"
"${project.properties.getOrDefault("someKey", "someFixedDefaultValue")}"
Basically all the code you put in the ${} is just plain Kotlin code... no further quoting/escaping required, except for the dollar sign $ itself, e.g. use "\$test" if you do not want it to be substituted with a variable named test or """${"$"}test""" if you use a raw string
Note that in this println case the following would have sufficed as well (which also goes for all the shown alternatives above. You may omit the outer surrounding quotes and ${} altogether):
println(project.properties["someKey"])
See also Basic types - String templates

No point upon uploading CSV in QGIS

I'm using QGIS in mac, I'm following this tutorial yet the points isn't visible in my layers. I'm using csv that is separated by semicolon. I assigned value successfully yet no effect. How can I plot coordinates using google roads. Attached is my settings. Thanks in advance.
config 1
config 2
A comma, not a semi-colon, separates the fields in the "config" file.
In my installed QGIS version (3.3.0 Master) I was able to do this
-select a comma separated file
-indicate that the field delimiter is a comma
-indicate the "x" and "y" fields
-return to the custom delimiter area of the form and select a semi-colon
In my install, QGIS crashes. I'd rather see an error message.
If instead, I select a comma as a delimiter, the point layer is created and shown.
Hope this helps.

How to access a list-within-a-list inside a hash env in R, like for a Python dict

I am trying to use the hash package in R to replicate dictionary behavior in python. I have created it like this,
library(hash)
titles = hash(NAME = list("exact"=list('NAME','Age'), "partial"=list()),
Dt = list("exact"=list('Dt'), "partial"=list()),
CC = list("exact"=list(), "partial"=list()))
I can access the keys in the hash using keys(titles) , values using values(titles), and access values for a particular key using values(titles['Name']).
But how can I access the elements of the inner list? e.g. list('NAME','Age') ?
I need to access the elements based on its names, in this case - "exact" or else I need to know which element of the outer list this element belong to, whether its "exact" or "partial".
Simply:
titles[["NAME"]][["exact"]]
as hrbmstr wrote. There's nothing special about this whatsoever.
In your nested-list, "exact" and "partial" are simply two string keys. Again, there's no special magic significance to their names.
Also, this is in fact the recommended proper R syntax (esp. when the key is variable), it's not "bringing gosh-awful Python syntax".

"Element locator with prefix '| id' is not supported" error in Robot framework

I am using robot framework to test a GUI application ,
when I try to run the test case , got an error like
"Element locator with prefix '| id' is not supported " .
But I am using the latest version of selenium2library i.e.2.39.0 .
I will be thankful ,If somebody helps me out regarding the same .
and I have one more query ,i.e. how to click on the contents on GUI when working with robot framework
Thanks in advance
I think the only way you can get such an error message is if you mix two styles of cell separators in your test. For example, you may be mixing tabs and pipes, or multiple spaces and pipes.
Robot determines which format to use on a line-by line basis. First, it looks for a tab anywhere in the line being parsed, and if it finds it, it uses tabs to split the line. If it doesn't find a tab, it checks to see if the line begins with a pipe and space. If so, it uses the pipe for a separator. Failing that, it uses multiple spaces as the separator.
I can reproduce the exact error you are getting by mixing pipes with either a tab or multiple spaces. For example, the following will generate the exact same error you report:
# the next line begins with two spaces
click element | id=treeview_tv_active
Robot will detect the two leading spaces and decide to use spaces to split the line into cells. Thus, the first cell will be "click element" and the second cell will be "| id=treeview_tv_active". Selenium looks for everything before the "=" as the locator type, thus it's using "| id" as the locator, which is invalid and results in the error that you see.
Since you haven't shown us your code it's impossible to say for sure, but my guess is that the line causing the problem begins with a space or tab, or has a tab embedded somewhere else in the line, but later in the same line attempts to use pipes as cell separators.

When the url contains "e" it no longer matchs the requested route

More than a long talk to explain that bug, here's a screenshot that explains everything :
As soon as we enter an "e" inside the url which correspond to rss_category, it no longer match the route. See :
!
We resolved this by forcing a requirements for {slugCat} to accept anything .^ (they were no requirements before)
If that can help someone somday, and if anyone has a valid explanation, i'll be glad to hear (runing under Symfony 2.1.1).
Wow, difficult one. This happens because when compiling the route, symfony tries to use the character preceeding the variable name as a separator. This code is from RouteCompiler.php:
// Use the character preceding the variable as a separator
$separators = array($match[0][0][0]);
if ($pos !== $len) {
// Use the character following the variable as the separator when available
$separators[] = $pattern[$pos];
}
$regexp = sprintf('[^%s]+', preg_quote(implode('', array_unique($separators)), self::REGEX_DELIMITER));
Symfony does this because usually you will have some kind of separator before the variable name, a route like /upload/rssArticle/{slugCat}, where '/' would be the separator and it is trying to be helpful by letting you use this separator to separate variables in routes which contain several variables. In your case, the character before the variable is an 'e' and that character becomes a separator and that is why your route does not match. If your route had beed /upload/rssArticles{slugCat}, then the 's' would be the separator and that would be the character you would not be able to use.
Maybe you could create an issue on the symfony router component. I think that the preceeding character should not be used as a separator if it is a letter or a number.

Resources