May Day Riot
November 24th, 2006I’ve done the editing and post production on this video for aganovich.com, have a look courtesy of youTube.
I’ve done the editing and post production on this video for aganovich.com, have a look courtesy of youTube.
Linehan’s Design, a site for the kitchen and furniture designers and manufacturers in Ireland has just been launched. The site combines some slick flash with javascript from script.aculo.us.
Have a look here:
http://www.linehansdesign.com
The It’s your choice! site has been completely overhauled, with extensive backend and front end changes. The aim of the site from a design and development point of view is to enable a simple pathway to getting or giving information.
I’ve achieved this by having a punchy graphical homepage with the importance of each section being denoted by its positioning and colouration. The rest of the site has a simple and elegant format, whose primary aim is to enable the delivery of information.
The “sharing information” area and “directory” both use a custom php / mysql CMS systems. The “sharing information” area enables an administrator to create and edit questionnaires, and gives a great degree of freedom in their structure. There is also a facility for testing questionnionaires without making them live. The information from the questionnaires is automatically outputted graphically in the get information area as bar graphs and pie charts. The graphs are produced using the live database and jpgraph to produce png graph images. The give information area uses a session based log in system to store each users information and keep it secure.
Just getting to grips with the ajax side of things.
And finally its gradually dawning on me how rails actually works. Running a server on your home pc (mac in my case, still a pc in the strictest sense though isn’t it) really lets you know whats going on. The terminal you use to start up the ruby server spits out all the information you need about everythin you do. Everything seems so transparent it becomes very easy to see whats going on - and consequently things become easy to fix.
Today i’ve worked out a rails website works as one application - and you need to start up the server for that application. So a folder called ‘mysite’ will contain all the files for that rails app - then you start up the ruby server for that application - ie “ruby server/script” when you’re in that folder.
Making ajax seems to be too easy to be true. Infact follow this tutorial here for ajax on rails and you’ll see its no harder to use ajax than not to use it.
just followed this tutorial:
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html
I have to say that Ruby on Rails is astounding. I’ve already watched the videos at www.rubyonrails.org - but its impossible to see how cool the thing is without trying it. Just by typing a few lines you get Rails making the whole thing for you. All thats left is to make it look good.
This is definately a way forward for me - next up - i might have something nice for you to see.
Right i’ve just installed Ruby, Rails, LightTPD, and MySQL on Tiger. I’ve got a feeling that going the Ruby on Rails way - might be a lot more fun than just using the php, mySQL option.
To install it go to rubyonrails.org, or if you use a mac - look here.
I’ll try some tutorials and let you know.
bits of the code here are taken from php.net
to check the date in php you can use a function called checkdate() but to get it working in a clever way with a form use the function below
< ?php
/**
* Checks for a valid date
*
* @param string Date in the format given by the format parameter.
* @param integer Disallow years more than $yearepsilon from now (in future as well as in past)
* @param string Formatting string. Has to be one of 'dmy', 'dym', 'mdy', 'myd', 'ydm' or 'ymd'. (Default is 'ymd' for ISO 8601 compability)
* @return array [ year, month, day ]
* @since 1.0
*/function datecheck($date, $yearepsilon=200, $format='dmy') {
$date=str_replace("/", "-", $date);
$format = strtolower($format);
if (count($datebits=explode('-',$date))!=3) return false;
$year = intval($datebits[strpos($format, 'y')]);
$month = intval($datebits[strpos($format, 'm')]);
$day = intval($datebits[strpos($format, 'd')]);if ((abs($year-date('Y'))>$yearepsilon) || // year outside given range
($month<1) || ($month>12) || ($day<1) ||
(($month==2) && ($day>28+(!($year%4))-(!($year%100))+(!($year%400)))) ||
($day>30+(($month>7)^($month&1)))) return false; // date out of rangereturn checkdate($month,$day,$year );
}?>
this will check the variable $date.
First of all it replaces any ‘/’ symbols with ‘-’.
Using the specified format ($format) it checks to see you have 3 bits (day ,month, year).
Using the range of dates ($yearepsilon) it checks that the date is in range.
Then php’s checkdate function is used - this checks to see whether that date actuall did, or could exist.Only if everything matches will the function return true - otherwise it will return false
The checkdate function is pretty smart - it knows every day of every year between 1 and 32767 inclusive. For instance if 29/2/2000 were entered (using the day, month, year format) checkdate would return true as 2000 was a leapyear.
Using the function:
If you had a field with the name ‘date’ in your form you could set an error variable if the date was invalid, then use that error variable tell the user they’d made a mistake.
< ?php
if (datecheck($_POST['date']) == false){
$error = 1;
}
else { echo "the date is fine";}?>
The text below has been copied verbatim from the amazon.com review section for ACDC’s Back in Black - I particularly like the end sentence - the bit Amazon adds for you. I think it was in some way.
“Ten songs, three chords, smack-some-ass rock n’ roll, August 6, 1998
Reviewer: Rodems@aol.com (Tampa, Florida) - See all my reviews
AC-DC was in disarray when this album came out: The previous lead singer had died of alcohol poisoning. Most said the band’s best music had been played. Nobody expected much.
This album was a monster. Considering the tired and irritatingly “artistic” sound of the Who and Led Zeppelin, Back in Black kicked ass. Listening to this album made you want to grab a stick and break something.
The opening riff of “Shoot to Thrill” can cause carpal tunnel syndrome trying to crank up the volume.
“Given the Dog a Bone” was a nightmare for English teachers and feminists, alike. Arguably, if the act was completed, then the verb tense of the title was proper.
Many complained that the title song was evil and anti-religious, that it was a poster child for reincarnation, that Brian Johnson was really Bon Scott, rising from the dead. Those people are now probably listening to Curt Cobain, and crying, while drinking cafe mocha.
Others com! plained that the music was just simple. So damn what. Ten songs, three chord guitar, screaming vocals. No “rock opera,” no social messages, just drink, smoke, and screw.
Isn’t that the way it’s supposed to be?
Was this review helpful to you?”

my housemate’s just bought a scooter - gets delivered in may
looks like it might be fun

I’ve just bought a Nokia N70 - well when i say bought i mean i got a bargain contract from e2save.com - check em out. The reason i got this phone is that i want to get more involved with mobile blogging, plus the camera is great.
My first problem was that Apple’s iSync doesn’t recognise the phone and of course Nokia ignores mac users. Theres loads of info on the web on how to get iSync working with the N70, just google “N70 iSync” but i’m fairly sure that Apple has done something in version 10.4.5 that stops this working so well (or it could be something to do with my setup).
Anyway - I gave £2.99 to the writer of The Dogs Blogs and she sent me the files i needed to get it syncing straight away. I’d actually been trying exactly the method she gave me, but it didn’t work. The solution is in the MetaClasses.plist file, which you’ll come across if you google for it, but only Andrea’s Dogs Blogs solution worked for me.
4 hours of frustration solved in 1 minute, well worth the price of a pint I think.