Archives for: March 2011
March 31st, 2011
First Week of Spring Quarter
Share
Tweet
Written by: joe hx
Published on March 31st, 2011 @ 01:44:13 pm , using 146 words, 1779 views
Yep. Spring Break’s been over for about a week now. Don’t know if I’ll be able to post much. I might be able to post some projects that I’m working on in various classes. So what classes am I taking? Well, my schedule pretty much looks like this:

This is where I go to school. It’s local.
All classes are Tuesday/Thursday:
- Dynamics
- Technical Communication
- Visual Basic (Easy! It’s a GPA-booster. Hell, I’m making this post from here.)
- Social Implications of Computing (a computer ethics writing class)
- Software Engineering
That’s 18 credit hours of pure fun. Oh, I found some cheap textbooks through Google Product search. Paid less than half for my books ![]()
On top of these classes, on Monday, Wednesday, and Friday I have both my internship (which pays decently) and I teach a computer lab at school. Yep, I’ll be busy. ![]()
Until next time
Joe
March 26th, 2011
Quick & Easy PHP Login Script
Share
Tweet
Written by: joe hx
Published on March 26th, 2011 @ 10:02:37 pm , using 250 words, 1109 views
Here’s a quick little PHP login script I wrote for my school club web page’s back-end. Feel free to use it yourself. I’d like a little credit though ![]()
Main code, put this before the <HTML> tag on your index.php or whatever main page you have:
PHP:
<?php | |
$error = false; | |
session_start(); | |
| |
if($_POST["user"]=="USER" && $_POST["password"] == "PASSWORD") | |
$_SESSION['login'] = true; | |
else if(!isset($_SESSION['login']) && isset($_SESSION['view'])) | |
$error = 'Wrong username and/or password!'; | |
| |
// Prevents the error message from being displayed the first time | |
// the user visits the web page. | |
$_SESSION['view'] = true; | |
| |
if($_POST["logout"]=="logout") | |
{ | |
$error = false; | |
session_destroy(); | |
} | |
| |
if(!isset($_SESSION['login'])) | |
require("login.php"); | |
else | |
$content = "Your page's content"; | |
> |
Contents of the login.php script:
PHP:
<?php | |
$content = ' | |
<form name="login" action="index.php" method="post"> | |
User name: | |
<input type="text" name="user" /> | |
<br /><br />Password: <input type="password" name="password" /> | |
<br /><br /><input type="submit" value="Login" /> | |
</form> | |
' | |
> |
In order to make the $error work, make your body tag look like this (requires javascript):
PHP:
<body <?php if($error!=false){echo 'onload="alert(\''.addslashes($error).'\')"';}?>> |
Put this somewhere in your index.php:
PHP:
<php $content> |
Let me know if it doesn’t work - I may have made a typo in the copy and pasting.
Until next time
Joe
March 22nd, 2011
Mafia and Charity: Japanese Mafia Helps Quake Victims
Share
Tweet
Written by: joe hx
Published on March 22nd, 2011 @ 10:25:29 pm , using 321 words, 1701 views
From The Daily Beast:
The worst of times sometimes brings out the best in people, even in Japan’s “losers” a.k.a. the Japanese mafia, the yakuza. Hours after the first shock waves hit, two of the largest crime groups went into action, opening their offices to those stranded in Tokyo, and shipping food, water, and blankets to the devastated areas in two-ton trucks and whatever vehicles they could get moving.
It’s not the first time the Japanese mafia has helped people in a crisis either:
To those not familiar with the yakuza, it may come as a shock to hear of their philanthropy, but this is not the first time that they have displayed a humanitarian impulse. In 1995, after the Kobe earthquake, the Yamaguchi-gumi was one of the most responsive forces on the ground, quickly getting supplies to the affected areas and distributing them to the local people.
The Japanese mafia aren’t the only criminals to do “good", either. Al Capone operated soup kitchens during the Great Depression - in fact, their invention is often (probably erroneously) contributed to him. According to Wikipedia, he was considered a “modern-day Robin Hood.”

Supposedly one of Al Capone’s Soup Kitchens
There’s been several times where the American Mafia cooperated with the US Government - during World War II to help keep New York free from saboteurs, several times in attempts to assassinate Fidel Castro, and even once in helping find bodies of murder victims.
Of course, there’s protection racketeering. That’s where you pay the Mafia to protect you and your business, normally from theft. The problem here, of course, is sometimes the mafia doesn’t do the protection, or the protection is from the mafia themselves.
None of this venerates what the mafia does in general. They kill people - so much in fact they where once labeled as “Murder, Inc.“
Well, I hope that post was worth reading…
Until next time
Joe
March 17th, 2011
Snakebot gets under your skin
Share
Tweet
Written by: joe hx
Published on March 17th, 2011 @ 10:59:56 pm , using 178 words, 1199 views
Yeah, this isn’t one of those awesome religion or political posts I promised yesterday, but at least it’s something…
American Engineers have built a robotic snake that could change the way heart surgery is performed.
CardioArm can assist surgeon’s procedures, slithering into places in the body too tight or dangerous for ordinary medical tools to enter.
Though it’s hardly comfortable, Snakebot is revolutionising the way heart surgery is performed, mitigating the need for open heart surgery.
Rather than having to crack open patients’ ribcage during heart surgery, this slippery little sucker buries itself deep inside your chest via a 2cm hole in your solar plexus and slithers around your organs.
The inventors of CardioArm say this technology has the potential to minimise the time it takes for patients to recover from heart surgery.
Dr Howie Chosets from the University of Cargenie Mellon in Pennsylvania told Discover magazine: “Instead of cracking open a person’s chest we can do a surgery and send patients home the next day.”
From www.news.com.au
Until next time
Joe
March 16th, 2011
Start of Spring Break 2011
Share
Tweet
Written by: joe hx
Published on March 16th, 2011 @ 10:55:57 pm , using 150 words, 1013 views
Technically Spring Break actually starts next week, but I’m pretty much done with school. I only had two exams - one was on Monday, the other was a take-home I did over the weekend. All I have left is to finish a paper for my Women’s Studies class. That’s the last gen-ed class I have to take.
Hopefully I’ll be able to post a bunch this next week and a half. I won’t be going anywhere since I don’t have any money (I have about $20 that has to last until the end of next week), plus I’ll be busy with my internship anyways.
So what will I post about? I’ve got some ideas on religion, politics, maybe some computer stuff. Might even create and update on my portfolio. We’ll see.
I guess I’ll finish with a question… What are you doing for Spring Break, if anything?
Until next time
Joe
March 8th, 2011
Monkey Tower Defense 4
Share
Tweet
Written by: joe hx
Published on March 8th, 2011 @ 06:37:07 pm , using 127 words, 1831 views
Ok, it’s been awhile since I posted, so I thought I’d just throw this up:
I found this game because somehow this game linked to my site. It’s cute and fun: basically, you have to keep these anti-monkey “bloons” (actually balloons) from getting through. So you put up various monkey defenses. I didn’t do really good in the youtube above. You should try it out though. Here’s the link.
This game belongs to the subgenre known as “Tower Defense,” part of the overall strategy genre. The company Com2uS actually holds the US trademark for the term Tower Defense, which is curious, since the genre is older than that company. Does anyone know what the first “Tower Defense” game was?
Until next time
Joe.

