filter

How many hash functions does my bloom filter need?

Wikipedia says: An empty Bloom filter is a bit array of m bits, all set to 0. There must also be k different hash functions defined, each of which maps or hashes some set element to one of the m array positions with a uniform random distribution. I read the article, but what I don't understand is how k is determined. Is it a functi...

Using Zend_Filter_Input, are Filters or Validators processed first?

When using Zend_Filter_Input, are Filters or Validators processed first? ...

Is there a way to see all of the cases i've ever worked in fogbugz

Say we have the following case: Jen Ninja (a Developer with an awesome last name) likes to look at the following list view filter: All open cases assigned to Jen Ninja with the status of Active Jen Ninja gets assigned a bunch of cases (some of them bugs, some of them features). Jen looks at her filtered list and see them. No problem...

CollectionViewSource Filter not refreshed when Source is changed

Hi, I have a WPF ListView bound to a CollectionViewSource. The source of that is bound to a property, which can change if the user selects an option. When the list view source is updated due to a property changed event, everything updates correctly, but the view is not refreshed to take into account any changes in the CollectionViewSou...

How to catch an exception thrown by a filter in .NET's MVC?

One of the filters on an application I'm developing checks to see if a user owns the item they are trying to alter. The action is decorated by the [RequiresOwnership] attribute, and inside the attribute logic, I check to see if the user owns the item, and if they don't, I throw an UnauthorizedAccessException. My question is this: Where ...

Fast way to implement 2D convolution in C

I am trying to implement a vision algorithm, which includes a prefiltering stage with a 9x9 Laplacian-of-Gaussian filter. Can you point to a document which explains fast filter implementations briefly? I think I should make use of FFT for most efficient filtering. ...

MDX Filter

I have a cube in Analysis Services 2005 with sell quotes we make for our customers. Each quote can have many revisions. Each revisions has a date when it was made. [Quotes Data] is my Fact table I need to filter (see "true" in the query below) to get only the latest revision per quote (in bold). Quote Revision Date ...

How can I inherit Hibernate filters with annotations?

I'm trying to set up a Hibernate filter with annotations. I would like to specify it in a base class and make all sub classes use it but whenever I try to enable it, Hibernate fails to find the filter. Is it possible at all to inherit filter annotations? ...

Python HTML sanitizer / scrubber / filter

Does anyone have experience using a Python HTML sanitizer / scrubber / filter? I'm looking for a module that will remove any HTML tags from a string that are not found in a whitelist. Of course I've Googled it but haven't found anything definitive. Thanks, Everett ...

SQL: How to limit the number of records the MERGE statement will insert

Some sample data: DECLARE @TARGET TABLE ( ID INT, value INT ) ; DECLARE @SOURCE TABLE ( ID INT, value INT ) INSERT INTO @TARGET VALUES ( 1, 213 ) INSERT INTO @TARGET VALUES ( 2, 3 ) INSERT INTO @TARGET VALUES ( 3, 310 ) INSERT INTO @TARGET VALUES ( 4, 43 ) INSERT INTO @SOURCE...

Filter a Data View Web Part by "last 3 days"

We have a custom list that has a column called "Connection Date" and need to display the most recent list items (relative to this "Connection Date" column) in various places across the portal. the Data View Web Part appears to be the best solution, but I'm having difficulty finding the right method & syntax to filter by date. I can cre...

ASP.Net MVC - how to handle exception in JSON action (return JSON error info), but also publish the exception for filters?

I'm using a filter to log exceptions thrown by actions which looks like this: public override void OnActionExecuted(ActionExecutedContext filterContext) { if (filterContext.Exception != null) { //logger.Error(xxx); } base.OnActionExecuted(filterContext); } Now I'd like to handle all my JSON actions to return JSON resul...

Can you filter on Logger level in log4net

I am want to filter out messages that contain specified string. I used log4net.Filter.StringMatchFilter but that applies to appenders only. I'd like to filter that message on Logger level already. Something along these lines: <logger name="MyLogger.WebServices"> <level value="Debug" /> <filter type="log4net.Filter.StringMatchFilter">...

Algorithm for data filter

Can you suggest me an algorithm for filtering out data. I am using javascript and trying to write out a filter function which filters an array of data.I have an array of data and an array of filters, so in order to apply each filter on every data, I have written 2 for loops foreach(data) { foreach(filter) { check data with filt...

Use SQL to Filter Drupal Views

I have a content type with a CCK integer field which takes a unix timestamp. I would like to create a view with a filter that takes the MySQL function "UNIX_TIMESTAMP": If there is no way of doing this, how can I alter the SQL generated for the view? ...

Examples of Java I/O Stream Filters

I am looking for example code that demonstrates how to create a filter that understands binary data. Links to examples are greatly appreciated. ...

PHP filter_input()?

This should be a elementary question but why is better to use something like this: $pwd = filter_input(INPUT_POST, 'pwd'); Instead of just: $pwd = $_POST['pwd']; PS: I understand that the filter extension can be used with more arguments to provide an additional level of sanitization. ...

Sharepoint - Can You Output Unfiltered HTML from a Database?

Our customers have asked for Sharepoint and, of course, we are having to implement features for which Sharepoint wasn't really designed. We are first trying to stretch the in-house webparts as far as we can, so we are doing a lot of the work in stored procedures, user defined functions, and custom views in the MSSQL DB. I am generating...

jQuery Selectors and Filtering

Hi all: I'm just getting going with jQuery and am pretty excited about it. My reason for posting is that I've written some jQuery that does it's required task, but I'm suspecting that it lacks a little in elegance... I'm trying to grab all table rows that have: 1) a class of 'item' 2) a child text input box that has a value The HTML...

How do I filter a BindingSource with a LINQ query as the DataSource

I'm having trouble getting a filter to work on a BindingSource that is the DataSource for a DataGridView control. Basically, I have LINQ query that is the DataSource for the BindingSource and I would like to filter down the results. Below is an example of what I'm trying to accomplish. Dim query = From row In dataTable _ S...