Questions tagged [masking]

Force user input to conform to given rules.

Input masking restricts inputs for a given UI element without actually performing validation. Instead of collecting and validating user input, the masking approach restricts the inputs that a user can make in the first place.

An example of this would be a text field that is set to accept telephone numbers from a given country: instead of collecting digits and letters, and then validating them against the format, an input-masked field will only allow digits to be input, and will only accept them in an order that forms a valid input.

When dealing with arrays / matrices 'masking' means to ignoring certain parts of the array an only use the unmasked elements for further calculations.

1153 questions
5
votes
5 answers

Is masking required in this case?

In the below code is the masking required for the assignment.. unsigned int x = 0x01020304; unsigned char a1, a2, a3, a4; a1 = (x >> 24) & 0xff; a2 = (x >> 16) & 0xff; a3 = (x >> 8) & 0xff; a4 = x & 0xff ; I do realize that it works well without…
Vijay
  • 73
  • 1
  • 4
5
votes
1 answer

Imask.js set currency symbol to the and of number by appending changeable double zero to the end of price

How to do input masking something like this by appending doube zero by default to the end of price using js library imask.js or with plain javascript : 3.380.321,00 $ var currencyMask = IMask( document.getElementById('price'), { mask:…
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125
5
votes
4 answers

Why does java.util.Random use the mask?

Simplified (i.e., leaving concurrency out) Random.next(int bits) looks like protected int next(int bits) { seed = (seed * multiplier + addend) & mask; return (int) (seed >>> (48 - bits)); } where masking gets used to reduce the seed to 48…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
5
votes
1 answer

How to apply masking layer to sequential CNN model in Keras?

I have a problem of applying masking layer to CNNs in RNN/LSTM model. My data is not original image, but I converted into a shape of (16, 34, 4)(channels_first). The data is sequential, and the longest step length is 22. So for invariant way, I set…
Gao
  • 51
  • 1
  • 5
5
votes
1 answer

Dynamic data masking with Entity framework

Is it possible to use SQL's Dynamic data masking with Entity framework? If it is possible, is there any way to combine it with Asp.Identity? Project I'm working on requires that data is masked for certain user roles and visible to others. We are…
Matt
  • 1,245
  • 2
  • 17
  • 32
5
votes
1 answer

Is there is difference between the keras layers Masking() and Embedding(mask_zero =True)?

The documentation for the Embedding layer is here: https://keras.io/layers/embeddings/ and the documentation for the Masking layer is here: https://keras.io/layers/recurrent/ I cant find a difference there. Should one of the layers be prefered in…
Mimi Müller
  • 416
  • 8
  • 25
5
votes
0 answers

Forward Google Domain with masking to a squarespace page url which includes a path

I have holding page: www.yourssincerely.co/wbm (hosted by squarespace) I have a domain: www.wanderingbarman.com (registered with google domains) I would like to direct www.wanderingbarman.com, to the holding page but instead of displaying…
5
votes
4 answers

What is fault masking?

Can anybody explain what fault masking is, and and what its consequences are?
Guri
  • 261
  • 2
  • 3
  • 10
5
votes
1 answer

masking numbers to a special character (*) in input

I am trying to mask all the numbers in SSN field to * while keeping user only enter numeric values and formatting the SSN with dashes. Here is a fiddle link: https://jsfiddle.net/7f8p83am/ $('#ssn').keyup(function() { var val =…
CFNinja
  • 3,571
  • 4
  • 38
  • 59
5
votes
1 answer

Is there a library that does array equivalency for numpy.ma?

There is a numpy.testing package for comparing numpy arrays, but there doesn't appear to be an equivalent for masked arrays. Is there a library out there that does this already? I notice that numpy.ma itself has some comparison functions like…
5
votes
3 answers

angular ui mask not working with angular-ui datepicker

I am trying to use angular-ui-mask with angular-ui-bootstrap datepicker component. When I use this, the input gets assigned with ng-invalid-date classes even though the date is valid date and date gets cleared after I focus out of the field. I don't…
Sreekanth
  • 503
  • 1
  • 5
  • 10
5
votes
1 answer

How to replace masked values from a numpy array with the average of the values immediately next to the masked value

What is the most efficient numpy way to replace masked values in an array with the average of the closest unmasked values next to them? eg: a = np.array([2,6,4,8]) b = np.ma.masked_where(a>5,a) print b masked_array(data = [2 -- 4 --], …
firefly
  • 953
  • 2
  • 11
  • 18
5
votes
2 answers

Phone number masking using jquery - with three input fields

I want to create Phone field masking using jquery/javascript. I tried few jquery mask plugins. Still wants to find better solution for that. I have three input fields for USA(I must have three input fields). Area code Phone field1 Phone field2 My…
Som
  • 270
  • 1
  • 13
5
votes
3 answers

Masking a 16-bit value with 0xFFFF

I am following a guide on Gameboy emulation and, in a snippet of code I saw the following: while(true) { var op = MMU.rb(Z80._r.pc++); // Fetch instruction Z80._map[op](); // Dispatch Z80._r.pc &= 65535; // Mask PC…
Nubcake
  • 449
  • 1
  • 8
  • 21
5
votes
2 answers

python numpy mask mean performance

Ok, after some searching I can't seem to find a SO question that directly tackles this. I've looked into masked arrays and although they seem cool, I'm not sure if they are what I need. consider 2 numpy arrays: zone_data is a 2-d numpy array with…
user1269942
  • 3,772
  • 23
  • 33