How to get LabelActionData of a Label - microsoft-information-protection

I'm trying to see how to get Labels that does not have any action data for encryption. I see in the SDK it lists LabelActionData as a class, but I can't see anything in the Labels themselves that lets me get the ActionData of that label. Is there anyway to get it via fileEngine to get the labelActionData of each label after getting all the labels with listLabels?

Related

In polotly.js, how may I get call a javascript callback called when a slider is changed, and get its current value as argument?

I want to build a web page in plotly.js for plotting a mathematical function depending on some parameters. I want the user to be able to change it using a slider.
For doing this, I need to call my own javascript function (to recalculate the points of the graph), get the current value of the slider and update the graph.
I've looking at the examples in
https://plotly.com/javascript/sliders/
but none of them does what I need, and the documentation
at
https://plotly.com/javascript/reference/layout/sliders/
is not clear at all. It seems that I need to set the "method" property (also "args"). It says
"Sets the Plotly method to be called when the slider value is changed. If the skip method is used, the API slider will function as normal but will perform no API calls and will not bind automatically to state updates. This may be used to create a component interface and attach to slider events manually via JavaScript."
What does it mean?
I already have an application using plotly dash at
https://github.com/pdenapo/normal_bivariada/blob/main/normal_bivariada_interactiva.py
and it is very easy to do using #app.callback. However,
I want to do the same in javascript (since I want to run it on a web server, where I cannot run a python application).
¡Many thanks for any help!

Use custom types (Substrate FRAME pallet + Polkadot/Substrate frontend)

Scenario: You are developing a FRAME pallet for a custom Substrate node that uses custom types within Storage or Events. To interact with your custom Substrate node, you use the Polkadot/Substrate frontend
Problem:
When you query the storage that contains your custom type, the frontend returns "unknown" as the value
When you submit an extrinsic to be included in a block that should lead to the emission of an event using the custom type, the Polkadot/Substrate frontend seems to get stuck while stating that the extrinsic is "ready" for inclusion in a block. This is not the case though, if you inspect the block the extrinsic should be included in, you can see the following error message:
Unable to retrieve the specified block details. createType(Vec):: Struct: failed on 'data':: Cannot construct unknown type YOUR_CUSTOM_TYPE
Solution: You have to specify your custom types in the Polkadot/Substrate frontend. To do so, select "Settings" -> "Developer" in the top menu bar:
Below you can see a text field titled "Additional types as a JSON file". In this text field you have to enter your custom types for the frontend to be able to interpret those correctly. In the top right corner, right below the version numbers, a big white question mark in a gray circle should be visible. By clicking on this question mark, an help dialog slides in.
Example configuration: Let's take the pallet I learned this lesson with as an example. In the highlighted lines, you see the custom enum "States":
pub enum States {
Propose,
VotePropose,
Concern,
VoteConcern,
VoteCouncil,
}
Using the help dialog (the white question mark), it turns out that the correct configuration JSON snippet looks like this:
"States": {
"_enum": [
"Propose",
"VotePropose",
"Concern",
"VoteConcern",
"VoteCouncil"
]
}
Now that metadata can be read from on chain this problem can't occur.

Kendo UI ComboBox for Angular: how to prevent Expected value of type Object error?

I am trying to make a Kendo ComboBox for Angular not crash with error "Prevent Expected value of type Object":
<kendo-combobox
formControlName="gender"
[data]="genders"
[textField]="'text'"
[valueField]="'value'"
[valuePrimitive]="false"
[filterable]="true"
[allowCustom]="true"
required
>
</kendo-combobox>
StackBlitz
The error can be obtained if the value is deleted and Tab is pressed (combo blur). In fact, by leaving an invalid value in the box, this error will occur.
I will explain below why I am using some settings:
textField and valueField - in my application I request complex objects and the selected value will provide some information to other form fields
[valuePrimitive]="false" - the selected value is a complex object
[allowCustom]="false" - I used this to allow the control to receive an initial value that is not among the list. In my application I am using server-side filtering with an empty initial list
When using in the application (server-side filtering) I also receive this error when pushing the arrow button, but I can get rid of this by either ensuring that initial value is within the list of values (ugly) or simply by removing the button.
Any idea about how to make this work?
According to Kendo UI for Angular you have to use a valueNormalizer function to convert what the user actually types into a valid object.
public valueNormalizer = (text: Observable<string>) => text.pipe(map((text: string) => {
return {
value: this.genders[this.genders.length - 1].value + 1, //whatever value
text: text
};
}));
Please check the updated Stackblitz and let me know if it is helpful.
valueNormalizer didn't work for me at all.
I went for a different solution (I can't post the code here because of security limitations in my company).
We want to allow an initial value and have to allow [allowCustomer]="true" because that initial value is not initially a part of the [data] array since we fetch it from the server.
I simply pushed the initial value to the [data] array and that fixes it. no need for [allowCustome]="true"

How to display an image from URL in Image component in Appery

I need to display an image using a URL that I receive from Push Notification. I tried many docs and blogs but couldn't find the correct solution. I don't want to download and store in DB.
the easiest way that i found to do this...
map the url to an image box and make it visible, set an events event to success, set action to Set property, set component name to what you want to show the image, set property to visibile and value to true leave check box empty as in this image success to html function

mColorPicker error 'Invalid Property value' in IE7

I have recently downloaded mColorPicker.js from here
However, I am running into some issue with this -
When user enters an invalid color value like '#454545xxxx' in the color box, I get a js error - Invalid Property value in IE7 (working fine in Firefox)
error is coming in
jquery-1.4.2.min.js,
line 116 - if(e)f[b]=d
when d = "#454545xxxx"
Also, ColorPicker image is hidden for this textbox.
Any ideas?
The reason this is happening is that the plugin is trying to set the value of the background colour to exactly what the user typed, without doing any validation checking to make sure it is a valid colour. The plugin calls the jQuery .css() method to do this, which is why the error is occurring inside jquery-1.4.2.min.js.
If you are able to modify the plugin code, you can then add checks to make sure the value entered is a valid colour before proceeding.
You might also suggest adding this feature to the plugin author, or, if you get it working successfully, submitting your updated code to them so they can benefit from your work.
I had a quick look, but I don't have the time to properly make the necessary changes to the plugin to ensure it correctly validates the colour is valid in all the right places. Good luck!

Resources