Event handler for filter:apply (fsm)
@method evtApplyFilter
192912
function() {
    var self = this;
    var fsm = self.filterStateModel;
    var filter = fsm.getActiveFilter();
    if (filter) {
      self.trigger("filter:apply", filter.cid, filter);
    }
  }
516582
function(isGlobal, server, err, msg, session, resp, opts, cb) {
  if(isGlobal) {
    cb(err, resp, opts);
    // after filter should not interfere response
    afterFilter(isGlobal, server, err, msg, session, resp, opts, cb);
  } else {
    afterFilter(isGlobal, server, err, msg, session, resp, opts, cb);
  }
}
233491
def apply_filter(
        filter_fn,
        collection,
        result_fn=None,
        filter_name="",
        collection_name=""):
    
    n_before = len(collection)
    filtered = [x for x in collection if filter_fn(x)]
    n_after = len(filtered)
    if not collection_name:
        collection_name = collection.__class__.__name__
    logging.info(
        "%s filtering removed %d/%d entries of %s",
        filter_name,
        (n_before - n_after),
        n_before,
        collection_name)
    return result_fn(filtered) if result_fn else collection.__class__(filtered)
1018767
def eventFilter(self, object, event):
        
        if event.type() in (event.Move, event.Resize):
            if self.isVisible():
                self.rebuild()
            elif object.isVisible():
                self.setVisible(True)
        
        return False
120336
def _applyFilter(lst, filterMethod, filterArgs):
        '''
            
        '''
        if filterMethod == FILTER_METHOD_AND:
            return lst.filterAnd(**filterArgs)
        else: # ALready validated in addFIlter that type is AND or OR
            return lst.filterOr(**filterArgs)
917369
function attach(filters, instance)
{
  Object.keys(filters).forEach(function(step)
  {
    filters[step].forEach(function(filter)
    {
      instance.use(step, filter);
    });
  });
}
61626
function applyFilter(o, filter) {
      if (!config.filterRoute)
        return o
      // for prevent change original object, only
      var newO = {
        name: o.name,
        extlang: o.extlang,
        objects: JSON.parse(JSON.stringify(o.objects)),
        lines: o.lines.slice()
      }
      if (!config.filterRoute(newO, filter)) {
        return null
      }
      return newO
    }
1110845
function(ev) {
            // ignore right clicks
            if (ev.which !== Garnish.PRIMARY_CLICK) {
                return;
            }

            // Enforce the filter
            if (this.settings.filter && !$(ev.target).is(this.settings.filter)) {
                return;
            }

            this.mousedownTarget = ev.currentTarget;

            var $item = $($.data(ev.currentTarget, 'select-item'));

            if (this.first !== null && ev.shiftKey) {
                // Shift key is consistent for both selection modes
                this.selectRange($item, true);
            }
            else if (this._actAsCheckbox(ev)) {
                this.toggleItem($item, true);
            }
        }
856302
def resolve(self, event_handler, *custom_filters, **full_config
                ) -> typing.List[typing.Union[typing.Callable, AbstractFilter]]:
        
        filters_set = []
        filters_set.extend(self._resolve_registered(event_handler,
                                                    {k: v for k, v in full_config.items() if v is not None}))
        if custom_filters:
            filters_set.extend(custom_filters)

        return filters_set
981676
function setCurrentFilter(filter) {
    var token = cache.get('token');
    var dfrd = Q.defer();
    var id;
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      id = typeof filter === 'string' ? filter : filter.id;
      request(format(URLs.setCurrentFilter, PROTOCOL, conf.host, id,
        token), function(err, res, body) {
        if (err) {
          dfrd.reject(err);
        } else {
          _extractEmptyResponse(body, dfrd);
          dfrd.resolve(true);
        }
      });
    }
    return dfrd.promise;
  }
364513
def apply_pre_filters(instance, html):
    
    # Allow pre processing. Typical use-case is HTML syntax correction.
    for post_func in appsettings.PRE_FILTER_FUNCTIONS:
        html = post_func(instance, html)

    return html
902947
function(e) {
	   inputEx.StringField.superclass.onFocus.call(this,e);

	   if(this.options.typeInvite) {
         this.updateTypeInvite();
      }
	}
885963
function filterTabWindows(tabWindows, searchExp) {
  var res;
  if (searchExp === null) {
    res = _.map(tabWindows, function (tw) {
      return new FilteredTabWindow({ tabWindow: tw });
    });
  } else {
    var mappedWindows = _.map(tabWindows, function (tw) {
      return matchTabWindow(tw, searchExp);
    });
    res = _.filter(mappedWindows, function (fw) {
      return fw !== null;
    });
  }

  return res;
}
613549
function (isGlobal, server, err, msg, session, resp, opts, cb) {
  let fm;
  if (isGlobal) {
    fm = server.globalFilterService;
  } else {
    fm = server.filterService;
  }
  if (fm) {
    if (isGlobal) {
      fm.afterFilter(err, msg, session, resp, function () {
        // do nothing
      });
    } else {
      fm.afterFilter(err, msg, session, resp, function (err) {
        cb(err, resp, opts);
      });
    }
  }
}
790025
function(isGlobal, server, msg, session, cb) {
  var fm;
  if(isGlobal) {
    fm = server.globalFilterService;
  } else {
    fm = server.filterService;
  }
  if(fm) {
    fm.beforeFilter(msg, session, cb);
  } else {
    utils.invokeCallback(cb);
  }
}
1052004
function BloomFilter()
{
    core.AbstractFilter.call(this);

    this.blurXFilter = new BlurXFilter();
    this.blurYFilter = new BlurYFilter();

    this.defaultFilter = new core.AbstractFilter();
}
1097150
function(model) {
    for (var i = 0; i < filterFunctions.length; i++) {
      if (!filterFunctions[i](model)) {
        return false;
      }
    }
    return true;
  }