wii flash integration

code :: using the wiimote with as3

as i have been checking out the new features of actionscript 3 and flex, i stumbled upon fwiidom.org. this site is run by joa ebert + thibault imbert, and their mission is full flash wiimote integration. 

currently wiiflash supports multiple wiimotes and nunchuks, the classic controller, as well as pc sensor bars. all you need is a bluetooth enabled pc (or adaptor) and a wiimote.

the newest version is available from wiiflash or googlecode or you could get on the mailing list

art floria

random :: african violets

african violets

what a beautiful summer it has been so far. my mom has been able to grow foreign flowers that she could have never dreamed about this year. a prime example were these gorgeous african violets. they bud as little pink balls, then they slowly open up into amazing little purple flowers.

pure php email validation

code :: using regular expressions

<?php
$email = 'someone@somewhere.com';
if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
    //invalid email
} else {
    //valid email
}
?>

SQL get last ID

code :: mssql and mysql

here's a simple SQL script that returns the last row created. this is great for when you add a new record that has an autogenerated id and you need that number.

mssql

CREATE PROCEDURE [dbo].[getLastLogin]
AS
SELECT TOP 1 *
FROM dbo.login
ORDER BY id DESC
GO

mysql

SELECT * FROM `login` 
ORDER BY `id` DESC
LIMIT 1,1;

graphic reset buttons

code :: w/o javascript

i was having some trouble at work creating form buttons with graphics for reset buttons. i just thought someone might be interested in my non-javascript solution:

<button style="background: none; border: none;">
<img src="reset.jpg" alt="" />
</button>