Apply any card-specific filters. For instance, Gut Punch filters any card following itself as it is a standalone attack.
779349
function filterCards(cards) {
    // Option was passed in to disabled this filter.
    // User is probably requesting to discard.
    if (noCardFilter) {
      return cards
    }
    const [head, ...tail] = cards
    if (head && head.filter) {
      return [head].concat(head.filter(tail))
    }
    return cards
  }
72675
def do_filter(self, arg):
        """"""
        if arg == "list":
            msg.info("TEST CASE FILTERS")
            for f in self.curargs["tfilter"]:
                if f == "*":
                    msg.info("  * (default, matches all)")
                else:
                    msg.info("  " + f)
        elif arg not in self.curargs["tfilter"]:
            self.curargs["tfilter"].append(arg)
            self.do_filter("list")
42989
public function shouldApplyFilter() {
    if ($this->checkMentionTypes()) {
      return TRUE;
    }
    elseif ($this->textFormat && ($format = FilterFormat::load($this->textFormat))) {
      $filters = $format->get('filters');

      if (!empty($filters['filter_mentions']['status'])) {
        $this->settings = $filters['filter_mentions']['settings'];

        return $this->checkMentionTypes();
      }
    }

    return FALSE;
  }
649083
public static function ignoreTransaction()
    {
        if (self::$mode !== self::MODE_DISABLED) {
            self::$mode = self::MODE_DISABLED;

            if (self::$extension === self::EXTENSION_XHPROF) {
                xhprof_disable();
            } else if (self::$extension === self::EXTENSION_TIDEWAYS) {
                tideways_disable();
            }
        }
    }
1320720
public function addCustomFilters()
    {
        foreach ($this->customFilters() as $name => $filter) {
            app('sanitizer')->extend($name, $filter);
        }
    }
928247
private function applyFilters() {

		// handle default and pre-configured filters first

		foreach($this->defaultFilters as $f) {
			$f->apply($this->contents);
		}

		// handle added custom filters last

		foreach($this->filters as $f) {
			$f->apply($this->contents);
		}

	}
1306388
def Validate(self):
    """"""
    # All filters can handle the input type.
    bad_filters = []
    for f in self.filters:
      try:
        f.Validate()
      except DefinitionError as e:
        bad_filters.append("%s: %s" % (f.expression, e))
    if bad_filters:
      raise DefinitionError(
          "Filters with invalid expressions: %s" % ", ".join(bad_filters))
1013746
def apply_filters prev_filters = nil, filter_codecs = nil
      prev_filters = filter_types if prev_filters.nil?
      filter_codecs = [] if filter_codecs.nil?
      current_filters = []
      prev = nil
      line_sizes = []
      scanline_positions.push(@filtered_data.size).inject do |m, n|
        line_sizes << n - m - 1
        n
      end
      wrap_with_rewind(@filtered_data) do
        # decode all scanlines
        prev_filters.each_with_index do |type, i|
          byte = @filtered_data.read 1
          current_filters << byte.unpack('C').first
          line_size = line_sizes[i]
          line = @filtered_data.read line_size
          filter = Filter.new type, @sample_size
          if filter_codecs[i] && filter_codecs[i][:decoder]
            filter.decoder = filter_codecs[i][:decoder]
          end
          if !prev.nil? && @interlace_pass_count.include?(i + 1)  # make sure prev to be nil if interlace pass is changed
            prev = nil
          end
          decoded = filter.decode line, prev
          @filtered_data.pos -= line_size
          @filtered_data << decoded
          prev = decoded
        end
        # encode all
        filter_codecs.reverse!
        line_sizes.reverse!
        data_amount = @filtered_data.pos # should be eof
        ref = data_amount
        current_filters.reverse_each.with_index do |type, i|
          line_size = line_sizes[i]
          ref -= line_size + 1
          @filtered_data.pos = ref + 1
          line = @filtered_data.read line_size
          prev = nil
          if !line_sizes[i + 1].nil?
            @filtered_data.pos = ref - line_size
            prev = @filtered_data.read line_size
          end
          # make sure prev to be nil if interlace pass is changed
          if @interlace_pass_count.include?(current_filters.size - i)
            prev = nil
          end
          filter = Filter.new type, @sample_size
          if filter_codecs[i] && filter_codecs[i][:encoder]
            filter.encoder = filter_codecs[i][:encoder]
          end
          encoded = filter.encode line, prev
          @filtered_data.pos = ref + 1
          @filtered_data << encoded
        end
      end
    end
1365630
def filtered(self, efilter):
        '''
        
        '''
        if not self.params:
            self.params={'filter' : efilter}
            return self
        if not self.params.has_key('filter'):
            self.params['filter'] = efilter
            return self
        self.params['filter'].update(efilter)
        return self
626845
def find_cards(self, source=None, **filters):
		
		if not filters:
			new_filters = self.filters.copy()
		else:
			new_filters = filters.copy()

		for k, v in new_filters.items():
			if isinstance(v, LazyValue):
				new_filters[k] = v.evaluate(source)

		from .. import cards
		return cards.filter(**new_filters)
1071633
function (card, cb) {

		Card.destroy(card.id)
	    .exec(function (err, destroyedCards){
	      if (err) return cb(err);
	      if (!destroyedCards) return cb(null, null);
	      Card.afterStripeCustomerCardDeleted(destroyedCards[0], function(err, card){
	      	cb(null, card);
	      });
	    });
	}
738841
public function filtersPass()
	{
		foreach ( $this->filters as $callback )
			if ( !UniversalBuilder::call( $callback ) )
				return false;

		foreach ( $this->rejects as $callback )
			if ( !UniversalBuilder::call( $callback ) )
				return false;

		return true;
	}
144380
private void applyFilters(List<TreeModelFilter<SQLPPTriplesMap>> filters) {
		FilteredModel model = (FilteredModel) mappingList.getModel();
		model.removeAllFilters();
		model.addFilters(filters);
	}
1088838
def _apply_filters(self):
        
        # apply filters
        filters = []
        for f in self._filters:
            filters.append('{}{}{}'.format(f['name'], f['operator'], f['value']))
        self.tcex.log.debug(u'filters: {}'.format(filters))

        if filters:
            self._request.add_payload('filters', ','.join(filters))
508986
def filter(filters = {})
      all.select do |rule|
        [:country, :type].each do |condition|
          break false if filters[condition] && filters[condition] != rule[condition]
          true
        end
      end
    end
87914
private void applyFilter(){
        filteredItems.clear();

        Filter<M> filter = getFilter();
        if(filter == null){
            filteredItems.addAll(items);
        }else{
            for (int i = 0; i < items.size(); i++) {
                M item = items.get(i);
                if(filter.filter(item, query)){
                    filteredItems.add(item);
                }
            }
        }

        onFiltered();
    }
837295
private void processFilterAction() {
		if (!(chkFilter.isSelected())) {
			applyFilters(new ArrayList<>());
		}
		if (chkFilter.isSelected()) {
			if (txtFilter.getText().isEmpty()) {
				chkFilter.setSelected(false);
				applyFilters(new ArrayList<>());
				return;
			}
			try {
				List<TreeModelFilter<SQLPPTriplesMap>> filters = parseSearchString(txtFilter.getText());
				if (filters == null) {
					throw new Exception("Impossible to parse search string");
				}
				applyFilters(filters);
			} catch (Exception e) {
				LoggerFactory.getLogger(this.getClass()).debug(e.getMessage(), e);
				JOptionPane.showMessageDialog(this, e.getMessage());
			}
		}
	}