Perform masking operation

 @return [Node] Result of computation

 @private
965151
def demand
      if variables.empty?
        index = @index.simplify
        if @m.dimension > 0
          @m.shape.last.times do |i|
            m = @m.element INT.new( i )
            source = @source.element INT.new( i )
            Mask.new( @dest, source, m, index ).demand
          end  
        else
          @m.if do
            Store.new( @dest.element( index ), @source ).demand
            index.assign index + 1
          end
        end
        if @index.is_a? Pointer_
          @index.store index
        else
          @index.assign index
        end
        @dest
      else
        super
      end
    end
1092190
function _enableMasking(ctx, data, params) {
	if (params.mask) {
		// If jCanvas autosave is enabled
		if (params.autosave) {
			// Automatically save transformation state by default
			_saveCanvas(ctx, data);
		}
		// Clip the current path
		ctx.clip();
		// Keep track of current masks
		data.transforms.masks.push(params._args);
	}
}
1096787
def suppressions(&blk)
      if block_given?
        self.suppressions.select(&blk)
      else
        Thresholds.new(@thresholds.select{|t| t.class.to_s == "Threshold::Suppression"})
      end
    end
730890
function () {
            var wrapper = this,
              element = wrapper.element || {},
              shadows = wrapper.shadows,
              parentToClean = wrapper.renderer.isSVG && element.nodeName === 'SPAN' && wrapper.parentGroup,
              grandParent,
              key,
              i;

            // remove events
            element.onclick = element.onmouseout = element.onmouseover = element.onmousemove = element.point = null;
            stop(wrapper); // stop running animations

            if (wrapper.clipPath) {
                wrapper.clipPath = wrapper.clipPath.destroy();
            }

            // Destroy stops in case this is a gradient object
            if (wrapper.stops) {
                for (i = 0; i < wrapper.stops.length; i++) {
                    wrapper.stops[i] = wrapper.stops[i].destroy();
                }
                wrapper.stops = null;
            }

            // remove element
            wrapper.safeRemoveChild(element);

            // destroy shadows
            if (shadows) {
                each(shadows, function (shadow) {
                    wrapper.safeRemoveChild(shadow);
                });
            }

            // In case of useHTML, clean up empty containers emulating SVG groups (#1960, #2393, #2697).
            while (parentToClean && parentToClean.div && parentToClean.div.childNodes.length === 0) {
                grandParent = parentToClean.parentGroup;
                wrapper.safeRemoveChild(parentToClean.div);
                delete parentToClean.div;
                parentToClean = grandParent;
            }

            // remove from alignObjects
            if (wrapper.alignTo) {
                erase(wrapper.renderer.alignedObjects, wrapper);
            }

            for (key in wrapper) {
                delete wrapper[key];
            }

            return null;
        }
309320
def normalize_mask(mask)
      mask = mask.dup
      mask.gsub!(/\*{2,}/, '*')
      parts = []
      remainder = nil

      if mask !~ /!/ && mask =~ /@/
        remainder = mask
        parts[0] = '*'
      else
        parts[0], remainder = mask.split(/!/, 2)
      end

      if remainder
        remainder.gsub!(/!/, '')
        parts[1..2] = remainder.split(/@/, 2)
      end
      parts[2].gsub!(/@/, '') if parts[2]

      (1..2).each { |i| parts[i] ||= '*' }
      return parts[0] + "!" + parts[1] + "@" + parts[2]
    end
1078685
function _maskContext(context) {
    var Component = this._currentElement.type;
    var contextTypes = Component.contextTypes;
    if (!contextTypes) {
      return emptyObject;
    }
    var maskedContext = {};
    for (var contextName in contextTypes) {
      maskedContext[contextName] = context[contextName];
    }
    return maskedContext;
  }
836869
function() {
        var element = this.element,
            node = this.node;

        // Clickout check
        if (!element && !node) {
            return;
        }

        this.fireEvent('hiding', [element, node]);

        element.conceal();

        node
            .aria('toggled', false)
            .removeClass('is-active');

        this.fireEvent('hidden', [element, node]);
    }
567342
def asMaskedArray(self):
        
        return ma.masked_array(data=self.data, mask=self.mask, fill_value=self.fill_value)
1293652
def mask_cmp_op(x, y, op, allowed_types):
    
    # TODO: Can we make the allowed_types arg unnecessary?
    xrav = x.ravel()
    result = np.empty(x.size, dtype=bool)
    if isinstance(y, allowed_types):
        yrav = y.ravel()
        mask = notna(xrav) & notna(yrav)
        result[mask] = op(np.array(list(xrav[mask])),
                          np.array(list(yrav[mask])))
    else:
        mask = notna(xrav)
        result[mask] = op(np.array(list(xrav[mask])), y)

    if op == operator.ne:  # pragma: no cover
        np.putmask(result, ~mask, True)
    else:
        np.putmask(result, ~mask, False)
    result = result.reshape(x.shape)
    return result
283727
def mask(key, original):
    
    if len(key) != 4:
        raise ValueError('invalid masking key "%s"' % key)

    key = map(ord, key)
    masked = bytearray(original)

    for i in xrange(len(masked)):
        masked[i] ^= key[i % 4]

    return masked
1280877
def showcutoffs(self, redblue = False):
        
        
        highmask = self.numpyarray > self.z2
        lowmask = self.numpyarray < self.z1
        if redblue == False :
            if self.negative :
                self.drawmask(highmask, colour = 255)
                self.drawmask(lowmask, colour = 0)
            else :
                self.drawmask(highmask, colour = 0)
                self.drawmask(lowmask, colour = 255)
        else :
            
            self.drawmask(highmask, colour = (255, 0, 0))
            self.drawmask(lowmask, colour = (0, 0, 255))
691810
function initMasks() {
	var i, mask,
	    result = new Uint8Array( 0x10000 );

	for ( i = 0; i < 0x10000; i++ ) {
		mask = 3;
		if ( i & 0x2 ) {
			// right
			mask <<= 2;
		}
		if ( i & 0x40 ) {
			// bottom
			mask <<= 4;
		}

		result[ i ] = mask;
	}

	return result;
}
1199241
def render
      ignore = [ComfyPress::Tag::Partial, ComfyPress::Tag::Helper].member?(self.class)
      ComfyPress::Tag.sanitize_irb(content, ignore)
    end
156211
private static void maskInWord(int[] array, int index, int from, int to) {
    if (from == to) {
      return;
    }

    to = 32 - to;
    int word = wordAt(array, index);
    word |= ((0xffffffff >>> from) << (from + to)) >>> to;
    array[index] = word & WORD_MASK;
  }
1331395
def getMaskArray(self, signature):
        
        if signature in self.masklist:
            mask =  self.masklist[signature]
        else:
            mask = None
        return mask
1277838
def clean(image, mask=None, iterations = 1):
    '''
    '''
    global clean_table
    if mask is None:
        masked_image = image
    else:
        masked_image = image.astype(bool).copy()
        masked_image[~mask] = False
    result = table_lookup(masked_image, clean_table, False, iterations)
    if not mask is None:
        result[~mask] = image[~mask]
    return result
127049
function() {
    var node
      , segs = []
      , star;

    star = this.accept('*');
    if (star) segs.push(new nodes.Literal('*'));

    while (true) {
      if (this.accept('{')) {
        this.state.push('interpolation');
        segs.push(this.expression());
        this.expect('}');
        this.state.pop();
      } else if (node = this.accept('-')){
        segs.push(new nodes.Literal('-'));
      } else if (node = this.accept('ident')){
        segs.push(node.val);
      } else {
        break;
      }
    }
    if (!segs.length) this.expect('ident');
    return segs;
  }