filtering

Django admin's filter_horizontal (& filter_vertical) not working

I'm trying to use ModelAdmin.filter_horizontal and ModelAdmin.filter_vertical for ManyToMany field instead of select multiple box but all I get is: My model: class Title(models.Model): #... production_companies = models.ManyToManyField(Company, verbose_name="компании-производители") #... My admin: class TitleAdmin(ad...

Gaussian filter in MATLAB

Does the 'gaussian' filter in MATLAB convolve the image with the Gaussian kernel? Also, how do you choose the parameters hsize (size of filter) and sigma? What do you base it on? ...

ruby on rails, searchlogic and refactoring

Hey all, I'mt not too familiar with searchlogic plugin for rails (I did view the railscasts but wasn't helpful in relation to the specific code below). Can anyone briefly describe how it is being used in the three methods below? Thanks for any response. def extract_order @order_by = if params[:order].present? field = params[:order]...

ASP.NET MVC - how to modify requested URLs?

The baidu spider seems to be adding ¤ to end of some crawled urls (it seems that it happens with urls containing single unicode character as the last character) The baidu-requested url looks like this: site.com/abc/ä¤ while site.com/abc/ä is the valid url and as linked from many places on my site. The internal problem is that a diff...

Duplicate an AppEngine Query object to create variations of a filter without affecting the base query

In my AppEngine project I have a need to use a certain filter as a base then apply various different extra filters to the end, retrieving the different result sets separately. e.g.: base_query = MyModel.all().filter('mainfilter', 123) Then I need to use the results of various sub queries separately: subquery1 = basequery.filter('sub...

Error using Dynamic Data Filtering: missing datasource

I am trying to use the ASP.NET Dynamic Data Filtering project, but I'm running into a problem during the configuration. I'm following the instructions on the author's blog, and everything works like described. Then it tells me to change the datasource using the designer view. I am told to select the "GridDataSource" in the "Configure da...

How to filter results by multiple fields?

I am working on a survey application in ruby on rails and on the results page I want to let users filter the answers by a bunch of demographic questions I asked at the start of the survey. For example I asked users what their gender and career was. So I was thinking of having dropdowns for gender and career. Both dropdowns would defau...

PHP: filter string to work as a function name

what is a quick way to filter a string to work as a function name? note: I'm thinking something like filter_var(). ...

Customized generation/filtering resources with maven

I wonder what is the Maven way in my situation. My application has a bunch of configuration files, let's call them profiles. Each profile configuration file is a *.properties file, that contains keys/values and some comments on these keys/values semantics. The idea is to generate these *.properties to have unified comments in all of the...

How can I get unfiltered position in filtered ListView?

I am using ListView with ArrayAdapter to filter items in list. I have implemented onListItemClick() method to get clicked item position and call second activity using that value. For example I have countries in my list: Australia Belgium Botswana Belize ... Belgium has position 1 here. However, if i type "Be" to filter items, I g...

ELMAH - Filtering 404 Errors

I am attempting to configure ELMAH to filter 404 errors and I am running into difficulties with the XML-provided filter rules in my Web.config file. I followed the tutorial here and here and added an <is-type binding="BaseException" type="System.IO.FileNotFoundException" /> declaration under my <test><or>... declaration, but that complet...

Badword filter in PHP?

I am writing a badword filter in PHP. I have a list of badwords in an array and the method cleanse_text() is written like this: public static function cleanse_text($originalstring){ if (!self::$is_sorted) self::doSort(); return str_ireplace(self::$badwords, '****', $originalstring); } This works trivially, for exact matches, bu...

Delphi hook to redirect to different ip

What is the best way to redirect ANY browser to a different ip for specific sites? For example if the user will type www.facebook.com in any browser he will be redirected to 127.0.0.1. Also the same should happen if he will type 66.220.146.11. What I have until now is this: using the winpkfilter I am able to intercept all the traffic on...

spam and dirty words comment post filtering/prevention/blocking in python (django)

Hi All, My basic question is how to prevent spam and dirty words in a comment post system under python (django). I have a collection of phrases (approximately 3000 phrases) to be blocked. What I want to do is like this: If I found a comment which has a dirty-word when user clicks the post button, then the web should popup a warnin...

LINQ to SQL: filter nested objects with soft deletes

Hello everyone, I'm using soft deleting in my database (IsDeleted field). I'm actively using LoadWith and AssociateWith methods to retrieve and filter nested records. The thing is AssociateWith only works with properties that represents a one-to-many relationship. DataLoadOptions loadOptions = new DataLoadOptions(); loadOption.LoadWi...

jsf datatable lazy load filter and sorting

Hi, I have worked on several projects with a lot of data tables. The tables had sorting, filtering and paging of course on server side and with help of the db (all databases has implemented sording, filtering -where and limit the returned results). When workig on real application there are a thousands of even a millions rows. But I ha...

using htmlpurifier for input or output escaping/filtering

I am processing a user input from the public with a javascript WYSIWYG editor and I'm planning on using htmlpurifier to cleanse the text. I thought it would be enough to use htmlpurifier on the input, stored the cleaned input in the database,and then output it without further escaping/filtering. But I've heard other opinions that you s...

django admin filter tweaking

Hi, I want to use django's admin filter on the list page. The models I have are something like this: class Location(model): name = CharField() class Inquiry(Model): name = CharFiled() location = ManyToManyField(Location) Now I want to filter Inquiries, to display only those that contain relation to specific Location object. ...

DSP - Filtering in the frequency domain via FFT

I've been playing around a little with the Exocortex implementation of the FFT, but I'm having some problems. Whenever I modify the amplitudes of the frequency bins before calling the iFFT the resulting signal contains some clicks and pops, especially when low frequencies are present in the signal (like drums or basses). However, this d...

Laggy interface with NSSearchField hooked up to an NSArrayController via bindings

So I've got an NSSearchField hooked up directly to an NSArrayController via bindings, attached to the filterPredicate, so that without any code, the user can just type in the NSSearchField and filter the list of objects in the NSArrayController presented to him in the interface (an NSCollectionView, to be specific). The NSSearchField is...