The Class Object

Every class in Java inherits from the class Object, whether direcly or in-directly. The class provides a set of basic behaviours to all objects but no basic state - there are no variables declared in the Object class.

Constructor

Object()

Methods

Object clone() Creates and returns a copy of this object

boolean equals(Object obj) Indicates whether some other object is "equal to" this one.

Bijou

Well here we go then, a new site. Not quite how I want it yet, it's not doing everything I need and I haven't got the feed, email or user stuff set up properly yet, but I thought I would get it up and running so you can see what I've been up to. If you have any problems your easiest port of call at the moment is my messenger account (see the site footer for details).

Drupal Customisation

* This post is yet to be finished *

You may, or may not, know that I like to "tweak" things. I often find, particalarly with web type stuff, that what's available to me doesn't quite meet my needs, so I fiddle with things until they do. The changes I make wouldn't necessarily suit everyone, it's almost impossible to write something that would, and they don't necessarily follow the same thread as that set out by the original author, but they work for me and I figure as long as I don't break anything (that I can't fix) it's ok for me to continue along this track.

To OO or not to OO that is the question

I now have a reasonable implementation of my fault logger working. It's missing some key elements on the admin side of things, user management for example, but as a fault logger it, well, works.

Since I began the project I have learnt a lot more about php. My grasp of some of the basic concepts have evolved, my use of MYSQL is more ordered and I have delved into the world of classes and object oriented php.

$_SESSION variables and missing Objects

I while ago I wrote a fairly complex script that required user interaction at several points and eventually feeding the results into several csv files. To accomplish this I was having to store objects in session variables and then retrieve them when needed. All was going well, the script was working as far as running but when the csv files were opened they contained nothing but php errors complaining about not being able to access the objects functions. Not good, especially as this particular piece of code was needed the following day.

Re-configuring PHP with GD support

I've just astonished myself by managing to re-configure php without breaking anything (that I've found yet...). However, since I know from past experience that things don't usually go this well I figured here would be a good place to leave myself some instructions for next time. Maybe they will also help you, or maybe you know of a better way.

The aim:

To re-configure php with gd support so I can use the image capabilities of Drupal.

First:

Download gd from http://www.boutell.com/gd/

Unzip (gunzip filename)

An infuriating error

Due to many things the fault logger had sat around for a while without any work. Until this weekend that is, when it was dusted off, loaded up... and broken?

Most of it was working, it was obviously talking to the database ok, all the SELECT statements were working, but, when it came to inserting data (a rather useful function in a fault logger!) nothing was happening. No error. Nothing.

Much head scratching ensued, including by someone who actually knew what he was talking about. We tested everything we could think of, to no avail. It needed to be slept on.

Problem with INSERT and auto_increment

Problem:

Unable to INSERT into a table with an auto_incrementing id column.

Error:

When using phpmyadmin to insert directly the error "#1264 - Out of range value adjusted for column 'columnName' at row 1" is given (or similar)

Cause:

Seems to be a "bug" in MYSQL V5 where "strict mode" has been enabled by default and isn't allowing the insertion of a blank value.

Solution:

Comment out line 87 of your my.ini file (in windows found in programme files->mysql)

Further Comments:

A Little About M360

M360, or to give it it's full title - Developing Internet Applications - is a 30 point level 3 course.

The course, as you would expect, focuses on the development of Internet applications but in doing so touches on a number of key subjects including security, XML, serverside and client side scripting amongst others (I will be a better position to tell you about these when I've finished!).

The language focused on in the course is that of Java and it is largely a follow on course from M301 which I studied last year.

Flannels, Cups and a Bird Bath

Don't ask.

Super busy busy week. It began with the recipe book which after a few minor panics and some late nights did eventually reach completion. What did we learn from this little escapade? Number 1. The word No really isn't that hard to say, I should try it sometime. Number 2. If you want something doing, do it yourself. Never again (she says until somebody asks).

Pages

Subscribe to BinksUK RSS