category

One category per method vs. all methods in one category? (ObjC)

Hi, Should I put all my methods in one category (I mean for the same kind of object) or should I split them up in many files? (Something like NSStringAdditions vs. NSString+this and NSString+that) ...

What happens if two ObjC categories override the same method?

I know of a couple of rules regarding Objective-C categories: Category methods should not override existing methods (class or instance) Two different categories implementing the same method for the same class will result in undefined behavior I would like to know what happens when I override one of my own category methods i...

Factory using categories for registering classes.

I want to create a factory that: - would create instance of object for some id (string), - would allow for class to register itself for an id. Currently this is implemented with centralized register of mapping. I would like to decentralize the register, so every class would register itself in its implementation file. My idea for this ...

Multiple Blogs Feeding into Homepage

I have created a website (www.accidentalwords.com) using squarespace as the host. I would like to have my website recognize the category that I have assigned to the blog post and repost it on another blog. For example, on my site there is a like to "food". If I were to create a post on the food page and gave it a category of "Ingredient...

Are all Haskell functors endofunctors?

I'm a bit confused, and need someone to set me straight. Lets outline my current understanding: Where E is an endofunctor, and A is some category: E : A -> A. Since all types and morphisms in Haskell are in the Hask category, is not any functor in Haskell also an endofunctor? F : Hask -> Hask. I have a good feeling that I'm wrong, a...

Any idea why Wordpress's inCategorgy tag is not working?

So I am trying to add a "-none" to a class for a post if it is in a specific category in Wordpress. So like lets say if I am viewing a post that has a category id of 7, i want a certain class titled "example" change to "example-none". Here's my code: <div class="example<?= is_category('events') ?'-none':'' ?><?= in_category('7') ?'...

App is on App Store but does not list in category

We have an app on the store that if searched for by name or company it appears and we can download it, in fact it is getting downloaded, but it does not list in its category? I have checked the iTunes Connect MetaData and it is in the category Education and is free, but if we list all free education apps it does not list. We also looke...

Wordpress: how to get first level of children from a category?

I want to know if has a function that return only the first level of subcategories children. Cat 1 Sub-1.1 Sub-1.2 Sub-1.2.1 Cat 2 Sub-2.1 Here I want only: Sub-1.1, Sub-1.2 and Sub-2.1 Cause using get_categories with child_of parameter brings me all children until the last node: get_categories('orderby=id&show_count...

Insert Description Text to Drupal User Registration Form

I am using the profile module and have several categories for different fields. I want to add a small bit of text to the top of one of the categories saying what the category is for. The information would be displayed when a new user registered. Basically I want to tell users to only fill out a category on certain conditions. Can anyone ...

Magento Layered Navigation Categories

I would like the user to be sent to the category landing page when the user clicks the category in layered navigation. So instead of the user getting /category.html?cat=11, they would get /category/RedWidget.html?cat=11 when they click the RedWidget category. I found this link, but his code doesn't work. Thanks ahead of time! ...

Android -- What happens when device is unlocked?

I am trying to understand the intents that get launched when the device is unlocked. For eg: Say my activity is running, and I press the power button (screen off, to lock the phone). INTENT.ACTION_SCREEN_OFF is launched. The activity is paused and the screen goes blank. Now, when I press the power button again (INTENT.SCREEN_ON gets ...

Category information of an Activity through ActivityInfo class

I was expecting to see Categories that a particular Activity belongs to in ActivityInfo class but I could not find any reference to Category in the ActivityInfo class. Anybody knows where Category information is maintained for an Activity? ...

Categorize applications

Hi, i would like to categorize applications. When an app comes to foreground i should be able to detect that this app has video,audio,just text, or 3D graphics. I tried using 2 options to categorize them: to get the permissions used in the apps, but couldn't get permissions for 3rd party apps(only the native apps), is it true that yo...

JQuery Autocomplete not working for catcomplete

Hi Guys, I am trying to use the catcomplete part of the JQuery Autocomplete but it is not working. I get this error Jquery Object # has no method 'catcomplete' Here is my code $('#searchForDelegate').catcomplete({ delay: 0, source: data }); I have checked the Jquery and there is no function for catcomplete. Any ideas ? Jus...

Magento: how to filter the result of Mage::getResourceModel('eav/entity_attribute_collection') by Category

I've used the follow code to get the whole list of manufacturer. $currentCategory = Mage::registry('current_category'); $product = Mage::getModel('catalog/product'); $attributes = Mage::getResourceModel('eav/entity_attribute_collection')->setEntityTypeFilter($product->getResource()->getTypeId())->addFieldToFilter('at...

wordpress - function to display posts from a category group by year

I work with a function (from a plugin) to display post from a category category group by year, but I can´t filter to category. I try add " $posts = query_posts($query_string . '&cat=3');" but I got all categories. How can I do it? The function: function favrik_recent_posts($args = '') { global $wp_locale, $wpdb; // params fun parse_st...

Broken Category/Tag Previous Entries/Next page links in Wordpress.

When I view the list of posts in one category the links for Previous Entries/Next Page are broken: Instead of: /blog/category/category-name/page/2/ I get: /blog/page/2/?category_name=category-name And that takes me to page/2/ of all my blog posts so page 2 of category-name is not accessible. I changed some code in my template but I cou...

wordpress category conditional on attachment page

How do I check the category on the image.php theme file in Wordpress? I tried in_category('categoryname') but it did not work. I want to use it outside of the loop. (Btw, the function also did not work inside of the loop...) I need this to show banners according to the categories of the post. I guess the problem is that the attachment i...

Log4j category weirdness

I've been having a frustrating time trying to sort out the logging in my project. In particular, one of the 3rd party libraries we use had one class, com.foo.bar.baz.java, that ignored any configuration in the properties file for the com.foo.bar package, instead following the application-wide properties. Eventually using %c in the p...

WordPress posts sorted by category and year

I've been on a long google search trying to find the solution to this... I am creating a cv manager theme using a WordPress install to control content. I have managed to organise all WP posts in categories but would also like to list those posts in year groupings. Currently I have this: <?php // Categories $cvm_cat_args = array...