INSTALL_FAILED_DUPLICATE_PERMISSION… C2D_MESSAGE

I am using Google notifications in my app, and until now I have done below in the manifest: <!– GCM –> <uses-permission android:name=”android.permission.GET_ACCOUNTS” /> <!– GCM requires a Google account. –> <uses-permission android:name=”android.permission.WAKE_LOCK” /> <!– Keeps the processor from sleeping when a message is received. –> <uses-permission android:name=”com.google.android.c2dm.permission.RECEIVE” /> <!– This app has permission to … Read more

how to use javascript Object.defineProperty

I looked around for how to use the Object.defineProperty method, but couldn’t find anything decent. Someone gave me this snippet of code: Object.defineProperty(player, “health”, { get: function () { return 10 + ( player.level * 15 ); } }) But I don’t understand it. Mainly, the get is what I can’t get (pun intended). How … Read more

Query for multiple post types does not work

I’d like my frontpage to display a list of my lastest blog posts merged with my latest “Products” custom post type posts. From the documentation i gather this should work: query_posts( array(‘post_type’ => array(‘post’, ‘product’) ) ); while (have_posts()) : the_post(); the_title(); the_excerpt(); endwhile; But that turns a weird list, made of pages ! Note … Read more

Call to undefined function issue

I know there are other, maybe better ways to do what I want to achieve, but I have to use this solution. I have two stylesheets: style.css – normal stylesheet style-dynamic.php – dynamic stylesheet linked to the first one I’m using some PHP code in the second one, like: #body { background-color: <?php echo get_option(‘theme_background’); … Read more