Remove category and tag base from WordPress URLs without a plugin?

If you want to remove /category/ from the url, follow these two steps: Go to Settings >> Permalinks and select Custom and enter: /%category%/%postname%/ Next set your Category Base to . Save it and you’ll see your URL changed to this format: http://yourblog.com/quotes/ (Source: http://premium.wpmudev.org/blog/daily-tip-quick-trick-to-remove-category-from-wordpress-url/)

Creating categories in a ListView?

How do I create categories in an arbitrary ListView like those in Preferences (PreferenceCategory)? I’ve found android.R.layout.preference_category that renders that grey TextView but don’t see it mentioned anywhere from java code. http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ Note that the code is from Android 0.9 and may require minor modifications to work in Android 1.5. I have an Android 1.5-compatible … Read more

Mapping ranges of values in pandas dataframe [duplicate]

There are a few alternatives. Pandas via pd.cut / NumPy via np.digitize You can construct a list of boundaries, then use specialist library functions. This is described in @EdChum’s solution, and also in this answer. NumPy via np.select df = pd.DataFrame(data=np.random.randint(1,10,10), columns=[‘a’]) criteria = [df[‘a’].between(1, 3), df[‘a’].between(4, 7), df[‘a’].between(8, 10)] values = [1, 2, 3] … Read more