filtering

BindingSource Filter by date

Hello. I want to filter values from database based on date. Date in a database contains values like this: 2008-12-28 18:00:00. And my class has a DateTime variable depending on which I want to filter. Ideally it would work like this: myBindingSource.Filter = "DATE(myDateField) = myDateTime.Date" + adjusting myDateTime.Date format as ne...

Filtering away nearby points from a list

I half-answered a question about finding clusters of mass in a bitmap. I say half-answered because I left it in a condition where I had all the points in the bitmap sorted by mass and left it to the reader to filter the list removing points from the same cluster. Then when thinking about that step I found that the solution didn't jump ...

Filtering data in R

I have a CSV of file of data that I can load in R using read.csv() Some of the data is missing, so I want to reduce the data frame down to set that consists entirely of non-missing data, i.e. if a NULL appears anywhere, I want to exclude that column and row from the filtered data set. I know I can probably do this fairly simply with th...

Best method for pre and post processing multilingual user input for a php/mysql CMS

Okay, there is a ton of stuff out there on sanitizing strings but very little, that I can find, on the best methods to prepare user input (like what I'm typing now) for inserting into a content management system then how to filter it coming out. I'm building two multilingual (Japanese, English + other Romance languages) CMSs and having ...

Implementing filters for a SQL table display on a view in ASP.NET MVC (C#) and LINQ-to-SQL?

A follow-up from this question, I've changed my controller and routing around so that now the sort value is assigned by ?sort= however I also want to implement the ability for users to filter the table based on a select set of values: Technician : Tech1, Tech2, Tech3, etc. Category : Category1, Category2, Category3, etc. Priority : Prio...

Collections from LINQ to SQL and the ability to filter

Hi, I have asked this question on more than one forums and it seems no one would even want to take a crak at it. My problem is simple and i would guess everyone has run into it when using LINQ to SQL. If your have a LINQ object called: Person and you would like to poulate a list box based on all of the people you have in your DB the ta...

How can I remove items from a Collection with filter function, and then add new items that don't meet the filter criteria?

I have a Collection, and I want to remove all items that have a certain property set to true. I use a filterFunction to accomplish this. My question is, how can I add new items to the Collection that have that property set to true? The filterFunction is still applied, and the item is not added.... Do I have to iterate through the entire...

WPF Binding relational ComboBox's from L2S with filtering on all of them.

Hi, in a WPF project with Linq to SQL, if you use the O/R - designer to create a simple structure with 3 that are all tied with forgin key relataions like so: Customer <-- Orders <-- Items, and say i want a simpe window with 3 syncronized comboboxes when you select a customer you see only his orders and when you select an Order you see...

Filtering a list

In some cases I've been using a DataTable, filtering it witha DataView and displaying the DataView in a DataGrid. I've recently started switching to using my own classes. For example: [Serializable] [System.Xml.Serialization.XmlRoot("Items", Namespace = "http://mycomp.com/test")] public class Items: List<Item> { } [Serializable] [Sys...

Zend Framework Filter Input StripTags and "<3"

I'm currently using Zend_Filter_StripTags in a commenting system, but stuff kinda breaks when '<3' is entered. StripTags doesn't seem to be smart enough to realize that it's not an HTML tag, and creating the filter as "new Zend_Filter_StripTags(array('3'))" doesn't seem to work either. Should I pass the input through a regexp first, or ...

How to add data Filtering using CListCtrl and CHeaderCtrl

Background: Applications that manipulate a collection of data typically present using a grid containing a header. These same applications typically incorporate a filter to allow the user to narrow the data set (Excel is a wonderful example. There are many others). In my MFC application, I'm attempting to do the same using the CListCtr...

Jquery multiple filter like www.tretti.se

Hi Anyone know were to find a plugin for jquery that can help me build a filter / pageing / sorting for items like http://www.tretti.se/vitvaror/frysar/frysskap ...

Using xslt, transform one xml document based upon the contents of a second xml document

I have one set of documents that implicitly define the allowed fields for a second set of objects that have to be transformed into a third set of documents ( which "rules" document to use depends upon the content of the file being transformed) e.g. <!-- One example rules document --> <document object="obj1_rules"> <field name="A"/> <f...

Filtering from join-table

I'm having some trouble with a tricky SQL-query. In my MySQL database there is the tables topics, tags and tags_topics to join them. I want to fetch topics that share the same specified tags. For example, let's say i have 3 tags with ids 1, 2 and 3, i want to fetch all topics that have tag 1, 2 and 3 associated to them. The topics can ...

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...

How do I filter user input css?

In my application I am allowing users to upload their css style sheets so they can applied to templates. The css is written as an internal style sheet, because at this time I would not like to expose the css style sheet to other users. That creates room for users to include malicious code into the css file. Initially my plan was to conv...

Easiest way to Filter Eclipse Console Output text

I'm asking this in relation to Flex Builder, but it might apply to Eclipse in general. Trace statements in Flex Builder get sent to an Eclipse Output Console. What is the easiest way to filter this text on the Eclipse side? Specifically, I'd like to be able to filter (ignore) lines by patterns. I came across Logback, but it seems like...

Javascript Rich Text Editor and associated class to filter and clean the input?

I realise there are several rich text editors for jQuery but I cannot find any that have an associated class that does the filtering and cleaning required to accept the input into a database. Does such a class exist? I am particularly interested for a PHP library, but .NET would be interesting too. ...

Limit an html form input to a certain float range

Is there a way to limit a form input field to be between certain number range, say (0,100) I'm filtering the input in the onkeydown event, to accept only numbers, the problem is I want to reject a number if that number would make the input to go out of range So I need a way to see if the current value of the input plus the key the user...

Table operation .net library

In some webpages that I have, I must join some datatables in memory and then use the result as a datasource for a gridview. This in-memory join is the only solution, and I have written a method that takes care of it. I was wondering if there is any library out there that can do such things and other table operations, like ordering and...