filter

Filter rows in DataGridView bound to object collection

Hi, I need to filter what items from a collection object that I want to show in a DataGridView. It may be; ObjectModel.Collection, a BindingList or simply a List. I may use a BindingSource between the object and the DataGridView if that's an advantage. What different options do I have for filtering, while still maintaining two-way bin...

Intercept write action and generate user log

I want to log every user action that change domain in my web application. when user try to create, update, delete some data the action must be save in to the user log. but when user action is list, generate report. it doesn't need to log. I my current program, I write service log. and call that service log to each action method (perform...

Query all rows and return most recent of each duplicate

Hey guys, I've got a model that has an id that isn't unique. Each model also has a date. I would like to return all results but only the most recent of each row that shares ids. The model looks something like this: class MyModel(models.Model): my_id = models.PositiveIntegerField() date = models.DateTimeField() title = model...

write an filter like photoshops's displace filter?

Hi, I want to write photoshop's displace filter in Java. Does anyone know where I can find some background information about this topic? ch ...

Filtering web page results with javascript-jquery

Hello. I have some filters on the left... At the right there is a div placeholder where products are shown... When a user chooses a filter , products on the right should be filtered and non available filters(filters that if are selected there would be no results) should be disabled. The filters are dynamic.. Adding custom tags to objects...

Standard ML (using MoscowML) Whats wrong with this function? (filter)

This is part of a homework assignment so my goal is to understand why this is wrong. As I mentioned before I'm using Moscow ML. fun filter pred = let fun f ([], a) = [] | f ([], a) = a | f (e::L, a) = if pred e then (f L (e::a) ) else (f L a) in f end The error I get is: | f (e::L, a) = if pred e then (f L (e::a) ) else (f L a...

Again, Flex 4, Actionscript Complex data filtering of XMLList filter and data-sets with special conditions.

So I tried to format this properly the first time, but it published and all the stuff in carets wasn't parsed properly, so I'll try again: I have been trying to decide what the best way to filter a set of data for a tree view is. The filters are in the following XML format: using periods instead of carots Filterin...

log4j.properties value filter

Hi: I am using log4f for the logging in my app,and I want to add a FileAppender to the log,so I have to set the file: log4j.appender.fileout.File=E:\myapp\logs\log.html I wonder if there is any way can replace the absolute file path? Maybe using something like: log4j.appender.fileout.File={something}\logs\log.html? ...

NHibernate - Retrieve parent / children with criteria applied only to children

I have a parent entity with a list of child entities. When using NHibernate to retrieve a given parent with children from SQL, it works fine if there are no children OR if there are children with dates that match the where condition. If there are children that do not match the where clause, the parent is null. I want to have the paren...

Text Filter: strange behavior with SimpleCursorAdapter

Hello all I have a problem with a filter on my listview. In fact that work pretty well with an IndexAdapter, but not with a SimpleCursorAdapter. In the following example, if isCursor==false, the filter work pretty well but if it is == true, the filter does not work! By the way, the adapter work pretty well. if(isCursor){ mCursorA...

Why session.invalidate doesn't work in IE browser ?

I implemented a sevlet filter in my application, and within the filter, if I find some specific url pattern, I will use request.getSession().invalidate() to logout and clear the session, then redirect to a login page. session.invalidate(); session.setAttribute("hi", true); response.sendRedirect("login.jsp"); but I found, after that I ...

how to filter Excel data, by text length?

Hi. In Excel 2007 , i want to filter rows by one of my columns text length, eg. hide the rows with text lengths less or greater than 12 characters. what should i do? Thanks. ...

How to implement low pass filter using java

Hello Everyone, I am trying to implement a low pass filter in Java. My requirement is very simple,I have to eliminate signals beyond a particular frequency (Single dimension). Looks like Butterworth filter would suit my need. Now the important thing is that CPU time should be as low as possible. There would be close to a million sampl...

Android: SMS filter - Can you have priority listener for SMS messages?

Hi, I am trying to implement an app that will only listen for a certain header in the SMS. (Parse the sms message and look for some header) That's not hard to do. The problem is once the app finds the header and knows this SMS is for me, I don't want other app(that has broadcast listener on SMS) to receive SMS. (for example, 'messages' ...

DISTINCTCOUNT with FILTERing -1 IDs

Hi, Please bear with me as I am newbie in SSAS/MDX. I want DISTINCTCOUNT measure on ID column of my fact table but after filtering -1 i.e. unknown IDs. I like to slice/dice on it as well. Here are my tables DimStudent ---------------------------- ID Name -1 Unknown 1 Joe 2 Tim 3 P...

F# discriminated union picking 0 or 1 from a list

Hi all, Given a mapping program where I map from an array of strings to a discriminated union, I want to select an instance of a particular DU type. I know that there will be 0 or 1 instances. Is there a smarter way to do it than this? type thing = { One:int; Two:int; Three:int} type data = | Alpha of int | Bravo of thing ...

Lucene.NET: Query or Filter?

It is my understanding that documents are found based on a query, and then that result is then filtered by the filter. The Query is the only that that will effect the score/relevance of a document. Would there be any performance (caching) improvements if I query results that have relevance towards relevancy, and filter items that don't...

Filter WPF TreeView using MVVM

Hi, I currently have a TreeView which has the following structure: <TreeView ItemsSource="{Binding RootViewModels}" FontSize="12"> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="local:TreeViewItemBehaviour.IsBroughtInto...

Accelerometer to relative position

Before I reinvent the wheel I wanted to see if anyone can share code or tips for the following: In order to get relative position of the iPhone, one needs to Set the accelerometer read rate Noise filter the accelerometer response Convert it to a vector Low pass filter the vector to find gravity Subtract gravity from the raw reading to...

C# WinForms - filtering one combobox based on the value of another combobox in a databound datagridview

Hey, I have 4 tables - Agents, Customers, Counties and Towns. Agents and Customers both have a Town field and a County field. I have a DataGridView for each table. These are working great. I have the Town and County as comboboxes using the Towns and Counties table as the datasource. The problem is that it does not filter the Town based...