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
7
votes
4 answers

Better way to mask a Fortran array?

I am wanting to mask a Fortran array. Here's the way I am currently doing it... where (my_array <=15.0) mask_array = 1 elsewhere mask_array = 0 end where So then I get my masked array with: masked = my_array * mask_array Is there a more…
user14241
  • 727
  • 1
  • 8
  • 27
7
votes
2 answers

.htaccess - Masking and redirecting to a subdirectory on a different server

I'm looking for some help with my .htaccess file. In short, I have a bunch of content up in the subdirectory www.myserver.com/forum/ (this directory is not my choice and cannot be changed), which includes both a forum (myserver.com/forum/forum) and…
DTR
  • 372
  • 6
  • 22
6
votes
4 answers

Divs with transparent text in CSS?

I’ve been asked to create a CSS (non-HTML5) based site that has a filled div with a cutout that shows an image underneath it. There are additional overlays and other images which makes using static images a pain. Plus, I suspect that I am going to…
rboarman
  • 8,248
  • 8
  • 57
  • 87
6
votes
1 answer

Padding sequences of 2D elements in keras

I have a set of samples, each being a sequence of a set of attributes (for example a sample can comprise of 10 sequences each having 5 attributes). The number of attributes is always fixed, but the number of sequences (which are timestamps) can vary…
Shahriar49
  • 621
  • 1
  • 5
  • 18
6
votes
4 answers

How to mask a String to show only the last 3 characters?

I just tried to mask String as below, but I didn't find what I want after do some search and research. string a = "0123456789" masked = "xxxxxxx789" I modified solutions in this questions…
rijeqi rahma
  • 73
  • 1
  • 4
6
votes
5 answers

input time mask using jquery

I am using meioMask – a jQuery mask plugin to put time mask in a textbox. Here is the JsFiddle. It's working well. But I also need to put hh:mm in the textbox, to let the user know what to enter in the textbox. How to do this. EDIT: I also need to…
Vaibhav Jain
  • 33,887
  • 46
  • 110
  • 163
6
votes
5 answers

HTML/CSS - create alpha mask over image

I'd like to create an effect in a site I’m building where an image is masked by an overlay. The overlay should create a “fade out” effect — I don’t actually want anything animated, but the overlay should make the image look as if it’s fading to the…
sa125
  • 28,121
  • 38
  • 111
  • 153
6
votes
2 answers

UI-Bootstrap datepicker with input mask

Currently trying to use a standard datepicker but combine it with an input mask to make it easier to enter the date by hand if the user needs to. See Plunk The problem at the moment is that when I add the mask one of two things happens, either hand…
diplosaurus
  • 2,538
  • 5
  • 25
  • 53
6
votes
2 answers

How to apply a custom mask into a string of digits in Python?

Given a custom mask like ##/##/#### or (###) ###-#### and a string of digits that has a length equals to the number of # of the custom mask, How can a define a function called format that applies a custom mask to a string? For example: >…
Bruno Calza
  • 2,732
  • 2
  • 23
  • 25
6
votes
1 answer

GTiff mask with shapefile in python with gdal, ogr, etc

OK, After a bit of fiddling, I've tweaked a script from the site hyperlink in the second comment line. The purpose of the script is to clip/mask a LARGE raster (i.e. that cannot fit into a 32-bit Python 2.7.5 application) in GTiff format with a…
ksed
  • 335
  • 1
  • 4
  • 13
6
votes
4 answers

HTML Form Field - How to require an input format

What I want to do here is require that phone numbers be entered into my HTML form as (XXX) XXX-XXXX and that SS Numbers are entered as XXX-XX-XXXX. Thats it. The only reason I am doing this is so that the form submission results are consistent and…
JefeTheTechy
  • 65
  • 1
  • 1
  • 7
6
votes
1 answer

PorterDuffXfermode DST_IN not working as expected

So I'm trying to speed up some drawing we're doing (drawing a portion of an arc with alpha transparency) and was attempting to cache the entire arc into a separate bitmap, and show it selectively with an alpha mask. From the research I've done (the…
Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
6
votes
3 answers

JigSaw puzzle uiimage irregular cropping

Am developing jigsaw puzzle for iphone. Here using the masking technique I have cropped the image into 9 peices. See the image below. After cropping some portion of image is missing due to masking. I knew this is coz of loading those cropped images…
nik
  • 2,289
  • 6
  • 37
  • 60
6
votes
2 answers

Get UIBezierpath from masking an UIImage

How can I get UIBezierpath from UIImage like this.. I do not want full square path, Just want that path as shown in red border from UIImage.. I had gone through Link 1 and Link 2 but can't got success.. I had done following code to get masking…
Mehul Mistri
  • 15,037
  • 14
  • 70
  • 94