I am trying to understand the different rules of EasyList of Adblock Plus but have not been able to find a definitive guide. Could someone point me to the right place or describe the different rules and symbols, e.g., #, ##, ###, $, ##, ||, ^, and so on? When is the matching done with url, and when is it done with class and id attributes? Which rules define whitelists and which ones define blacklists?
Found it at https://adblockplus.org/en/filters. The page describes the different types of filters as well as tips for creating them.
Related
I'm currently configuring an Artemis ActiveMQ Broker and need to change the default ''wildcard-addresses''. So I found the ''wildcard-addresses'' tag, but I didn't find the information I need, so I have two questions:
I want to set routing-enabled to true, but just for the tag ''any-words'' and disable the ''single-word'' tag (or just want to know if this is even possible).
I didn't find the answer in the official documentation, so I'm wondering if someone found a good reference which explains the different tags for the ''wildcard-addresses'' configuration, which is in the style of the ''Configuration Reference'', but includes a section about ''wildcard-addresses''.
What I've found so far but does not satisfy me:
Wildcard-syntax
Routing Messages with wildcards
Configuration reference
Thanks in advance,
Alex
There is no way to disable certain match types (i.e. single word or any words), and it's not clear why one would want to.
The wildcard-addresses block is for enabling/disabling wild-card routing and for customizing the wild-card syntax.
Here's the basics (as described in the documentation):
A wildcard expression contains words delimited by the character defined by delimiter (i.e. . by default).
The character defined by any-words (i.e. # by default) means "match any sequence of zero or more words."
The character defined by single-word (i.e. * by default) means "match a single word."
I would like to use underscore in my url instead of hyphen.
I mean like this wikipedia link
My Current url:
www.example.com/2013/01/hello-this-is-a-test-post/
Desired url
www.example.com/2013/01/hello_this_is_a_test_post/
But one good programmer in wordpress stackexchange advised me, Google treats - as word separator, but not _.
He also mentioned that rule doesn't apply for MediaWiki sites.
Is it true?
Google treats hyphens as word seperators is TRUE.
The reasoning behind it I recall is based on programmers searching for functions which usually (if not always) have underscores in them. So instead Google treats underscores as word joiners.
This article elaborates: http://www.ecreativeim.com/blog/2011/03/seo-basics-hyphen-or-underscore-for-seo-urls/
I'm working on a Web application that uses tags like Stackoverflow tags. I've noticed that a lot of sites that use tags make them space-delimited, which disallows a tags like...
"favorite recipes"
Instead they enforce this...
"favorite-recipes" | "favorite_recipes" | "FavoriteRecipes"
If the tags were comma-delimited, an item could have a set of tags like...
"cats, birds, favorite recipes, horses"
I have to decide on the policy for my app.
I guess I like the idea of space-delimited, but if my users aren't programmers they might be more comfortable with the familiar idea of commas denoting a list.
Why are comma-delimited tags unusual? Is there a major downside to them?
I think space delimited tags feel more like typing and you aren't syntactically bound to commas or pipes etc...
I also think that not allowing spaces in tags is kind of nice because you don't have to worry about turning them into URLs they are already ready to go.
Online tools like Delicious use space delimiting for tags, but other tools like Wordpress allow you to have spaces in tags so they require commas. If you do things this way, you will have to create similar tag "slugs" to make sure they work in a URL cleanly (i.e. my tag would be my-tag)
Remember, allowing too much freedom in your tag creation can result in some pretty crazy tags like "Things I like to do on a Saturday afternoon..." etc.
I think the idea is that a tag should be short and to the point.
If you go to type in "favorite recipes", when it doesn't work, you think to yourself "Oh, I should redo this." So you make "favorites" "recipes" instead.
If it was something you really needed, like "pork roast" then it makes sense to make it "pork-roast" but only after you've thought about really joining those works. Perhaps you shouldn't though - perhaps it should be "pork" "roast" so it shows up under searches for pork and searches for roast.
tl;dr It's for user experience and searching so they don't enter something that can't be easily searched for.
Yes, I also think that space-separated tags reduce complexity. And you can enter them faster, because you have the big space key to separate them. Maybe the brain is also less loaded, because it doesn't need to think about where to put a comma delimiter and where not.
I built an app with tags once, and used commas. The only down side to commas is that you have to do more thorough checking of empty tags. For instance in the example:
"George Bush, Bill Clinton, Barack Obama, "
If someone posts the tags with a comma at the end and there is a space it generally will get added to the database.
This is because if you simply check to delete once space you would turn Bill Clinton into BillClinton.
However you can make sure that the tag is at least a certain amount of characters to ensure there is not empty tags. This will not ensure that there is not three or four spaces in a row though.
Anther thing to note is that humans generally put spaces before words and after commas.
So in the example above there is a space after each comma and before each president. This space will be included in the database making the tag:
" Bill Clinton"
instead of
"Bill Clinton"
as the user probably attempted.
Once again you can eliminate both beginning and trailing spaces, but there is more server side code to implement in this case.
If you just use spaces then you can eliminate any unwanted characters like commas etc, and put the tags into an array using space characters to separate them.
I actually prefer tags that are comma or semi-colon delimited for two basic reasons:
It's more natural (user-centric not techie-centric)
It reduces redundancy, as the example noted "favorite-recipes"
"favorite_recipes" "FavoriteRecipes"
And I'm afraid some of the other answers sort of make it sound as if web developers are (how shall I say this) less willing to do the work than, for instance, database developers - who've been addressing some of these same issues for years. (I've coded for web and client-server databases.)
We have a form that has fields for first and last name. I was asked to allow underscores. I don't know of any sql injection that uses underscores, but I also don't know of anyone with an underscore in their name. Is there a good reason to allow or not allow underscores in names?
EDIT: I'm using parameters and server side validation. This is for client side validation via the jQuery validation plugin.
EDIT 2: I didn't mean for this to become a discussion on whether or not I should do any validation...I just wanted to know know if there was any compelling reason to accept underscores, like I should accept Irish people or hyphens. Based on that, I'm accepting Oren's answer.
You should be as liberal as possible in what you allow as a name. There is no good reason to disallow an underscore, so why do it? There are many horror stories of people who try to utilize software that disallows their actual name. Have a look at Falsehoods Programmers Believe About Names for assumptions you should not make.
DO NOT PREVENT SQL INJECTION USING WHITELISTS!
Have you come across an O'Neill yet?
Instead, use parameters.
I will admit, though, that whitelists will work better than blacklists
Re: EDIT:
You should not do such validation at all.
If your server-side code can handle it, there's nothing wrong with the name --'!#--_.
If your server-side code cannot handle it, it should.
You're doing your validation wrong. When preventing sql injection, just use placeholders or your database library's escape function to escape the data. What characters you use in the name doesn't matter then.
You'll need to allow apostrophes and hyphens (O'Reilly, Double-Barrel). Never heard of an underscore in a name though.
Ideally, you should be able to allow any characters and not have a problem with SQL injection because you are using parameterized queries etc.
Do you disallow '? How do you think Mr O'Reilly likes that?
If you prevent underscores with the assumption that we are not aware of names with underscores, would you do the same for the other dozens (hundreds) of other "special characters"?
Unless there is some reason to block underscores, I would leave it up to the user to be able to enter their name as they want.
What is your opinion on whether a tagging user interface widget should require commas or spaces as the delimiter? For example, this site uses spaces, requiring multi-word tags to use a hyphen. I assumed this was some design suggestion from Joel; but then I realized that Facebook and Wordpress use commas.
So what should it be? Or does it not matter much? Let's suppose the users of this widget are generally computer literate but not terribly so.
I would try to think about the domain of the tags and figure out what is the likelihood that potential tags would contain spaces.
For example, most things on this site are single word or acronyms, so it's not difficult to use spaces.
On the other hand, when tagging facebook photos, for example, an average tag is something like "spring break", "frat party", "random hookup", "secretary of state", etc. So dealing with space interpretation or with quotes is more difficult, hence commas make more sense.
I'm not familiar with a specific rule.
If you're thinking of tag clouds though, spaces make less sense.
Be fault-tolerant, if possible. For example, would it work to use whatever is provided? The following two inputs could result in the same, if parsed nicely:
foo bar "hello world"
foo, bar, hello world
Both would result in three obvious tags.
I realize that this would it make hard to parse the following input unambiguously:
hello world
In that case, I'd probably read two distinct tags.
commas. it is more natural. you can use words that include spaces more easily. other solutions seem to complicated for human beings (maybe not for programmers but they think different - remember the "u" in gui stands for "user")
i would go for a comma as it is more natural to separate multiple word tags by commas then use hyphens or other less usable replacement techniques
I don't think it matters. I think for a programming site, most of your tags will not be multi-word so it makes to use a space delimiter. But I think you could make a very compelling argument either way and it really just comes down to personal choice.