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
13
votes
12 answers

masking a creditcard number in java

I tried to mask the characters in a creditcard number string using character 'X'.I wrote two functions as below .The second function uses commons.lang.StringUtils class .I tried to find the time it takes in both cases public static String…
jimgardener
  • 637
  • 2
  • 10
  • 26
13
votes
6 answers

How to add a mask in a TextField in Flutter?

I'm trying to add a date mask to a textField since I did not like the Date Picker because for date of birth, for example, it is not as nimble. After that, converting from string to datetime, I believe I can continue the project, Thanks in…
Victor Henrique
  • 381
  • 1
  • 2
  • 10
13
votes
4 answers

jQuery validation with input mask

Have this problem that form inputs with assigned mask (as a placeholder) are not validated as empty by jQuery validation. I use: https://github.com/RobinHerbots/jquery.inputmask https://github.com/1000hz/bootstrap-validator (which uses jQuery…
D. Cichowski
  • 777
  • 2
  • 7
  • 24
13
votes
5 answers

jQuery zip masking for multiple formats

I have a requirements for masking a zip field so that it allows the classic 5 digits zip (XXXXX) or 5 + 4 format (XXXXX-XXXX). I could so something like: $('#myZipField').mask("?99999-9999"); but the complication comes from the fact that dash…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
12
votes
3 answers

tensorflow creating mask of varied lengths

I have a tensor of lengths in tensorflow, let's say it looks like this: [4, 3, 5, 2] I wish to create a mask of 1s and 0s whose number of 1s correspond to the entries to this tensor, padded by 0s to a total length of 8. I.e. I want to create this…
Evan Pu
  • 2,099
  • 5
  • 21
  • 36
11
votes
7 answers

How to mask string?

I have a string with value "1131200001103". How can I display it as a string in this format "11-312-001103" using Response.Write(value)? Thanks
mko
  • 6,638
  • 12
  • 67
  • 118
11
votes
2 answers

Mask Passwords with Logback?

We currently generically log all XML documents coming in and going out of our system, and some of them contain passwords in the clear. We would like to be able to configure the logback logger/appender that is doing this to do some pattern matching…
SingleShot
  • 18,821
  • 13
  • 71
  • 101
11
votes
6 answers

Applications of bitwise operators in C and their efficiency?

I am new to bitwise operators. I understand how the logic functions work to get the final result. For example, when you bitwise AND two numbers, the final result is going to be the AND of those two numbers (1 & 0 = 0; 1 & 1 = 1; 0 & 0 = 0). Same…
Sai Maddali
  • 136
  • 1
  • 1
  • 10
11
votes
1 answer

In HTML5 canvas, how to mask an image with a background of my choice?

I tried to make this happen with canvas' globalCompositeOperation, but had no luck so I'm asking here. There are similar questions here, but I did not find my case among them. I have layers in my canvas area as so (drawing order from bottom to…
Harri Virtanen
  • 739
  • 2
  • 8
  • 14
10
votes
6 answers

Masking phone number Java

I need to mask the phone number. it may consist of the digits, + (for country code) and dashes. The country code may consist of 1 or more digits. I have created such kind of regular expression to mask all the digits except the last…
Cassie
  • 2,941
  • 8
  • 44
  • 92
10
votes
3 answers

Masking a string

I need to put a received string in this format: "## ## ## ###" in typescript/javascript Eg: "12 34 56 789" I know there's string-mask and some way via JQuery, is there a simplier way to do it?
Pedro Pam
  • 375
  • 1
  • 4
  • 14
10
votes
2 answers

Add camera layer on irregular shape images IOS

I need to add the camera layer on any irregular shaped image i.e. lets say i have a image which is having irregular shape and inside image there is a circular or any other irregular shape in which i want to embed the live camera. Any idea how i can…
iAviator
  • 1,310
  • 13
  • 31
10
votes
2 answers

Why are WebSockets masked?

I was following a guide provided by MDN on Writing a WebSocket server, the guide is pretty straightforward and easy to understand... However upon following this tutorial I ran across the frame that WebSocket messages from the client are sent in: 0…
user3117575
10
votes
1 answer

CGContextClipToMask returning blank image

I'm new to Quartz. I have 2 images, a background, and a mask with cutout shape that I want to lay over the background in order to cut out a section. The resulting image should be the shape of the cutout. This is my mask (the shape in the middle is 0…
Smikey
  • 8,106
  • 3
  • 46
  • 74
9
votes
1 answer

circle image mask via raphael js?

i'm trying to get an image in a circle and so i added an image to my circle using "fill"url, but can't seem to find an answer on how to position the image within the circle nor how to stop it from repeating. i love raphael.js, but its documentation…
zero
  • 2,999
  • 9
  • 42
  • 67
1 2
3
76 77