Top "Filter" questions

A program or routine that blocks access to data that meet a particular criterion.

How to filter a dictionary according to an arbitrary condition function?

I have a dictionary of points, say: >>> points={'a':(3,4), 'b':(1,2), 'c':(5,5), 'd':(3,3)} I want to create a …

python dictionary filter
Find all elements on a page whose element ID contains a certain text using jQuery

I'm trying to find all elements on a page whose element ID contains a certain text. I'll then need to …

jquery search filter find wildcard
How can I remove non-ASCII characters but leave periods and spaces using Python?

I'm working with a .txt file. I want a string of the text from the file with no non-ASCII characters. …

python text unicode filter ascii
How can I filter a date of a DateTimeField in Django?

I am trying to filter a DateTimeField comparing with a date. I mean: MyObject.objects.filter(datetime_attr=datetime.date(2009,8,22)) …

python django datetime filter django-queryset
how to customize `show processlist` in mysql?

I want to order by Time,but seems no way to do that ? mysql> show processlist; +--------+-------------+--------------------+…

mysql filter sql-order-by processlist
Using File.listFiles with FileNameExtensionFilter

I would like to get a list of files with a specific extension in a directory. In the API (Java 6), …

java file filter java-6
Java 8 Streams: multiple filters vs. complex condition

Sometimes you want to filter a Stream with more than one condition: myList.stream().filter(x -> x.size() &…

java lambda filter java-8 java-stream
How to filter keys of an object with lodash?

I have an object with some keys, and I want to only keep some of the keys with their value? …

javascript filter lodash
What are the best PHP input sanitizing functions?

I am trying to come up with a function that I can pass all my strings through to sanitize. So …

php filter sanitization
how do you filter pandas dataframes by multiple columns

To filter a dataframe (df) by a single column, if we consider data with male and females we might: males = …

python filter pandas