March 30, 2008

Best 404 Page EVER!

I was working on the AMS 404 page to make things more user friendly and also add some security, and ended up I stumbling upon this. Needless to say I was very amused.

Depressed Server 404

March 26, 2008

Interesting webcomic


It is not often I find a good web-comic that relates to my major. (Thanks Norman!) xkcd is one of the better ones I have seen, with the topics ranging from programing to zeppelins to the inappropriate. The image above is the comics map of online communities, which is awesome. Some other favorites include Useless (mathematics can't explain love), Compiling, Exploits of a Mom, A Minus Minus (Very Funny) and IN UR REALITY (i can has cheeseburger). However there are many more, just be careful it has already caused a massive amount of procrastination... You have been warned!

March 23, 2008

Happy Easter

Well easter has come once again, which means...

1. Lent is over!
2. Going to eat a lot of candy!
3. The beard is gone!
4. Spring changes for the blog.

I watched my cousins hunt for easter eggs, which we all colored yesterday, and this got me thinking. Easter eggs are not only in the real world. A quick search for easter egg reminded that there are a lot of computer ones to find. So happy hunting... EggHeaven

March 21, 2008

Laser + Moon = Fake

While on vacation a relative of mine was some what excited about a certain beer company and their viral advertising. Apparently they claim that on the 21 (Full Moon) they will be shooting a laser projector at the moon and displaying their logo. I am not very convinced. Also I will not mention the company, because I do not drink beer, nor am I going to support their fake sounding viral advertising campaign.

First of all I had not even heard of this stunt, which most of the gadget blogs that I read would have had this covered. The shooting down of the satellite is a good example. Also there where some other things that just did not add up, after doing some research I came up with some interesting facts that seem to say that this is fake.

It is not unheard of to shoot a laser at the moon, it is how we get a actuate distance, however...
"They beam the laser out through a large (5 meter class) telescope, and look for the reflection in that same telescope. By sending the beam out through the telescope, you get a much tighter beam than you would from just the raw laser, and the large telescope gathers 700 thousand times as much light as your eyeball would, making it much easier to see the reflection. (5 m vs. 6 mm squared = 700,000. A fully dilated human pupil is about 6 mm IIRC.) <-Full Page" That alone makes this impossible, however what makes it worse is that they chose a full moon. Looks great, but the laser would not be nearly powerful enough to be visible over the raw sunlight bouncing off. A new moon would be much more realistic.

Oh well, I will be looking up to see if there is something on the moon, but I highly doubt that I will see anything. I guess they could still try, at least then it would not be fake, just an example of poorly thought out design,

UPDATE: After seeing nothing last night, and looking online it looks like this was indeed fake. "The Boston Globe assures us this is a hoax. From the short article: To repeat: This is viral advertising; the company isn't actually going to project a laser beam 237,000 miles into space."

There you have it, a good example of poor and arguably FALSE advertising.

March 17, 2008

Ph34r the Gr33n





I have always loved the look of clovers, sitting in the grass during summer it is hard to miss them, so I was happy this morning to see google had them on the banner in honor of St Patrick's Day. Although I was not taking part in the alcoholic side of the holiday I was definitely wearing green today. Note: my favorite color is green.

Happy St Patrick's Day Everyone

March 16, 2008

School and Sleep Don't Mix

Recently I over heard someone saying that they rarely get 8 hours of sleep, which got me thinking that I also rarely get 8 hours as well. Normally sleep is around 11:45PM to 6:45AM so on average about 7 hours, which is not bad, but still leaves me tired in the morning, daylight savings did not help either. Luckily for me I do not have heavy physical activity in my daily schedule which helps reduce my sleep needs. Sitting in class, sitting at work, sitting at lunch, sitting doing homework and sitting in bed. Recently I have come to notice school does not help you stay physically fit, luckily going to school near mountains fixes that. Oh well, such is the life of a college student.

6 Hours and I am Sleepy
7 Hours if I am Lucky
8 Hours and I am Spoiled
9+ Hours and I am lazy.

I did a little research about why eight hours are recommended, because we always hear it, but why is it eight?
"Before the experiment began, the subject routinely got about six and a half hours of sleep. During the first night of the experiment he slept eight hours, the second night 10 hours, the third night 12 hours, and the fourth night 14 hours. Over the next several days, he began to reduce the number of hours slept, eventually falling to a steady eight hours and 13 minutes. This experiment was performed repeatedly with all types of people, with similar results, and this is where the recommendation of eight hours comes from."
Taken From Here...

There you have it, that is why they recommend eight hours of sleep, well I found it interesting at least.

March 9, 2008

PHP Thmbnail Function

I had whipped up a online photo album for the AMS website I am working on, however after photos where uploaded I realized that I was not using thumbnails, but instead the huge pictures, which on dial up would take years to load a large album. So I went looking for a good thumbnail function, sadly all the ones I found where way to complex for what I was trying to do. With no other options, I did some research and studied how the other functions worked an came up with my own simple version.


function makeThumb($im,$dest,$thumbwidth,$thumbheight)
{
$resizeResult = TRUE;
$imgResult = TRUE;

list($width, $height) = getimagesize($im);
$exttype = exif_imagetype($im);

$tim = ImageCreateTrueColor($thumbwidth,$thumbheight);

if($exttype == IMAGETYPE_GIF)
{
$image = imagecreatefromgif($im);
imagealphablending($tim, FALSE);
imagesavealpha($tim, TRUE);
$resizeResult = imagecopyresampled($tim, $image, 0, 0, 0, 0, $thumbwidth, $thumbheight, $width, $height);
//header('Content-type: image/gif');
$imgResult = imagegif($tim,$dest);
}
else if($exttype == IMAGETYPE_JPEG)
{
$image = imagecreatefromjpeg($im);
$resizeResult = imagecopyresampled($tim, $image, 0, 0, 0, 0, $thumbwidth, $thumbheight, $width, $height);
//header('Content-type: image/jpeg');
$imgResult = imagejpeg($tim,$dest);
}
else if($exttype == IMAGETYPE_PNG)
{
$image = imagecreatefrompng($im);
imagealphablending($tim, FALSE);
imagesavealpha($tim, TRUE);
$resizeResult = imagecopyresampled($tim, $image, 0, 0, 0, 0, $thumbwidth, $thumbheight, $width, $height);
//header('Content-type: image/png');
$imgResult = imagepng($tim,$dest);
}

if($resizeResult != TRUE || $imgResult != TRUE){ return FALSE; } else return TRUE;
}


To use just call makeThumb("Location of Image", "Place to put thumbnail", width, height); Very simple, also it will return false if something fails inside. Remember to make sure the directory it is writing to has the permission to write set correctly or it will always fail.

March 7, 2008

Next Year's Apartment

Well that time has come again, the stressful period of choosing next years living space. I have gone from two person dorm room, to a quad apartment, to a multi floor quad apartment, however because two of my friends are graduating, I have to look for another place again. My roommate and I though that a two person apartment might be nice, however it is not quite that easy...

To get a two person apartment you need to sign up for the draw, which only has apartments that people are moving out from, thus a small number, where as there are a lot of people who covet these sweet living spaces. I got to the apartment draw and dealt with the paperwork, and had to sit and wait for them to start. There must have been around 30-40 sets of people looking for a two person apartment, where as there where only 10 apartments up for grabs. The order of people who get to chose one is based on our ranking numbers (age, year, credits and grade) Luckily for me I got to choose second! (Take that youngsters ^_^).



So I chose an apartment, which our resident director of the student apartments said was her favorite, I figure it must be good. Here comes the intresting part... I walk by the place and from what I can tell by the windows it looks like it had cathedral ceilings, the living room window had another window on top that was a triangle against the sloping roof, which made me very happy. However later that night I could see there was light downstairs but not upstairs? Hold on, so there is some kind of random painted and finished loft/attic with what looks like a door above the apartment, that does not appear on any plans. Um, what? Now I am interested, if I can find a way into this space, like the Attic access panel in our current apartment I will be very happy, it could even mean my own room!

Well this is all speculation for now, but it looks like next year will be very interesting indeed.

March 1, 2008

iBook Photo Frame



After fixing an iBook, my next plan was to change it into a digital picture frame. This is something that many people have done with every old laptop you can imagine. So I took the stripped down iBook, and completely disassembled the lcd screen, down to just the panel, and took some measurements for a frame. The closest frame I could find to the screen size is a 8.5 x 11 inch with a nice looking border. The screen fit well in this, but it would need a bit more room to fit the rest of the iBook. So a box that fits inside the frame was made and attached with screws to the sides. Small wood dividers hold the lcd in place, while adding some space for air flow. I also cut out the holes for various connections, air vents and for the optical drive. It all just perfectly fits snugly inside. The back cover is attached to the sides of the box by small blocks of wood, and puts some pressure on everything below it with. All it needs a quick paint job, probably black to match, but that is for another weekend.

The end result looks amazing. Another successful project, completed!