Aurelia Value Converter Buggy Behavior with percentage - aurelia

I am trying to convert a user input to a percentage using aurelia converter and Numeral.js.
Here is the gist: https://gist.run/?id=5bbfa902b1d14bff6f506dfcf2045370
The conversion is buggy. Basically, when I am entering the number, it does not behave as expected. Sometimes, I am not able to enter the value, and sometimes it just enters wrong value. The behavior is random.
I am not sure if the error is caused by value converter trying to convert the number at the same time I am typing. Is there a workaround?

It's trying to update on every key stroke. You want it to update after leaving the input. Try using value.bind="score | numberFormat & updateTrigger:'blur'" instead.
You can learn more about binding behaviors in the Aurelia docs.

Related

Vue3 v-model value mask/formatting (german number format)

I have a simple vue component which has has an input and the related v-model.
What we want is to format/mask the value, the input should have the german number format (, and . switched (From 1,000,000.00 to 1.000.000,00). The (raw) value inside the component on the other side should have the raw (englisch format) value 1,000,000.00.
Or short: I need an input which shows the german number format, the raw value still should have the english format.
Thanks in advance
I already tried it with maska which shows the value correctly on the frontend, but the raw value is just an int instead of a float.
I also tried to use vue-number-format, but i always get Vue is not defined in the console.
I also searched on stackoverflow and found a few (older) workarounds with the focus and blur event, but this seems like a dirty implementation for me.

How to create a custom Allure step function for sensible data

I am currently working on a Testing Automation team, using Python and Allure to make reports of all the test cases that we run. Sometimes we deal with sensible data (e.g: passwords) that I can't show on the reports. If I use a function with a step decorator, something like this:
Which takes an element (a text box) and enters the value in it. In the step function I display the value that I want to enter, I could easily change that but the problem resides in the actual report. No matter what I enter on the step title, the report always shows the info that was passed as arguments to the function:
Thus, the "value" argument will always be displayed and that is something that I cannot have on certain projects. Is there anyway to make a custom step function that solves my problem?. I could either use with not showing the value at all or to change it to something like '*****'.
Just a thought.
#allure.step("Entering a value in element {3}")
def setSecureBoxValue(driver, element, value, box_name):
I solved my problem with the use of Fernet cryptography library.
I created a new function for the sensible data that encrypts the strings and then, inside this new function I call the one I shared on the screenshot (with a slight modification to decrypt the data). This results in the following report:

Apache Camel framework is converting the value 99999999999.99 into 9.999999999999E10

I have a json payload where one value for a key is 99999999999.99. When I pass this value, the camel is converting this into 9.999999999999E10. The camel version I'm using is 2.22.1.
I've upgraded the camel version to 2.23.2 but didn't work. I can upgrade to another version if needed.
I expect the value to be 99999999999.99. I need no conversion happening in the framework.
As #james-k-polk already commented, this is not a conversion but a different way to show the same number in Java.
The extension E10 means that the decimal point has to be shifted by 10 (e is for exponent, see also on Wikipedia).
So that means: 9.999999999999E10 is equal to 99999999999.99. It is just another way to display the same value.
If this different display form is causing a specific problem, create a new question for it.

Masked input vuejs without jQuery

Can anybody ask datepicker plugin, that can be available to input some date or choose a date from the calendar (without jQuery)? Entered value must be masked
It looks like this datepicker accepts a "format" argument, which is a mask. If the format doesn't work the way you need it to, you could probably write a directive to add a mask to the input element.

display warning when users enter a value greater than the actual value

can anyone give me some idea how to write a code to display warning when users enter a value greater than the actual value, but it still can enter values ​​for other fields. I use VB.net and access database. I think it is able to use onchange but i still don't have any idea to write the code
here is example
Use the built-in validation scheme. Example here :
http://msdn.microsoft.com/en-us/library/system.windows.data.binding.validatesondataerrors.aspx