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
-1
votes
2 answers

Can someone explain the practical usage and implementation of masking bits?

I am trying to prepare for technical interviews and I noticed a few practice questions involved bit masking and bit shifting. I am unfamiliar with these concepts. I understand that if you are using half of a byte and want to leave the other half…
Jon Wexler
  • 151
  • 9
-1
votes
1 answer

Opengl: issue with masking

I'm working on creating a hole in a wall using masking in opengl, my code is quit simple like this, //Draw the mask glEnable(GL_BLEND); glBlendFunc(GL_DST_COLOR,GL_ZERO); glBindTexture(GL_TEXTURE_2D,…
Lisa
  • 3,121
  • 15
  • 53
  • 85
-1
votes
1 answer

How do I add an iOS app filter to an image in HTML?

I want to turn a regular icon (like this: http://a1075.phobos.apple.com/us/r30/Purple/v4/db/4a/c3/db4ac3d6-64ef-1bea-9c2e-f48e5b29022b/mzl.itlrenhu.png ) into one with iOS app borders in HTML (like this:…
Lane B.
  • 1
  • 2
-1
votes
1 answer

Conditioned URL masking

Say I have two domains from two different servers. A.com which people visit, and B.com which hosts the files they view. When a person views A.com/file they are actually viewing B.com/file. Of course for just a few pages I could do URL masking (like…
-1
votes
1 answer

Using regex to define masks for numbers in Java

I am trying to define a set of rules, that will compute a mask based on the number it is given. For example I am trying to return a mask of 8472952424 of any number that start with 12, 13, 14, Or return 847235XXXX for any number that starts with 7…
laitha0
  • 4,148
  • 11
  • 33
  • 49
-1
votes
1 answer

Reasons to mask signals?

So this isn't code related at all, just conceptual. What are some reasons for a proces to mask signals at any point in their execution? I get the concept of signals and masking, just can't think of any specific examples of reasons to mask signals.
arc
  • 477
  • 2
  • 8
  • 14
-1
votes
1 answer

Pack and Unpack String with Regex Mask

I am looking for a simple & fast way to pack and unpack an integer with a Regex string (without using back references). I would think this would be an extremely obvious function of the .Net Regex library but am not finding anything. Am I missing…
unforgiven1987
  • 454
  • 1
  • 3
  • 18
-2
votes
1 answer

Masking and unmasking a string in Python

I have Python code to generate SQL queries from English queries. But while predicting, I might have to send sensitive data in my English query to the model. I want to mask sensitive information like nouns and numbers in my English query. When I…
Aadhi Verma
  • 172
  • 2
  • 11
-2
votes
1 answer
-2
votes
2 answers

how to hide password while typing in console in java

I am developing a online order management system in java connecting MySql to run in console where I need to login using userid and password. so, here I need to mask the password while typing in console. can anyone pls, help me with this?
-2
votes
1 answer

Creating duplicate bytes from a given function

So I have the below code which shifts a 32 bit int 6 bits to the left (s->data) then appends the last 6 bits of the int operand to the int s->data. I would like to use this code to create a function which takes an unsigned char x and copies x into…
avii
  • 53
  • 5
-2
votes
2 answers

Error in cropping the image using binary mask

I would like to crop my original image using the binary mask for which I have written code import cv2 import numpy as np import matplotlib as plt img = cv2.imread("image.png") mask = cv2.imread("mask.png") h, w, _ = img.shape mask =…
DevanDev
  • 161
  • 1
  • 2
  • 17
-2
votes
1 answer

Python Image masking and removing Background

I have two images: the temple and the mask (the heart). I want to mask the temple with the shape of the heart and leave out the black background. The result should be a heart shaped cutout from the temple with a white or transparent background.
sam
  • 21
  • 1
  • 5
-2
votes
5 answers

bitwise OR reduction of python lists

I have two lists of zeros and ones. Both lists are of same length. The following is just an example, i am looking for a generic solution for lists of any sizes and with zeros and ones at any index. l1 = [1,1,0,1,1,1,1] l2 = [0,0,0,1,0,0,0] The goal…
gustavz
  • 2,964
  • 3
  • 25
  • 47
-2
votes
2 answers

How to use an input mask in excel vba?

READ CAREFULLY THE QUESTION PLEASE, IT MENTIONS EXCEL VBA. NOT EXCEL I was given the task of fixing a date input on a VBA form. A textbox should have the user enter the date as MM/DD/YYYY. I am required to use an input mask, not allowed to do…
Cher
  • 2,789
  • 10
  • 37
  • 64
1 2 3
76
77