Posted by & filed under Programming.

Looking at the PHP documentation, it is not clear how to add multiple values for the same case in a switch construct. It seems that you should be able to do

case ("whatever" || "something"):
//Do something;
break;

But, you can’t. I tried, and it didn’t work. Fortunately, after much searching, I found a way to do it; and it’s not near as difficult as I was making it. Read more »

Posted by & filed under News.

An asteroid has been rated as a level four threat to the Earth on a scale out of 10. This marks the first time that an asteroid has been rated higher than 1. Currently, there is a 1 in 45 chance that this asteroid will collide with the Earth on Friday, April 13th, 2029. Read more »

Posted by & filed under Internet, Programming.

If you have a online presence, whether it’s personal or business, you most likely are looking for input back from your visitors. But, be careful if you put your email address in a simple mailto: link. You will get spam, accept it.

But, there are a few tricks you can use to limit the spam you get. Read more »

Posted by & filed under Blogging, Programming.

Since several of my posts have source code in them, I needed a way to syntax highlight. I found a pretty good one for PHP code, but it didn’t do anything else.

While working on an article for a JavaScript function, I needed a highlighter. So, out searching I went. Read more »

Posted by & filed under Programming.

While working on a web application, I found myself with the need for a Javascript function that would format dates to a consistent state. Several different functions exist out on the internet to perform this task, but none were exactly what I was looking for. Most of them did a fairly decent job of taking a time like ‘6:45′ and plugging the am or pm onto the end. Some even allowed military time so ’20:30’ would convert to ‘8:30 pm’. What I really needed was one that could format a time entered in a normal fashion, but also format if I enter a time like ‘0645’ or ‘2315’. So, I wrote my own. Read more »