10 WordPress plugins you should have

This time I would like to make a list of recommended WordPress plugins. They are alphabetically sorted and have many different purposes. The descriptions shown were taken right from the WordPress description. Here we go: 1. Comment Rating By Bob King Description: Allows visitors to rate comments in a Like vs. Dislike fashion with clickable images. Poorly-rated & highly-rated comments can be displayed differently. This plugin is simple and light-weight.

Coding An HTML 5 Layout From Scratch

HTML5 and CSS3 have just arrived (kinda), and with them a whole new battle for the ‘best markup’ trophy has begun. Truth to be told, all these technologies are mere tools waiting for a skilled developer to work on the right project. As developers we shouldn’t get into pointless discussions of which markup is the best. They all lead to nowhere. Rather, we must get a brand new ideology and modify our coding habits to keep the web accessible.

Redistribute your webpage contents to fit your browser width

Are you tired of dealing with different screen sizes for your web pages? Well, this information is for you. I will show you some CSS tricks to help you reorganize a webpage depending on your browser window width. We will start with a simple HTML 5 skeleton that includes a contents and a navigation section: <!DOCTYPE html> <html lang="en"> <head> <style> /* we will add our style here on the next step */ </style> </head> <body> <div role="main"> <h1>This is the contents</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.

An easy way to do a CSS Horizontal Menu

Here it is. Start with a conventional item list like the following: <ul class="hmenu"> <li><a href="">Option 1</a></li> <li><a href="">Option 2</a></li> <li><a href="">Option 3</a></li> <li><a href="">Option 4</a></li> <li><a href="">Option 5</a></li> </ul> Don’t forget to add the class parameter to the ul tag – that will help us do the magic. The previous list is rendered in a regular browser like the following: Now, add the following CSS to your file: .hmenu { margin: 0; padding: 0; list-style-type: none; list-style-image: none; } .

CSS – Attribute selectors

Attribute selectors allow you to select CSS elements based on their attributes or values. For example, if you want to select an image named “great.gif” you can do it by using the following rule: img[src="great.gif"] { border: 3px solid #000; } There are four types of selectors. By attribute. The following example will select all the images that contain the given attribute: img[title] { border: 3px solid #000; } img[width] { border: 3px solid #000; } img[alt] { border: 3px solid #000; } By value.

How to create a simple gradient in C#

Creating a simple gradient using two colors is very simple: Rectangle rect = new Rectangle(0, 0, 100, 100); LinearGradientBrush lgb = new LinearGradientBrush(rect, Color.White, Color.Blue, 90); e.Graphics.FillRectangle(lgb, rect); This code will generate a gradient in the given rectangle that goes from white to blue in a vertical way (see last parameter in constructor). In this case, e, is any class that encapsulates the System.Drawing.Graphics class. Once the gradient is ready, well, you have to actually draw it by calling the FillRectangle function.

Printing in C# – The easy way

Believe me, it is easy. As with any class, before we can use any of the Classes, Events and Objects available to us in the .Net Framework we need to import the Namespaces we need. For this we need 3 namespaces. VB.Net users only required 2 because VB.Net assumes the System Namespace, whereas C# isn’t so kind: System System.Drawing System.Drawing.Printing These 3 Namespaces contain everything we need for this class, so you will need to add the following lines to the top of your class file:

How to know if a hex color is light or dark

There is a simple way to know this. The following code takes white (#ffffff) divided it by two as our reference color. If the comparing color is lower than the reference color, then the given color is dark, otherwise it’s light color. function isLightOrDark($hexcolor) { return (hexdec($hexcolor) > 0xffffff/2) ? 'light color' : 'dark color'; }

How to choose a printer using C#

You can assign a printer and other settings by using the basic PrintDocument and PrintDialog controls properties. Look at the next example: if (printDialog.ShowDialog() == DialogResult.OK) { printDocument.PrinterSettings.PrinterName = printDialog.PrinterSettings.PrinterName; printDocument.PrinterSettings.Copies = printDialog.PrinterSettings.Copies; }

How to Move a WordPress Blog to a New Domain or Location

Before trying the queries in this page, I recommend you to read this full article to learn more about the process. To update WordPress options with the new blog location, use the following SQL command: UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guid field.