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
9
votes
3 answers

Angular 2 Field Masking

I want to mask a field for example: having phone number of 10 digit (123-123-1234) I need to mask in such a way that (xxx-xxx-1234). Also While submit the page I need to send original variable (123-123-1234) to service. Any help would be greatly…
Lucifer
  • 784
  • 2
  • 7
  • 20
9
votes
2 answers

Masking an image with selectable text with SVG - possible?

One neat typographic effect often seen headlines in magazines etc, is to select a really bold font and put an image inside of the text. Here's a random example of the effect: In web design, there is no way to do this with plain html/css/js. It…
last-child
  • 4,481
  • 1
  • 21
  • 19
9
votes
4 answers

How to mask a password in Java 5?

I am trying to mask a password in Java. Sun java has suggested a way to mask a password as follows. Masking a password It uses a simple way to do that. public void run () { stop = true; while (stop) { System.out.print("\010*"); try { …
Chathuranga Chandrasekara
  • 20,548
  • 30
  • 97
  • 138
8
votes
1 answer

Is there any way to mask material input control?

I want to mask material date control, for that I have tried two npm modules. first, I used ngx-mask and got this Error: ERROR Error: More than one custom value accessor matches form control with unspecified name attribute The Reason for the error…
Neha Bhoi
  • 141
  • 1
  • 1
  • 9
8
votes
2 answers

Using an UIView as a Mask in another UIView on Swift

I am developing an App on xCode with Swift. My screen has an Image of an animal (outlet "backImage"), over this image I have a view (outlet "coverView"), color black, which covers all the screen. So so far you can't see the animal image, because the…
DevRenanGaspar
  • 373
  • 1
  • 2
  • 12
8
votes
4 answers

Mean or max pooling with masking support in Keras

... print('Build model...') model = Sequential() model.add(Embedding(max_features, 128)) model.add(LSTM(size, return_sequences=True, dropout_W=0.2 dropout_U=0.2))…
Ersin
  • 151
  • 1
  • 2
  • 5
8
votes
4 answers

Mask div using CSS

Ok so say i'm using the follow setup for my divs: .background will contain an image. .overlay will have a semitransparent white background for the overlay .inner would effectively mask out a rectangle the size of the div? So that the background is…
PahPow
  • 203
  • 2
  • 3
  • 8
8
votes
2 answers

Java Regex to mask alphanumeric string and show last 4 digits

I have an input string that looks like any of the following: Z43524429 46D92S429 3488DFJ33 Basically the string can contain alphabet characters or digits. However it cannot contain symbols, just letters and numbers. I would like to mask it so…
Richard
  • 5,840
  • 36
  • 123
  • 208
8
votes
1 answer

Bit masking (javascript): how to check ALL flags

If I have the number '00001000' and the mask '00101000', how can i check, with a binary operation, if both the bits in the number are set? number & mask return true if at least one bit match, but I need to check for all of them to match. How to?
pistacchio
  • 56,889
  • 107
  • 278
  • 420
8
votes
1 answer

Trapezoid in HTML with CSS3 Gradient applied to it

I want to make a trapezoid in HTML5. I know it can be done using border radius and a height of 0: #trapezoid { border-bottom: 100px solid red; border-left: 50px solid transparent; border-right: 50px solid COLOR HERE; height: 0; …
Case
  • 4,244
  • 5
  • 35
  • 53
8
votes
1 answer

SVG: Applying mask to path group tag

I'm having trouble applying a layer to a path group. When I apply my to a , it works as expected, but when using it on a , the entire group disappears. Here's my document
Doug
  • 859
  • 1
  • 9
  • 20
8
votes
1 answer

How to create own mask in ios

Duplicate so don't negative my reputation. My mask image is : My output is : - (UIImage*)maskImage:(UIImage *)image withMask:(UIImage *)maskImage { CGImageRef maskRef = maskImage.CGImage; CGImageRef mask = CGImageMaskCreate( …
Mani
  • 1,841
  • 15
  • 29
7
votes
5 answers

How to i mask all string characters except for the last 4 characters in Java using parameters?

i will like to know how do i mask any number of string characters except the last 4 strings. I want to masked all strings using "X" For example Number:"S1234567B" Result Number :"XXXXX567B Thank you guys
BinQuan
  • 85
  • 2
  • 2
  • 6
7
votes
2 answers

Angular and text-mask: Regex to validate an input without special characters

I have angular 5 with "angular2-text-mask": "^8.0.4" https://github.com/text-mask/text-mask/tree/master/angular2 What I'm trying to do is preventing users entering special characters, except for -, _, ', which should be allowed for a name…
LieutenantDan
  • 71
  • 1
  • 1
  • 6
7
votes
3 answers

Binary mask in Tensorflow

I would like to mask every other value along a particular dimension of a Tensor but don't see a good way to generate such a mask. For example #Masking on the 2nd dimension a = [[1,2,3,4,5],[6,7,8,9,0] mask = [[1,0,1,0,1],[1,1,1,1,1]] b = a * mask…
Markus Woodson
  • 73
  • 1
  • 1
  • 4