Preserve Comments in MySQL Stored Procedures

Comments in any code are good practice and can help guide yourself and others through more complicated processes.

Single and multi-line comments can be included in MySQL stored procedures using the following syntax:

# a single-line comment

select 1;

/* a

When creating stored procedures for a MySQL database using a GUI, like MySQL Browser, any comments added are preserved (as you would expect). However, if you use the command line client you may have noticed that comments are stripped out. The command line client removes any comments before executing the script so comments are lost. Read More »

Posted in Programming | Tagged | 2 Comments

Make Input and Textarea Text Resize Correctly

To make text accessible and resize the solution is to use relative fonts:

body { font-size:medium; }

When text is resized through a browser all font sizes should change relatively. Unfortunately this does not apply to the <input> and <textarea> tags and so the text size does not change.

Fear not though, the simple solution is to simply set a percentage value to the input and textarea selectors:

input, textarea { font-size:100%; }

Now the text in the <input> and <textarea> tags should resize correctly.

Posted in Programming | Tagged | Leave a comment

Using Themed CSS Files Requires a Header Control

When using ASP.NET themes and you specify the global theme in web.config you can run into problems when you want to create a page that does not use the theme. Read More »

Posted in Programming | Tagged , | Leave a comment

List MySQL Stored Procedures

When using stored procedures with MySQL you may at some point want to get a list of all the stored procedures that exist in your database. Using the MySQL INFORMATION_SCHEMA  database and the ROUTINES table we can easily list information about procedures or functions. Read More »

Posted in Programming | Tagged | 1 Comment

ASP.NET Server-side Comments

When working with an ASP.NET page or control you many want to remove code temporarily or stop some code executing while debugging. This can be achieved easily using the server-side comment opening, <%--, and closing tag, --%>.

Read More »

Posted in Programming | Tagged | Leave a comment

Easily Resize Multiple Images Using Windows XP

It can take a long time to upload images to a website or send an email with lots of images attached. To save time uploading files it is a good idea to resize images first on your computer and then upload or attach the smaller files. Bigger websites like Facebook and Flickr will do this for you on your computer without you really knowing but in other cases you will need to resize the files first yourself. Read More »

Posted in Tutorials | Tagged | Leave a comment

Backup WordPress Database and Files

A WordPress website consists of two main parts:

  1. Database – stores all of your website content including posts, comments, links and website settings (but not physical files like images uploaded).
  2. Files – where the code is stored to access the database and make everything work. Themes, plugins and user generated files (images uploaded) are all stored together in the wp-content folder.

Backing up just the database will mean you do not have a backup of images and files uploaded which are usually very important to a website.  So for a reliable backup of your WordPress website you need to backup the database and files. Read More »

Posted in Programming | Tagged | Leave a comment

Flattering Spam Comments

Spam is always going to be a problem when running a blog and it seems the spammers have taken a friendlier tack of late. We keep getting lots of flattering comments that are unfortunately too good to be true! Read More »

Posted in Everything Else | Tagged | Leave a comment

A Potentially Dangerous Request.Form Value Was Detected

ASP.NET automatically checks for HTML being sent by GET or POST requests as a security precaution and throws the following nasty error if it finds any: Read More »

Posted in Programming | Tagged , | Leave a comment

Connecting to MySQL Server Across a Local Windows Network

To access MySQL Server over a local Windows network you will need to open up the port that MySQL is using and also grant privileges for the user that will access the database server.

Read More »

Posted in Programming | Tagged , | Comments closed