filter

windows: load a filter driver while windows is running

Is it possible to install a keyboard filter driver(like ctrl2cap) while windows is running and not having to reboot? I tried it once with a driver loader but I got a BSOD. If it is possible what was I doing wrong? What can I do next time to not get a BSOD? Also, if it is possible, could I do it with c++? Thanks for the help! ...

Filtering dictionaries and creating sub-dictionaries based on keys/values in Python?

Ok, I'm stuck, need some help from here on... If I've got a main dictionary like this: data = [ {"key1": "value1", "key2": "value2", "key1": "value3"}, {"key1": "value4", "key2": "value5", "key1": "value6"}, {"key1": "value1", "key2": "value8", "key1": "value9"} ] Now, I need to go through that dictionary already to format some o...

Trouble with simple PHP profanity filter

Hey everyone, I am writing a simple profanity filter in PHP. Can anyone tell my why, in the following code, the filter works (it will print [explicit]) for the $vowels array and not the $lines array which I constructing from a text file? function clean($str){ $handle = fopen("badwords.txt", "r"); if ($handle) { while (!feof($hand...

how to filter asian language from a RSS feed?

I like to keep track of delicious.com/popular RSS feed. However, lately there are more and more Asian pages in the items. Since I do not understand any Asian languages, I would like to somehow filter them from the feed and save myself some time. I've been trying to cook up something using Yahoo pipes, but have not been able to get it wo...

jQuery get text with wildcard contents after an element and move it

Hey, I think this might be a tricky one, but if anyone can solve it I'd be very impressed, and also very grateful. Here's the existing markup (which I can't change, otherwise then it'd be an easy problem and I could solve it myself!): <a title="1 topics" href="http://localhost/tags/amis/"&gt;amis&lt;/a&gt; (1) <a title="2 topics" hre...

Limit filter to visible screen - Actionscript 3

I'm currently working in FlexSDK/AS3 and have a canvas containing many objects. The canvas is large - around 4K x 4K pixels, and I do a lot of scaling/zooming/scrolling about. The viewport is only around 800x450. I'm trying to apply a blur filter to the canvas - which I have figured out and it works fine, except for this one little bug:...

How to filter files when using scp to copy dir recursively?

I need to copy all the .class files from server to local with all dir reserved. e.g. server:/usr/some/unknown/number/of/sub/folders/me.class will be /usr/project/backup/some/unknown/number/of/sub/folders/me.class the problem is, there are many other useless files such as .svn-base files that i don't want. how can i filter them so I only ...

Linq to SQL - Filter by "All Children" in "FilterCollection"

I want to return all the entities of a database where ALL child elements of a parent are found in the control collection. So, I thought something like this would work: var toInclude = new List<int>{1, 2, 3}; var result = allObjs.Where(obj => obj.Children.All(child => toInclude.Contains(child))); That doesn't work. It returns all ent...

Simulating the Maven2 filter mechanism using Ant

I have a properties file, let say my-file.properties. In addition to that, I have several configuration files for my application where some information must be filled regarding the content of my-file.properties file. my-file.properties: application.version=1.0 application.build=42 user.name=foo user.password=bar Thus, in my configura...

Any way to filter the files in a database project in Visual Studio 2008 Database Edition?

Is there any way, either natively or through an addon, that I can filter the files shown in my database project in Visual Studio 2008 Database Edition? We have an older database that was worked on by lots of contractors, and so things aren't organized very well, and we have hundreds upon hundreds of stored procs and tables. So, not being...

drupal 6 - can i use one exposed views filter to search/filter several similar cck fields?

i have a decent understanding of configuring drupal and using modules for basic stuff, but just getting into module development and overriding functions and stuff due to my very basic understanding of php and mysql. i have a custom content type ('books') and a 3 cck field for genres (primary, secondary, tertiary). i'd like a user to be ...

Can I write ISAPI filters in Perl?

I need to write an ISAPI filter for IIS 6.0 to rewrite ugly URLs into SEO-friendly URLs. Because of the need for string parsing and regular expressions, I'd prefer to use Perl to do this. There is a module for IIS called (ingeniously) Perl for IIS, but I'd rather not use that because it's an ISAPI extension itself (running in a DLL), so ...

[Django] Can I use more than a single filter on a variable in template?

For example: {{test|linebreaksbr|safe}} ...

Grails filter syntax, or, How to call a Grails Filter outside Grails

Grails provides filters that run before your controllers. They're defined in classes that look like this: class SecurityFilters { def filters = { myFilter(controller:'*', action:'*') { // What are those weird colons?? print "I'm filtering!" // Code that does the filtering goes here } } } These...

Filtering an DataGridView that doesn't have databinding

I have a non databound DGV (no datasource, etc; rows added manually). To filter it I'd been doing a check in a loop and setting the rows visible property appropriately. This worked well with smaller test sets, but fails utterly in performance with larger ones. 1k rows filtered at 5000/sec. 10k rows filtered at only ~250/sec. 50k at ...

Django - Getting last object created, simultaneous filters

Apologies, I am completely new to Django and Python. I have 2 questions. First, how would I go about getting the last object created (or highest pk) in a list of objects? For example, I know that I could use the following to get the first object: list = List.objects.all()[0] Is there a way to get the length of List.objects? I've trie...

Are Custom Filters in NUnit Possible?

Is it possible to define a custom filter so that NUnit will only run specific tests? I have many of my Nunit tests marked with a custom attribute "BugId". Is it possible to write a filter so that I can pass in a number and only run the tests with that attribute and number? If so show mockup or real code. ...

When to filter/sanitize data: before database insertion or before display?

As I prepare to tackle the issue of input data filtering and sanitization, I'm curious whether there's a best (or most used) practice? Is it better to filter/sanitize the data (of HTML, JavaScript, etc.) before inserting the data into the database, or should it be done when the data is being prepared for display in HTML? A few notes: ...

Ruby on Rails FilterChain internals - how to make it reloadable?

Hi, I'd like to have a more dynamic way of working with filter chains in Ruby on Rails 2.3.2. At the moment, the filter chain is built as the classes are loaded. I have a very particular need for the filter chain to be rebuilt at some point in time after the classes have loaded. This is to do with a Rails project (Spree, Radiant may ...

Is it possible to do a "not equals" query in Dojo Grid?

I have a Dojo Grid that I'm filtering with a query that's set in a javascript function. function filter() { var grid = dojo.byId("gridNode"); grid.setQuery({fieldName:"Some Text"}); } What I'd really like to do, though, is filter it so that it shows all entries where the fieldName value is not empty. Does anyone know if there...