As one of my audience so nicely pointed out we have a text run-over problem. These are generally easy to fix, I tend to use a three prong approach. For me I felt 30 characters was a good length.
First run
ALTER TABLE `chatbox` CHANGE `message` `message` VARCHAR( 30 )
This will fix it at the database level, but we don’t want it to even get that far so next we change the maxlength of the input. (more…)
Pentago is a great strategy game and certainly fun to play. Basically it’s played on a 6×6 grid that is made up of 4 3×3 quadrants that can rotate once after each turn. The idea behind the game is to get five marbles in a row. Building an interface should be fun but for those just interested in the algorithm to determine a win state for Pentago in php.
(more…)
I tend to post regularly on some forums around the area and today I saw a fun little question, how to test for palindromes. If you aren’t familiar with Palindromes they come from biology DNA sequences that are complimentary. However most people know them as words that read the same forward and backwords like “straw warts” or “santa at nas”. I took about 5 minutes and wrote this nice little bit of code available below.
Palindrome Test
(more…)
Hello all. When I released PHP AJAX chat I knew that there was a problem with a few of the build of Firefox that didn’t like having SetTimeouts() outside of functions and requestobjects opening without full parameters. Well I have now fixed that and here is the patch. To install the patch do the following.
- Open up index.php oh php ajax chat archive
- find where this line is <script type=”text/javascript”> in mine it’s around line 33 and also find the end </script> which is around line 99.
- Hilight this area and replace it with the following code (more…)