What's the squiz matrix keyword format to use to get image varieties with a dynamic asset id? - content-management-system

The manual says to use the keyword %image_v_[variety-name]_url% to get the URL of a specific image variety, but what is the keyword format when you want the url for an image variety and all you have is a dynamic asset id in a metadata field?

You can use the ^as_asset format to get the value.
%asset_metadata_[metdatafield]^as_asset:image_v_[variety-name]_url%
for example
%asset_metadata_award.image^as_asset:image_v_img-md_url%

Related

How to parse the string content of debugDescription in XCUITest swift

As debugDescription returns the XCUIElement UI Tree and this if of type String.
Want to fetch specific information based upon parameters like label :[String] will return all the label values, find_Application - will return the bundleID etc
You can use element.snapshot().dictionaryRepresentation which gives a parsed version of output of element.debugDescription or element.snapshotDescription.
You can use element.snapshot().children to get the child element's snapshots iteratively if you want to create your own parser.

How to find a sub-string of a text in Tableau based on a separator character

I have a list of URL's in my data. This URL information also include the URL parameters. I want to find out a list of unique url's. I mean
https://root/member_portal/javax.faces.resource/beanvalidation.js.xhtml?ln=js
https://root/member_portal/javax.faces.resource/beanvalidation.js.xhtml?ln=js&v=6.0.0 should be the same.
Is there a text operation to create a calculated field which will find the substring before the "?" sign in the URL?
Assuming that your parameterised URL data is kept in [URL] field; you may use below formula to strip the main URL part:
LEFT([URL],FIND([URL], "?")-1)
FIND returns the position of "?" character in our URL field data. And LEFT returns everything before that index - 1.

Trello Api Find Card By Name

How do I find card by name in trello api?
One way I could think of is that we simply get all the cards for a board using boards/[board_id]/cards and then try to match the name of each card with what we have. But that looks a very inefficient way to do it as it would involve too many comparisons.
Is there any other way such that we could simply take in a card name and board name and then get the required card object?
If you know the cardid or shortlink you can use this endpoint https://trello.com/docs/api/card/
Also maybe this could be helpful https://trello.com/docs/api/search/index.html#get-1-search
You can use the Search endpoint, defining to search only cards (modelTypes: 'cards') and specifying the card name in the query parameter.
For example: https://api.trello.com/1/search?modelTypes=cards&query=MySpecialCard
Note that, according to the documentation, you cannot specify the fields you want to search via specific parameters, but it is possible to do that using the query string (query parameter). For example, to search for a card named My Special Card that has This is my special card as description, you can make this request: https://api.trello.com/1/search?modelTypes=cards&query=name:"My Special Card" description:"This is my special card.".
Although I couldn't find it on the documentation, it seems that the string that you can use as the query parameter follows the same format as the one available when doing searches via the regular user interface: https://blog.trello.com/the-secrets-of-superior-trello-searches.

Matlab - Name variable same as File name?

I'm building a facial recognition program and loading a whole bunch of images which will be used for training.
Currently, I'm reading my images in using double loops, iterating through subfolders in a folder.
Is there any way, as it iterates, that the images file name can be used before the image is read and stored?
eg. I have an image person001.jpg. How can you retrieve that name (person001) then read the image in like: person001 = imread('next iteration of loop which happens to be person001');
Thanks in advance.
I strongly recommend not to use unstructured variables. First it's very difficult to do operations like "iterate over all images", second you can get strange problems covering a function name with a variable name. Instead i would use a struct with dynamic field names or a map. A solution with a Map propably allows all possible file names.
Dynamic field names:
dirlisting=dir('.jpg');
for imageIX=1:numel(dirlisting)
%cut of extension:
[~,name,~]=fileparts(dirlisting(imageIX).name);
allImages.(name)=imread(dirlisting(imageIX).name);
end
You can access the images in a struct with allImages.person001 or allImages.(x)
Map:
allImages=containers.Map
dirlisting=dir('.jpg');
for imageIX=1:numel(dirlisting)
%cut of extension:
[~,name,~]=fileparts(dirlisting(imageIX).name);
allImages(name)=imread(dirlisting(imageIX).name);
end
You can access the images in a Map using allImages('person001'). Using a Map there is no need to cut of the file extension.

Open Graph Warnings That Should Be Fixed?

I'm using Facebook Open Graph through WordPress SEO Plugin by Yoast, How do I resolve this issue? On Facebook my website URL is not displaying the description and thumbnail?
Extraneous Property
Objects of this type do not allow properties named 'fb:page_id'.
Parser Mismatched Metadata
The parser's result for this metadata did not match the input
metadata. Likely, this was caused by the data being ordered in an
unexpected way, multiple values being given for a property only
expecting a single value, or property values for a given property
being mismatched. Here are the input property =>content pairs that
were not seen in the parsed result: 'og:locale:locale => en_US,
fb:page_id => 2052817970'
Remove the fb:page_id meta tag; it's deprecated since December - if you see any references to it still in the documentation they're incorrect and need to be updated