filtering

User submitted content filtering

Hey all, Does anyone have any ideas on what could be used as a way to filter untrustworthy user submitted content? Take Yelp for instance, they would need to prevent competitors writing business reviews on their competitors. They would need to prevent business owners favourably reviewing their own business, or forcing friends/family to...

How to filter rows in JTable based on boolean valued columns?

Im trying to filter rows based on a column say c1 that contains boolean values. I want to show only rows that have 'true' in c1. I looked up the examples in http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#sorting. The example uses a regex filter. Is there any way I can use boolean values to filter rows? Following i...

Filtering data with jquery

Ok i have this problem... I want to take out some text from a string and that text is held between () brackets and the string looks like this var a = validate(password) I want to take out the password ;) thx in forward Vanja ...

Kohana input & validation libraries - overlap?

I'm familiarizing myself with Kohana. I've been reading up on the Input library, which automatically pre-filters GET and POST data for me, and the Validation libary, which helps with form filtering and validation. Should I use both together? The examples given in the Validation library documentation use the unfiltered $_POST array ins...

Does using the converting input from HTML forms into htmlentities protect attacks invoving JavaScript insertion?

Hi everyone, I was wondering if converting POST input from an HTML form into html entities, (via the PHP function htmlentities() or using the FILTER_SANITIZE_SPECIAL_CHARS constant in tandem with the filter_input() PHP function ), will help defend against any attacks where a user attempts to insert any JavaScript code inside the form fi...

How do you implement a combobox filter using AJAX in ASP.NET?

To save some time on discussing my problem you could check the demo below: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx I already checked the ListBoxExtender on the Ajax Control Toolkit but it wouldn't give me fine results. What I want to do is to filter a listbox which is populate...

How do you change the filtering mode of images in a Flex application?

I have an Image control in my Flex application: <mx:Image id="img" source="@Embed('img.png')" percentHeight="100" percentWidth="100" /> Because the image is scaled, there are a lot of scaling artifacts. Can I change the image to use a different type of filtering? ...

Select first element of filtered list jQuery

I have a function with a chain of filters in jQuery. I am trying to set the focus() on the first element of my last filtered set of elements. This gives me my desired result set, so I've gotten that far: $("div[class='st_d']").filter(function() { return !($(this).css('visibility') == 'hidden' || $(this).css('display') == 'none');...

YUI DataTable - multiple columns filtering

Hello, I know, that it is possible to filter dataTable Control on client as it is shown in this exaple: http://developer.yahoo.com/yui/examples/datatable/dt_localfilter.html Is it also possible to filter more columns? I'd like to have 2 textfields, and when I type sth to the first one, DataTable would filter according to the 'areacod...

Ignoring Firefox console messages on a more granular level than domain

I am using the Console² Firefox addon, which has the helpful Domain Blocker feature so that I don't have to see messages about outside issues that I have no control over. But the log is still littered with gobs of messages from javascript libs that I develop with, like jQuery. Is there any way to hide error messages on say a per-file ba...

How to use LINQ To Entities for filtering when many methods are not supported?

Hi, I have a table in SQL database: ID Data Value 1 1 0.1 1 2 0.4 2 10 0.3 2 11 0.2 3 10 0.5 3 11 0.6 For each unique value in Data, I want to filter out the row with the largest ID. For example: In the table above, I want to filter out the third and fourth row because the fifth and sixth rows...

How to filter and format email text and forward to customers?

I get poorly formatted invoice related email from my payment gateway. I wan to automatically format these emails to make them more readbale. Mostly I want to remove few 'fixed' lines which are always present in email body. Do I need to run some sort of PHP process to do it? Is it possible to do it on email server itself? EDIT I ha...

Yet another Rails routing question

I can't seem to grasp the Rails routing just yet. I want to be able to link the site to, for example, ...com/store/xbox360/Mass Effect 2 (which is /store(my controller)/:system/:title). I have the database entries that include the :system and :title variables (?). How would I route these to show up and filter these entries? Or is this ...

mulitple attribute xml filter as3 e4x

I am trying to come up with the best xml schema to support tag filtering. And then a method to filter the xml on an arbritary amount of tags. So here is the xml: var videoXML:XML= <?xml version="1.0" encoding="UTF-8"?> <videos> <video> <tags label="dogs,brown,lawns" /> </video> <video> <tags label="dogs,cats" /> </v...

Filtering a select list via input box & jquery

Hi all, I was wondering if i could get some help with filtering a select list using an input box via jquery. Here's what my js looks like, but it doesnt seem to work. I'm guessing this is because options within a select list are not hide-able. <script type="text/javascript"> $(document).ready(function() { $("#inputFilt...

Replace all & that are not a HTML entity using C#

Basically a dup of this question using php, but I need it for C#. I need to be able to replace any & that is not currently not any HTML entity (e.g. &amp;) before outputting to screen. I was thinking a regex, but I'm not sure if .Net has something built in that will do this. ...

HTML Tables with jQuery Filtering

Let's say I have... <form action="#"> <fieldset> to:<input type="text" name="search" value="" id="to" /> from:<input type="text" name="search" value="" id="from" /> </fieldset> </form> <table border=1"> <tr class="headers"> <th class="bluedata"height="20px" valign="top">63rd St. &amp; ...

good word whitelist to override bad word black list

I've read through the discussion here... http://stackoverflow.com/questions/273516/how-do-you-implement-a-good-profanity-filter I've decided to implement a bad word filter using the badlist referenced in that thread. However I'm thinking about the scunthorpe problem. (see wikipedia I can't post the link, I'm a new user) Is there a whi...

Jquery Session & Table Filtering

This is my Jquery <script type="text/javascript"> $(function() { var from = $.session("from"); var to = $.session("to"); var $th = $('#theTable').find('th'); // had to add the classes here to not grab the "td" inside those tables var $td = $('#theTable').find('td.bluedata,td.yellowdata'); $th.hide(); $td.hide(); if (to == ...

Matlab - applying low-pass filter to a vector?

If I have a simple low-pass filter, e.g. filt = fir1(20, 0.2); and a matrix with a list of numbers (a signal), e.g. [0.1, -0.2, 0.3, -0.4] etc, how do I actually apply the filter I've created to this signal? Seems like a simple question but I've been stuck for hours. Do I need to manually calculate it from the filter coefficients? ...