WordPress tip: Conditional tag for blog-related pages

Copy the function below and paste it into your functions.php file:

Once done, you can use the function to detect if you’re currently on a blog related page:

Thanks to Nathan for the tip! WpRecipes.com

Details

WordPress function to check if the current post is a custom post type

Simply paste this code into your functions.php file:

Once done, you can use the function as shown below. Please note that the function can be used outside the loop:

Thanks to Jonas Ethomsen for the function! WpRecipes.com

Details

WordPress SEO: Automatically remove short words from the URL

Paste the code below into your functions.php file. Once you saved the file, WordPress will automatically remove short (less than 3 characters) words from the generated permalink.

Thanks to Kevin Chard for this awesome piece of code! WpRecipes.com

Details

Read, Set, Go! How to Create a GO Board Game in Python

The board game of Go is so expressly Japanese – elegant, yet simple, yet layered with depths of genius for those who meditate upon it. The rules are simple, and well documented here.

Here is an example of a python program that will allow two human players to play against one another on one computer, providing an ascii display. In future posts we will be exploring how basic user-raw_input-dependent programs like this one can be improved through GUI programming and over-the-net communication – turning this one-computer ascii program into a graphical game you can play with your friend in Japan – or, if you’re already in Japan, with your friend in Jamaica (or, if you’re already in Jamaica, somewhere that is not Jamaica).

Details

Graphing Linear Inequalities with Python

Here is a practical example of the matplotlib.pyplot module in use. This code generates a list of linear inequalities, prints them in numbered groups (such as if you were to be creating worksheets for students), and then displays the graphs of each inequality in order. The code makes use of pyplot’s simple syntax and versatility to create it’s own shading.

Details

5 Best Java Applications for your Cell Phone

Not all of us want to invest in a slick new iPhone or a snazzy Android device that will burn a hole in your pocket. It’s not just about the money either, my reason to not opt for these devices is simple – I drop my keys and cell all the time and I just don’t want to check how the new iPhone reacts after a four feet fall on concrete. What I like most about my old Java-powered Nokia is its sturdy built and proven ability to withstand shocks of various kinds. There is of course a tradeoff, I cannot play Angry Birds or reach my friends free through WhatsApp, so I don’t even try. But that definitely does not mean that you Java phone is just a medium sized paper weight that you can use to make phone calls.

Details

Pros & Cons of PHP Programming

Commonly known as PHP, Hypertext Preprocessor is a programming language that is open source and easy to implement. Despite some differing views on the subject, it is a very simple programming tool that web developers can use to their advantage in creating functional and highly interactive websites. Today we are going to examine some of the advantages and disadvantages of php programming.

What makes PHP a popular programming tool?

PHP is widely used by web designers to create websites that have some aesthetic value and are very functional too.

Details

Python Script for Markov Chains

Consider the following problem in order to understand why we would need to create a Python Script for Markov Chains:
A certain attire-fickle girl changes her outfit every hour. Her opinion for what outfit she should wear is always dependant only upon the outfit she is currently wearing. When she is wearing a blue-based outfit, she has a 30% likelihood of remaining in a blue-based outfit, 20% likelihood of changing into a green outfit, and a 50% likelihood of changing into a red outfit. When she is in a green outfit, she has a 10% chance of changing into a blue outfit, a 10% chance of not changing, and an 80% chance of changing into a red outfit.

Details