filtering

Filtering collections in C#

I am looking for a very fast way to filter down a collection in C#. I am currently using generic List<object> collections, but am open to using other structures if they perform better. Currently, I am just creating a new List<object> and looping thru the original list. If the filtering criteria matches, I put a copy into the new list....

Getting Apache to modify static webpages on the fly

I have been experimenting with woopra.com A web analytics tool. Which requires a piece of javascript code to be added to each page to function. This is easy enough with more dynamic sites with universal headers or footers but not for totally static html pages. I attempted to work round it by using a combination of Apache rewrites and S...

Unfiltering NSPasteboard

Is there a way to unfilter an NSPasteboard for what the source application specifically declared it would provide? I'm attempting to serialize pasteboard data in my application. When another application places an RTF file on a pasteboard and then I ask for the available types, I get eleven different flavors of said RTF, everything from...

Good references / tips for designing rule systems?

I often need to implement some sort of rule system that is user-editable -- the requirements are generally different enough that the same system isn't directly applicable, so I frequently run into the same problem--how do I design a rule system that is maintainable properly balances expressiveness with ease of use is easily extended (i...

Fastest Gaussian blur implementation

How do you implement the fastest possible Gaussian blur algorithm ? I am going to implement it in Java, so GPU solutions are ruled out. My application planetGenesis is cross platform, so I dont want JNI. ...

Database Duplicate Value Issue ( Filtering Based on Previous Value)

Earlier this week I ask a question about filtering out duplicate values in sequence at run time. Had some good answers but the amount of data I was going over was to slow and not feasible. Currently in our database, event values are not filtered. Resulting in duplicate data values (with varying timestamps). We need to process that data ...

Using Lucene to count results in categories

I am trying to use Lucene Java 2.3.2 to implement search on a catalog of products. Apart from the regular fields for a product, there is field called 'Category'. A product can fall in multiple categories. Currently, I use FilteredQuery to search for the same search term with every Category to get the number of results per category. This...

MDX: Calculated Dimensions?

I don't know if this is possible or not, or if my limited knowledge of MDX is pushing me in the wrong direction... The cube I'm dealing with has two different dimensions for dates, [Statement Dates] and [Premium Dates]. Further in the hierarchy of each looks like this: [Statement Dates].[Statement Year].[2008] [Payment Dates].[Payment...

Can I do band filtering easily with DirectSound? If not, how can I do it?

I'm wondering whether something like this is possible (and relatively easy to do), and if so, how I could do it? I would like to do band filtering on a wave file I'm reproducing. Something similar to the "Equalizer" you see in most Winamp-like applications. My idea is, however, not to equalize the sound, but to use very high negative dB...

How can I remove and transform selective HTML tags?

Hello, I have a csv file of the format: 270291014011 ED HARDY - TRUE TO MY LOVE - Cap NEU 2008 NEU 0,00 € 0,00 € 0 1 0 22.10.2008 03:37:10 21.11.2008 02:37:10 21.11.2008 02:42:10 50 0 0 0 39,99 € http://i7.ebayimg.com/02/i/001/16/0d/68af_1.JPG?set_id=800005007 0 2 8.10.2008 13:40:20 8.10.2008 13:40:20 80587 0 <table bordercolordark=...

How do you implement a good profanity filter?

Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentimes this needs to be filtered out. Where can one find a good list of swear words in various languages and dialects? Are there APIs available to sources that contain good lists? ...

Escaping double quotes in a value for a sticky form in PHP

I'm having a little bit of trouble making a sticky form that will remember what is entered in it on form submission if the value has double quotes. The problem is that the HTML is supposed to read something like: <input type="text" name="something" value="Whatever value you entered" /> However, if the phrase: "How do I do this?" is ty...

Efficient Filtering / Searching

We have a hosted application that manages pages of content. Each page can have a number of customized fields, and some standard fields (timestamp, user name, user email, etc). With potentially hundreds of different sites using the system -- what is an efficient way to handle filtering/searching? Picture a grid view that you want to narr...

Best UI for Search/Filter/Boolean expression

There are some simple ones, some complex ones, but I cannot find the gold standard. Can anyone point me to "the best" way to let a user define a search criteria (or filter) to retrieve results? This is complicated since: * Need to support about 10 different types of elements * Support And, Or, Not * Parenthesis (a killer to 95% of the ...

i need a C# library about strict HTML validation and filtering

i need a C# library about strict HTML validation and filtering ...

SQL if statement in where clause for searching database

I'm creating a stored procedure to return search results where some of the parameters are optional. I want an "if statement" in my where clause but can't get it working. The where clause should filter by only the non-null parameters. Here's the sp ALTER PROCEDURE spVillaGet -- Add the parameters for the stored procedure here @accomod...

General Purpose Filter As You Type (aka typeahead, Incremental find, autocomplete) is it out there?

Background Lately I've become a fanatic that everything I type while working on a computer should be compatible with "DRY". If there's anything I have to type more than once in any context, I want some kind of user-aware auto-complete option to do some of the work for me -- always -- no exceptions. Having to work under Windows, I've lo...

Can Dataset filtering be done from outside the dataset?

I have two TDBLookupComboBox controls that I'd like to connect to the same dataset, but have each one display a different subset of the data. If I only needed one box, I'd use filtering on the dataset, but I need to be able to display both of them at the same time, and I'm not aware of any way to do that. Does anyone know if it can be d...

What is the best way to remove duplicates in an Array in Java?

I have an Array of Objects that need the duplicates removed/filtered. I was going to just override equals & hachCode on the Object elements, and then stick them in a Set... but I figured I should at least poll stackoverflow to see if there was another way, perhaps some clever method of some other API? ...

Divide the content of a text document into categories, and view a partial text

When I go over a text document ,I divide the content into different categories by highlighting sentences with different colors. I would like to have the ability to create a set of categories , and then go over the text and mark a sentence and assign it to one of the categories. and then have the option to see a filtered text, that conta...