definition

MySQL Error 1293 - Incorrect table definition (TIMESTAMP)

MySQL Error 1293 FAQ: Help, I'm getting a MySQL incorrect table definition error message related to a TIMESTAMP column. How do I get past it?

If you ever get this MySQL Error 1293 (like I just did):

ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

fear not, it may not be too bad. Let's take a look.

Ruby - How to sort an array of objects by one field

Sorting an array of objects by one column in the object (class) is pretty simple with Ruby. Here's a quick demo of how I just did this when working on sorting the rows in a CSV file in a simple Ruby script.

Define the class

Step 1 in this is defining my class. So, here's the definition of my Ruby Person class:

How to use Struct to simplify your Ruby class definitions

Many times when I'm creating a prototype of an application with Ruby I'll create my classes using a simple Struct technique I learned from a friend. This technique of using the Struct class makes my code shorter, and is at least as readable as writing a class out using any other method.

Defining the Web 2.0 Look and Feel

I've been working on revamping my website about Alaska, OneMansAlaska.com, and in the process I was debating whether or not I wanted this site to have what I considered to be the "Web 2.0 Look & Feel". Just at that time I started wondering, "What is the Web 2.0 Look and Feel?", and I was wondering how I would define it.

Syndicate content