filter

How can I order a list by number of matches after filtering by Search Terms in C#?

I have a Filter Method in my User Class, that takes in a list of Users and a string of search terms. Currently, the FindAll predicate splits the terms on spaces then returns a match if any of the searchable properties contain any part of the terms. public static List<User> FilterBySearchTerms( List<User> usersToFilter, string searchTerm...

Excel Macros - How do I get Range of AutoFiltered rows?

OK, so I have set AutoFilter property for the whole of the active worksheet (UsedRange.AutoFilter Field:=1, Criteria1:= [blah blah]) Once the filter is applied, how do I programmatically select the range if rows and columns that are the result of the filter. I checked UsedRange, but that gives the whole (unfiltered) range. Any ideas? ...

boost::filter_iterator -- how would I do that with the STL?

I am passed an Iterator and I have to pass it on to another function -- but filtered so that certain elements are skipped (it's a range of pointers, and I want to filter out the NULL pointers). I googled for "stl filter iterator" to see how to do this, and boost::filter_iterator came up. That looks nice and I could use it, but could ...

Unable to get Google definitions to Standard Output

I aim to filter my Google results right at terminal such that I get only Google's definitions. I am trying to run the following in Mac's terminal open http://www.google.com/search?q=define:cars&amp;ie=utf-8&amp;oe=utf-8:en-GB:official&amp;client=vim A similar command for Firefox is open http://www.google.com/search?q=define:cars&amp...

WPF DataGrid Take() not working for ItemsSource

Hi, I am trying to bind a DataGrid to an Array for testing purposes. As long as I am not trying to filter anything, the auto columns work nicely. As soon as I try to filter the array by .Take(5) or any other filter, the rows stay empty, and there are only thing horizontal lines. I think it may have something to do, with the "anonymous" ...

User defined filter for linq

Hi, I have form with user defined filters ( combobox with column names, combobox with filter types and textbox with value). How can I dynamicly add user defined filter into LINQ query? Typical query looks like: var qProducts = from p in db.Products where p.IsArchived == false order by p.ProductName select p; I'm using LINQ (...

How to add Stroke to Text in AS3?

I am coding in AS3 and want to add a stroke to text that I'm displaying to the screen. My current code is: format = new TextFormat("BN Elements", 14, 0xEEEEEE, false, false, false, null, null, "left"); format.font = "BN Elements" scoreText = initText(starsleftText, format, "", 160,5, 545, 61); scoreText = "Stroke This Text"; As the te...

SharePoint: Filtering a List that has Folders

I have a SharePoint document library that has a folder structure used for organizing the documents (but also for controlling access, via permissions on the folders). The documents in the library are updated every month, and we store every month's version of the document in the same folder; there's a "month" column used for filtering tha...

Mappers, Reducers, FIlters

I know about map/reduce alghoritm and its use. It's using functions that are called Mappers and Reducers, but I also find people use the word Filters. Are Filters same as Mappers or is there some significant difference? ...

filter people picker

Hi, i have some customer sites and i have a issue list with a people picker. I want to show only the people that has acces to the customer site of there own company. I don't want that other customers see customers of a other company. thx i try this but i don't have any effect stsadm -o setproperty –url http://extranet.company.com/si...

Jquery Search and filter table

Hi all, I was looking for a jquery plugin that'll filter a table according to input values. I came across http://rikrikrik.com/jquery/quicksearch/, but i can't figure out how to make it work for an already existing input box. Currently it create a new input form for me (which i don't want) but i'd like to be able to use it with an exis...

How do you combine filter conditions

The filter class of functions takes a condition (a -> Bool) and applies it when filtering. What is the best way to use a filter on when you have multiple conditions? Used the applicative function liftA2 instead of liftM2 because I for some reason didn't understand how liftM2 worked within pure code. ...

How can I use Django admin list and filterering in my own views?

I’m just beginning to learn Django and I like the automatic listing in Django admin and the way you can configure filters and what columns to show. Is it possible to use it in my own applications? I’ve looked in the source for the admin and figured out that I probably want to subclass the “ChangeList”-object in some way and use it in my...

Django filter -- How do I go about filtering for emply or NULL names in a queryset

Hi, I have first_name, last_name & alias (optional) which I need to search for. So, I need a query to give me all the names that have an alias set. Only if I could do: Name.objects.filter(alias!="") So, what is the equivalent to the above? Thanks, VN44CA ...

Regex - Match ( only ) words with mixed chars

Hi all! :) i'm writing my anti spam/badwors filter and i need if is possible, to match (detect) only words formed by mixed characters like: fr1&nd$ and not friends is this possible with regex!? best regards! ...

ActionFilter to share archived order data and current order data

Just wondering if anyone has used an actionfilter to make it possible to share the view for a specific type between archived info and current info? Example: public class Order { protected IList<int> _products; public Order(IList<int> products) { _products = products ?? new List<int>(); } public virtual void...

WPF's ICollectionView.filter with large sets of data

Hello, I'm working on an wpf app which contains a listview with quite a lot of data (10 000 to 100 000) rows. The user can apply all sorts of filters to this listview making the filter logic quite advanced (and slow). For now, the relevant part of my code looks like this: ICollectionView view = CollectionViewSource.GetDefaultView(hugeL...

Wireshark Info Filter Help

I have looked all over the net for a tutorial on how to filter the info column but cant find any that makes sense. I want to filter all logs where the info column contains the text "insitu-conf" but cant find out how. Help please. ...

Is there any better way to do filefilter for many ext?

File files[] = rootDir.listFiles(new FileFilter() { public boolean accept(File file) { if (file.isDirectory()) return true; String name = file.getName().toLowerCase(); if (name.endsWith(".zip") || name.endsWith(".jar") || name.endsWith(".z") || name.endsWith(".gz") || name.endsWith(".tar") || n...

Bloom filter or cuckoo hashing?

Which do you prefer and why? They both can be used to accomplish similar tasks but I'm curious as to see what people have used in actual applications and their reasoning for doing so. ...