Gatling ElFileBody and parameter + static test - gatling

I want to parameterize just the NIN (05129996961) in this example (I have it in session).
"subject": {
"reference": "urn:uuid:c1015cfa-d6b6-4f06-8150-ced7dbea759c",
"type": "http://xxx/fhir/StructureDefinition/sfm-Patient",
"display": "Patient 05129996961"
},
Is there a way to say i.e. "display": "Patient + ${nin}" or something similar in the ElFileBody?

Plain old Gatling EL:
"subject": {
"reference": "urn:uuid:c1015cfa-d6b6-4f06-8150-ced7dbea759c",
"type": "http://xxx/fhir/StructureDefinition/sfm-Patient",
"display": "Patient #{nin}"
},

Related

Which properties are required for Solana NFT metadata?

This seems to be the most authoritative documentation that I've found so far: https://docs.metaplex.com/nft-standard
{
"name": "Solflare X NFT",
"symbol": "",
"description": "Celebratory Solflare NFT for the Solflare X launch",
"seller_fee_basis_points": 0,
"image": "https://www.arweave.net/abcd5678?ext=png",
"animation_url": "https://www.arweave.net/efgh1234?ext=mp4",
"external_url": "https://solflare.com",
"attributes": [
{ "trait_type": "web", "value": "yes" },
{ "trait_type": "mobile", "value": "yes" },
{ "trait_type": "extension", "value": "yes" }
],
"collection": { "name": "Solflare X NFT", "family": "Solflare" },
"properties": {
"files": [
{
"uri": "https://www.arweave.net/abcd5678?ext=png",
"type": "image/png"
},
{
"uri": "https://watch.videodelivery.net/9876jkl",
"type": "unknown",
"cdn": true
},
{ "uri": "https://www.arweave.net/efgh1234?ext=mp4", "type": "video/mp4" }
],
"category": "video",
"creators": [
{ "address": "SOLFLR15asd9d21325bsadythp547912501b", "share": 100 }
]
}
}
These same docs state clearly that many fields are optional and should be omitted when not used. But which fields are required and which ones are optional?
Depends what you want to use it for. The simplest requirements I have used were:
{
"name": "Solflare X NFT",
"seller_fee_basis_points": 0,
"image": "https://www.arweave.net/abcd5678?ext=png",
"properties": {
"files": [
{
"uri": "https://www.arweave.net/abcd5678?ext=png",
"type": "image/png"
}
],
"category": "image",
"creators": [
{ "address": "SOLFLR15asd9d21325bsadythp547912501b", "share": 100 }
]
}
}
There is no reason to not include the rest as the cost of hosting this off-chain is minimal. I think most things would be optional but the important ones for an NFT would be the image attribute, as otherwise the NFT wont be able to be displated anywhere, and probably then the propertiess field because some wallets, DApps and marketplaces might use these fields to check file type. Creators should also be added if you want to receive royalties and without this field could result in your collection failing to be listed on marketplaces.
A short answer though, the minimum is not defined anywhere as removing certain things could break certain third party DApps. Depending how/where you want to use your NFT I would find out the requirements if you are desperately trying to minimise the metadata. Otherwise try to keep most of it.

What are all the contents I can add to a Discord webhook?

I am making a discord webhook, and I want to know all the different things I can add to it.
As far as styling it goes; I only have a color and a message. (My code is not included besides that, just the code for the color and the message)
.setTitle('Biscuit AIO Cooked!')
.setColor('#84e1f4');
If anyone can link me a site or reply to me with all of the things I can add to the webhook, please do so :)
Read about message embeds and embed visualizer.
At last one of the features of a webhook is that you can send several embeds at once message. So code will looks like this.
{
"content": "this `supports` __a__ **subset** *of* ~~markdown~~ 😃 ```js\nfunction foo(bar) {\n console.log(bar);\n}\n\nfoo(1);```",
"embeds": [
{
"title": "title ~~(did you know you can have markdown here too?)~~",
"description": "this supports [named links](https://discordapp.com) on top of the previously shown subset of markdown. ```\nyes, even code blocks```",
"url": "https://discordapp.com",
"color": 11038012,
"timestamp": "2020-07-03T15:05:41.392Z",
"footer": {
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png",
"text": "footer text"
},
"thumbnail": {
"url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"image": {
"url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"author": {
"name": "author name",
"url": "https://discordapp.com",
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"fields": [
{
"name": "🤔",
"value": "some of these properties have certain limits..."
},
{
"name": "😱",
"value": "try exceeding some of them!"
},
{
"name": "🙄",
"value": "an informative error should show up, and this view will remain as-is until all issues are fixed"
},
{
"name": "<:thonkang:219069250692841473>",
"value": "these last two",
"inline": true
},
{
"name": "<:thonkang:219069250692841473>",
"value": "are inline fields",
"inline": true
}
]
},
{
"title": "title ~~(did you know you can have markdown here too?)~~",
"description": "this supports [named links](https://discordapp.com) on top of the previously shown subset of markdown. ```\nyes, even code blocks```",
"url": "https://discordapp.com",
"color": 11038012,
"timestamp": "2020-07-03T15:05:41.392Z",
"footer": {
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png",
"text": "footer text"
},
"thumbnail": {
"url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"image": {
"url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"author": {
"name": "author name",
"url": "https://discordapp.com",
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"fields": [
{
"name": "🤔",
"value": "some of these properties have certain limits..."
},
{
"name": "😱",
"value": "try exceeding some of them!"
},
{
"name": "🙄",
"value": "an informative error should show up, and this view will remain as-is until all issues are fixed"
},
{
"name": "<:thonkang:219069250692841473>",
"value": "these last two",
"inline": true
},
{
"name": "<:thonkang:219069250692841473>",
"value": "are inline fields",
"inline": true
}
]
}
]
}

Teams adaptive card wait for respons in Logic App

I'm trying out adaptive cards in an attempt to integrate warnings through logic apps with teams. the question i'm about to ask is related to having the connector in Logic app wait for an response from the adaptive card in Teams after being sent from the Logic app.
I've managed to create my adaptive card and in that card i have the necessary information and two actions at the bottom that i want my logic app to react on so to speak.
My Adaptive card looks something like this:
{
"type": "AdaptiveCard",
"version": "1.0",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"type": "TextBlock",
"text": "Alert - Employee email differences found:",
"weight": "Bolder",
"size": "Medium",
"horizontalAlignment": "Left",
"spacing": "Medium",
"maxLines": 0
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "New Email",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Test.Person21#mail.com"
},
{
"type": "TextBlock",
"text": "Test.Person22#mail.com"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Old Email",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Test.Person11#mail.com"
},
{
"type": "TextBlock",
"text": "Test.Person12#mail.com"
}
]
}
],
"separator": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Update Now",
"style": "positive",
"data": true
},
{
"type": "Action.Submit",
"title": "Dismiss",
"style": "destructive",
"data": false
}
]
}
As you can se when i push on "update now" i get the error message saying "there is no backend/app to connect to" (in swedish - "Can't reach application, try again") basically.
So again what i'm trying to do is for the Logic app to wait for the respons.
After the logic app has sen the message it "completes".
So is this possible? If so, how do i get this to work?
while logic apps can send cards to MS Teams they can not listen on actions performed on those cards.
To be able to use card actions you need to have a custom service made that listens and acts on those activities.

IBM Watson NLU Bluemix API not working for entities.sentiment=true

I'm using the Watson NLU service to get sentiment by entities and keywords, but the output has only document sentiment.
I don't know what's going wrong. I want to know the count of occurrences and the sentiment for keywords and entities.
Example output:
{
"sentiment": {
"document": {
"score": 0.567576,
"label": "positive"
}
},
"language": "pt",
"keywords": [
{
"text": "CNN teste",
"relevance": 0.996733
}
],
"entities": [
{
"type": "Company",
"text": "CNN",
"relevance": 0.846667,
"count": 3
}
],
"language": "pt"
}
I don't think there is an issue here as the sentiment results are dependent on the text you're sending to the API. I made this request using Postman with new credentials in Bluemix for the NLU service. I received sentiment for the entities, but not the keyword.
However, if you make the request using some longer sample text as shown in the documentation (https://www.ibm.com/watson/developercloud/natural-language-understanding/api/v1/#post-analyze), the returned keywords do get a sentiment score.
Also, if you add some additional text to the paramater you're sending in your question, you do get sentiment for the keywords. In this case I passed:
{"text":"CNN test, CNN test, ola tudo bem? This is another CNN test for IBM Watson"}
and received the following response:
{
"sentiment": {
"document": {
"score": 0,
"label": "neutral"
}
},
"keywords": [
{
"text": "ola tudo bem",
"sentiment": {
"score": 0.35067
},
"relevance": 0.942955
},
{
"text": "CNN test",
"sentiment": {
"score": 0
},
"relevance": 0.778042
},
{
"text": "IBM Watson",
"sentiment": {
"score": 0
},
"relevance": 0.370733
}
],
"entities": [
{
"type": "Company",
"text": "CNN",
"sentiment": {
"score": 0
},
"relevance": 0.932122,
"disambiguation": {
"subtype": [
"Broadcast",
"AwardWinner",
"RadioNetwork",
"TVNetwork"
],
"name": "CNN",
"dbpedia_resource": "http://dbpedia.org/resource/CNN"
},
"count": 3
},
{
"type": "Company",
"text": "IBM Watson",
"sentiment": {
"score": 0
},
"relevance": 0.302698,
"count": 1
}
],
"language": "en"
}
You can see from the above response that the keywords and entities are now returning a sentiment score.
I suggest trying another test of the API with a more realistic (re: longer) text parameter and confirm the results.

Problems while creating bigquery table schema

Using Google BigQuery I need to manually create a table and load the data contained in the json file. I am using BigQuery UI, but unable to define the schema for the data, a sample of the same is given below. The problem comes with the json array as below.
{"Author": "Pranesh Nageshwar", "headline": "Train trashes crashed car", "charactercount": 1027, "dateLive": "2014-01-14", "keywords": ["train crash", "freight train", "online reporting page", "side road", "blue mountains", "new south wales", "australia", "blaxland", "new south wales", "australia", "crime stoppers", "springwood police station", "train tracks"], "id": "1226801299367"}
Arrays of values in BigQuery are represented as a field with a repeated mode. The schema you want is probably the following. If you copy and paste this into the box in the web UI, I think it will work.
[
{
"name": "author",
"type": "string"
},
{
"name": "headline",
"type": "string"
},
{
"name": "charactercount",
"type": "integer"
},
{
"name": "dateLive",
"type": "string",
},
{
"name": "keywords",
"type": "string",
"mode": "repeated"
},
{
"name": "id",
"type": "string"
}
]

Resources