Ultimate Warrior chapter 8

September 25th, 2006, 8:42 pm by Kayla

hey everyone,
kayla here. anyway chapter 8 is finally here. it may not have felt long for you but it did for me. well here ya go

del.icio.us:Ultimate Warrior chapter 8  digg:Ultimate Warrior chapter 8  furl:Ultimate Warrior chapter 8  reddit:Ultimate Warrior chapter 8

Yahoo! HackDay

September 24th, 2006, 10:34 pm by lig

For the lucky devils that can make it - check out what Rasmus posted to the general mailing list

For any of you folks in the Bay Area, don’t miss the open Hack Day at
Yahoo next Friday/Saturday. It is completely free and the density of
web experts will be higher than at most conferences.

More info on it at the following links:

http://yuiblog.com/blog/2006/09/22/yahoo-devday-schedule/
http://nate.koechley.com/blog/2006/09/22/hookytime-yahoo-developer-day-hack-day-on-sept-29th-and-30th/
http://del.icio.us/chadd/yhackday

I’m green with envy.

del.icio.us:Yahoo! HackDay  digg:Yahoo! HackDay  furl:Yahoo! HackDay  reddit:Yahoo! HackDay

MySQL User Defined Functions

September 23rd, 2006, 2:20 am by lig

MySQL User Defined Functions

Did you know you could make custom functions for use in your SQL queries? You could make an entire library of custom functions to work and manipulate your data on your database making them application and language independant. A few possible functions you could make -

  • Calculate an Employee’s Accumulated Vacation Time - maybe pass in the Employee ID and return the number of Hours they have in vacation time available.
  • Customer Address - Pass in the Customer ID or name and return their mailing address in a standardized format.
  • Account Balance - Pass in the Account number and return the Current Balance (assuming you have a table of debits and credits)

So now you would not have to worry about doing the calculations in the application - you can leave it to the database. Pretty Cool.

MySQL’s user defined function syntax is very similar to stored procedures and kinda self explainatory. Below is a simple example.

Example

mysql> CREATE FUNCTION isOdd(value INT) RETURNS TINYINT
    -> RETURN value%2;
Query OK, 0 rows affected (0.19 sec)

This is example of a user defined function simply tells us TRUE(1) or FALSE(0) if a number we pass to it is odd.

Create

mysql> CREATE FUNCTION isOdd(value INT) RETURNS TINYINT

This line states that we are going to create a user defined function by the name of isOdd. The function isOdd will take in an integer that we will call value, and return out a tinyint. Makes sense when we say it like that, but can you point to all the parts? As we said - it is similar to a stored procedure that you feel like you should know it - but syntatically different enough that you can trip and fall a couple of timesif you don’t pay attention.

Return

    -> RETURN value%2;
Query OK, 0 rows affected (0.19 sec)

Here is where we actually calculate what to return and then return that value, just like in a PHP user defined function.

Usage

mysql> select isOdd(13);
+-----------+
| isOdd(13) |
+-----------+
|         1 |
+-----------+
1 row in set (0.00 sec)

mysql> select isOdd(14);
+-----------+
| isOdd(14) |
+-----------+
|         0 |
+-----------+
1 row in set (0.00 sec)

Here we demonstrate how we can now use the newly created user defined function in a standard SQL statement. These SQL statements could have been sent from the developers application just like any other MySQL function. Again we made sure to do some basic testing of the function.

Right about now I guess I should note that this is a very simple example and that all the logical controls and looping functions that are available to stored procedures do work in stored user defined functions as well. You can make the functions as simple or complex as you need.

So there you have it. Now go - and create your own functions to use in MySQL.

del.icio.us:MySQL User Defined Functions  digg:MySQL User Defined Functions  furl:MySQL User Defined Functions  reddit:MySQL User Defined Functions

Google Cheatsheet

September 22nd, 2006, 2:41 am by lig

Cheat sheet to google services -
http://www.google.com/help/cheatsheet.html

del.icio.us:Google Cheatsheet  digg:Google Cheatsheet  furl:Google Cheatsheet  reddit:Google Cheatsheet

First week at the new job

September 15th, 2006, 10:53 am by lig

Well I’ve been at the new job for 1 week now and man is there a lot to learn. I have to admit though that it is areas that I really enjoy so I’m having fun.

The down side of it is that I have no time to do anything else. I’m kinda going through PHP people withdrawals since I don’t get the chance to do all that I normally do. I feel so out of the loop :) - no phpdeveloper, blogs, codewalkers, phpc… Aaahhhh!

del.icio.us:First week at the new job  digg:First week at the new job  furl:First week at the new job  reddit:First week at the new job

September 11th Rememberance

September 9th, 2006, 7:54 am by lig

It has been 5 years. In some ways it seems longer and yet - just yesterday. Unrelated to me but so personal. I did not know anyone who was killed or injured but I still become emotional and cry whenever I am reminded of it. As a native New Yorker, it was kinda like someone invading my house and destroying it. Makes no sense - but there you have it.

So where was I on Sept 11th? At my house in Florida. I had finished getting dressed/ready for the day but had some time before I had to go to work. So I was in front of the TV watching the Today show as I normally did - trying to catch up on the days news. They break the normal routine to say something had happened at the twin towers - cut to a camera shot of the towers and that was when the second plane hit the towers.

I can remember suddenly sitting down with my mouth open - in pure shock. Calling my husband to ask if he had heard what is going on. Calling my dad to see if anyone knew where my cousin was (he lives and worked in Manhatten.) And simply not being able to think very much. When the first tower went down, I didn’t realize it at first. To me it was inconceivable that the towers would fall. I remember the cloud of dust and wondering what the heck was going on. It took a minute or two for it to dawn on me.

After that I went directly to the blood bank to donate. There were about 10 people already in line in front of me (many more would come after - the line went around the block and still they came). So there is where I spent the remainder of the morning and much of the afternoon. Waiting in line, donating and trying to come to terms with it. I still am.

I haven’t yet been able to bring myself to watch any of the movies or TV shows on it. Nor been able to look at the skyline or visit ground zero. I’m sure I will one day, but not yet.

del.icio.us:September 11th Rememberance  digg:September 11th Rememberance  furl:September 11th Rememberance  reddit:September 11th Rememberance

Supreme Court To Hear Arguments On Software Patents And Open Source

September 6th, 2006, 6:39 am by lig

Supreme Court To Hear Arguments On Software Patents And Open Source - News by InformationWeek

del.icio.us:Supreme Court To Hear Arguments On Software Patents And Open Source   digg:Supreme Court To Hear Arguments On Software Patents And Open Source   furl:Supreme Court To Hear Arguments On Software Patents And Open Source   reddit:Supreme Court To Hear Arguments On Software Patents And Open Source

oldy but goody

September 6th, 2006, 3:29 am by lig

Life Lessons:

1. Life is not fair; get used to it.
2. The world won’t care about your self-esteem. The world will expect you to accomplish something before you feel good about yourself.
3. You will not make $40,000 a year right out of high school. You won’t be a vice president with a car phone, until you earn both.
4. If you think your teacher is tough, wait till you get a boss. He doesn’t have tenure.
5. Flipping burgers is not beneath your dignity. Your grandparents had a different word for burger flipping; they called it opportunity.
6. If you mess up, it’s not your parents’ fault, so don’t whine about your mistakes, learn from them.
7. Before you were born, your parents weren’t as boring as they are now. They got that way from paying your bills, cleaning your clothes and listening to you talk about how cool you are. So before you save the rain forest from the parasites of your parents’ generation, try “delousing” the closet in your own room.
8. Your school may have done away with winners and losers, but life has not. In some schools they have abolished failing grades; they’ll give you as many times as you want to get the right answer. This doesn’t bear the slightest resemblance to anything in real life.
9. Life is not divided into semesters. You don’t get summers off and very few employers are interested in helping you find yourself. Do that on your own time.
10. Television is not real life. In real life people actually have to leave the coffee shop and go to jobs.
11. Be nice to nerds. Chances are you’ll end up working for one.

del.icio.us:oldy but goody  digg:oldy but goody  furl:oldy but goody  reddit:oldy but goody

chapter 7 is up

September 2nd, 2006, 9:00 pm by Kayla

hey,
chapter 7 is here, so here you are sorry it took so long to write such a short chapter. i’ve been messing around and playing on the internet (you know teen stuff). any way i am open for comments.

del.icio.us:chapter 7 is up  digg:chapter 7 is up  furl:chapter 7 is up  reddit:chapter 7 is up