29th November 2008, 07:43 pm
Christmas is approaching fast and you probably still have some gifts to buy. Kmart makes it easy to get the gifts you want without blowing your budget. With over 25,000 gifts priced at $25 or less you’re bound to find something for everyone. There is a wide assortment of video games for under $25 for any system your friends and family may have.
One of the fun things to do with the family when everyone is together for the holidays is to play board games. Kmart has a large selection of games under $25. Hungry Hungry Hippos is a great classic game that’s only $16.99. Little kids love to slam down on the hippos to try to grab as many marbles as they can. The older kids will have a lot of fun with Monopoly; the game that can be as friendly or conniving as you want. The classic edition is only $11.99.
Mom is always working hard and could use something to help relax. The HoMedics Atom Massager is a great little gadget for only $8.99 that will help massage those aches and pains away.
Handyman Dad could really use some new tools. That knife of his is probably getting dull with all the use it has gotten over the years. For only $19.99 he could have a brand new Leatherman Micra Multi-Tool. It contains a nice sharp knife for cutting, spring action scissors and other personal care tools.
Kmart makes it easy to shop for everyone in the family and for your friends without having to spend a lot of money. With layaway and no interest, no payment financing for 6 months it’s even easier to shop this Christmas.


26th November 2008, 10:32 am
Before you get engaged you need to plan. Not just for how you’re going to live your lives together but also what ring you’re going to get her. I realize that you probably have no idea when you’re going to get married but I’m pretty sure you expect to some day. So you should be saving up for that ring well in advance. Maybe even before you meet the girl you end up marrying. When you get to the store you don’t want to be looking at price tags. You want to be looking at the smile on her face as she’s looking for the perfect ring; a ring that will hold its value and its sparkle for a lifetime.
Platinum is a harder metal than gold which means it will hold onto that diamond more securely. You don’t want to lose that diamond because the ring lost its hold. Gold quickly loses its luster with everyday wear. Platinum retains its brilliant white luster. Because Platinum is far more rare than gold it is also more valuable than gold.
A platinum engagemet ring will make your ring even more unique. Not everyone had to foresight to save up and invest in a quality platinum ring for the woman of their dreams. But now that you know the value of platinum you can.

23rd November 2008, 11:06 pm
Back in the early to mid 1990’s I decided to create a racing game called “Hyperspeed.”

You can actually download it from here although I’m not sure how functional it is. There was nothing fancy to it. There were three track pieces: straight, left and right. Shifting shades of gray were used to simulate movement. It was written in BASIC.
After mucking around with Bunnies for quite awhile now (going on 5 years) I’ve decided to take a stab at bringing “Hyperspeed” back to life in the form of a Super Mario Kart clone. I was expecting it to be complex. Turns out that the techniques used to create Super Mario Kart are 100% identical to Bunnies minus the walls. So actually, it’s easier.

I originally created a new code branch for Hyperspeed but have now compiled a number of pieces into libraries in a “common” folder. Bunnies has been modified to use the new common code. Hyperspeed has been linked up with the Bunnies server. Earlier I had added a feature to the Bunnies website where you could upload a large image, break it into tiles and auto generate the floor of a map from it. Well, that’s why.
The floor is just the first step. Racing games like Super Mario Kart also need a collision map and way points. After playing Tower Defense for awhile and seeing some sample code I realized that you can simply use way-points like in Tower Defense to create racing AI and ensure that the player is going the right direction and not cheating.
A collision map is simply a gray-scale image that indicates whether a position within a tile slows the player down and by how much or if it stops the player entirely.
Currently you have to apply bump and depth maps one tile at a time. I’ll be adding a feature to allow collision maps and make it possible to apply them all to an entire image. There’s a very good chance that the maximum file dimensions will be going up. 2048×2048 works but I’d like to allow higher resolutions. 2048 gets you about 64 pixels per floor tile. I’d like to at least double that. The limit on the site is rather arbitrary. I could just remove the restriction.
Hyperspeed will probably not be released for at least a month. There’s a lot of work to be done to make it a game. In the mean time there’s a new release of Bunnies and an updated game server which fixed a few major bugs. Part of this project is to demonstrate the versatility of the Bunnies game engine and web-site. Once Hyperspeed is ready to be released Bunnies and Hyperspeed will be part of the same download package.
23rd November 2008, 09:27 am
The IDUG contest, The XML Challenge, is now open for registration. If you’re a student who wants something to put on their resume or a professional who wants a chance to show off your XML skills, this contest is for you. On top of the recognition there’s thousands of dollars worth of prizes from Wiis to technical conferences.
There are five contests you can participate in:
Video - Invent a creative use for XML, XQuery or DB2 and record a video of yourself doing it.
Gadget Contest - Create a downloadable gadget or widget making use of DB2
Query Content - Use XQuery to find five answers. The best queries will win the top prizes
Ported App Contest - Port or develop a new app for DB2. You can enter as an individual or as a team.
XML2 Contest - Build a useful, user-friendly XML app from scratch. You can enter as an individual or as a team.
You will earn participation points for every entry and a special prize will be given to the “XML Grand Master†- the person who earns the most points.
If you’re an aspiring developer then you should definitely take chances like this to enhance your skills in a competitive environment. It’s good practice to have your talents compared against others. This will help you learn where you excel and where you need to improve.

21st November 2008, 08:51 pm
Sin & Cos: The Programmer’s Pals! is probably the most straight forward example of Mode 7 implemented in a C like language available. You may be wondering what Mode 7 is.

F-Zero and Mario Kart for the SNES made use of Mode 7 and it has been used in quite a few games since. Mode 7 is a term to describe the ability to scale and rotate a texture. It simply translates the height of a texture into the depth.
Not so surprisingly you will find that the equations used to render Mode 7 are essentially identical to the equations used to render the ceilings and floors in Bunnies. Mode 7 is Bunnies without the walls.
The above link provides the basic rendering function but gets the key part of the equation wrong. Fortunately, Bunnies gets it right so I just used the equation from Bunnies.
WRONG:
distance = camera.z * scale_y / (screen_y + horizon);
CORRECT:
distance = camera.z * scale_y / (2.0 * screen_y - horizon);
I’ve started translating the old SoftGel C++ code to C# and this Mode 7 stuff is going to be the first to make use of the new library. I’m going to try to find time to start writing more tutorials. Bunnies is pretty advanced at this point and so I think I’ll begin developing a simple racing game and writing tutorials to explain how it all works. Eventually I may work the tutorials back to Bunnies.
You may be wondering what the point is with OpenGL and DirectX available. There are a number of reasons. The main one is that I’ve been there and done that with OpenGL and DirectX. I want to learn the math behind the rendering. The second reason is that most of the work that goes into making a game has nothing to do with rendering graphics. And also, you’ll find many of the same concepts that are used to render graphics are also used to implement game mechanics.
And finally, software rendering works on any platform that can plot a pixel. Not all gaming systems have 3D capabilities. If you can figure out the 3D stuff in software you’ll have no trouble doing it in DirectX or OpenGL.
19th November 2008, 02:53 pm
Sears2go is a new way to shop provided by Sears.
With the holiday season fast approaching Sears2go makes it even easier to get all your shopping done. Often times while out holiday shopping stores are on opposite ends of town. Sears2go makes it easy to shop at Sears and get that holiday shopping done no matter where you are by making it possible to purchase select products using your mobile phone. This is the first on-the-go technology offered by a US retailer.
After purchasing an item on Sears2go, you will receive a text message alert when your merchandise is ready for pick-up. With Sears’ best in class in-store pickup you’re going to experience great customer service from purchase to pick-up.
Sears2go provides many of the same great features already available at Sears.com including the ability to easily browse and search for products, view product reviews and find where stores are located. You will also be able to view the latest special offers so you won’t miss out on any great deals while out and about.
To take advantage of Sears2go on your mobile phone you must have text-messaging enabled and be registered with a text-messaging plan. Sears is offering this service at no charge to you but your carrier may charge standard SMS/data rates.
Stop running around town to get all of your shopping done. Pull out your phone and use Sears2go.


13th November 2008, 03:54 pm
Error in my_thread_global_end(): 1 threads didn’t exit
If you get an error like that you need to upgrade your installation of MySQL to the latest version. If you’re using PHP then you need to update to the latest version of PHP. With .Net and languages like C# you are probably using the 3.51 ODBC driver to connect to MySQL. You’ll need to update to version 5.1 of the driver.
I’ve found that there’s not a lot of information on the net concerning this issue with C#. This is probably because .Net developers are writing web-apps which will silently ignore the error or they are running apps which exit and close the window so they never see the message. The only time you can see the error when coding in .Net is if you run a console app from the command line and the program otherwise cleanly exits. If you break out of the program you won’t see it.
Who uses C# to write console apps?
Fortunatly the error is not really an error. It’s a counting bug. MySQL sees your app’s thread and includes it in the thread count. MySQL exits first when your app closes and it sees that 1 thread is still open that it can’t account for so it throws an error.
The threads that alledgedly didn’t exit belong to your app and your app did in fact close so there are no threads that didn’t actually exit.
It looks scary but the error doesn’t mean there is an error in your app. It means that the MySQL lib can’t count.
11th November 2008, 03:55 pm
rotate_logs.bat:
bin\httpd -k stop
@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Month=%%A
Set Day=%%B
Set Year=%%C
)
ren logs logs-%Year%-%Month%-%Day%
mkdir logs
bin\httpd -k start
Instead of copying or moving large log files it’s much faster to shut down the Apache log server, rename the log folder based on the date, create a new log folder and then start up the server again. Once that process is done you’re free to copy or move the log files where ever you want without affecting the web server.
You can put this code into a bat file and use Windows Scheduler to automatically rotate your logs every week or day or whatever.
I’ve had a lot of problems with having Apache automatically name files based on the year and month to rotate logs and this seems to be a far more elegant solution. Apache does the minimum amount of work logging activity and the bat file does the minimum amount of work rotating the logs. The result is only a second or two of downtime depending on how quickly Apache stops and starts.
11th November 2008, 03:37 pm
On Lamp has an article titles “Writing Apache’s Logs to MySQL” which explains how to log directly to a MySQL database. This seems like a good idea on the surface. There’s nothing better than a database to store large amounts of information for processing. However, it’s not necessary or even advisable to try to store a bunch of log information from Apache directly into MySQL.
If you want your Apache server to run efficiently you need to have it do as little work as possible. For small sites the novelty of putting logs directly into MySQL may seem like a good thing. But as your site gets more and more popular the time it takes to insert rows is suddenly going to be noticable.
The better approach is to stick to file based logging and do post processing on log files. It’s rather trivial to write a PHP or Perl script to parse logs files and populate a database with the information. I currently use a free PHP script (the “Apache Log Parser” script) which happily chugs away reading the Apache “combined” log format. The class is instantiated into a simple script which takes the lines read by the parser script and stuffs them into a database table based on the year and month the request was made. This keeps MySQL happy by not storing millions of rows spanning 8 or 9 years of access logs into a single table.
Log reports are generally done on a monthly basis anyway. If your server is really popular then creating tables based on the year month and day is easy enough to do.
In order to improve efficiency even more, my server stores all the log files on a dedicated hard drive. I have yet to find a good log rotater for Apache. Every time I try to rotate logs I end up with runaway processes and server errors. So to rotate logs manually simply stop the server, rename the current log folder, create a new log folder, restart the server. A few seconds of downtime and you’re free to process the log files without interrupting the server any further.
You could probably write a bat file to do that process and set up a cron to do it automatically every week or so.
8th November 2008, 01:19 pm
Giftster presented by CuteLittleHats.com is a website that allows you to create and share gift lists with family and friends. They can see what you want and what people have gotten for you but you can’t. Your family and friends can also leave comments to help them coordinate better.
Giftster is 100% free. There aren’t even any ads.