Infinite Loop
on December 22, 2009 with No CommentsToday at work, I used this line of code:
pnlError.Controls.Add(pnlError);
Oooops! =P
Today at work, I used this line of code:
pnlError.Controls.Add(pnlError);
Oooops! =P
…and you are using plain text encoding, use a Scanner instead of a BufferedReader, wrapped over a InputStreamReader. I just fought a timeout bug for quite some time that was fixed by this.
Recently, for a Computer Graphics project, I had to implement algorithms which tessellated four different shapes in C++. We were provided various classes that did vector math, transformations, and FLTK setup for us. The only thing we had to do was implement the algorithms to compute vertices and build triangles.
Below I will share the code and a description to those algorithms only. None of the code to the transformations or FLTK or vector math will be shared so if you want any of that stuff, you are on your own.
While working on a project for graphics, I needed some information on Bresenham’s line drawing algorithm, a.k.a. the midpoint line drawing algorithm, most specifically doing it in C for OpenGL. There was pretty much little or bad information out there or it was some parts making sense, others not. Here is my rendition of the algorithm:
http://crackinwise.pastebin.com/f65383521
This is a C-language version of the code that uses OpenGL points to draw the line. This is just the line drawing algorithm, so if you want to use this in any sort of OpenGL application, you will need to write the rest of your own OGL application.
Good stuff.
I began working on ZSDKP a few weeks ago and figured out that a key feature of the application would be its ability to scrape items from other sites like Wowguru and Allakhazam. The basic premise is that these sites provide their item XML data and I can just parse it to inject into my database. I would have loved nothing more than to use Wowhead but they do not give you a link (that I can find) to their XML data.
However, I quickly encountered a key problem: I wanted to use one parsing algorithm for all sites that would create the item based on my own field names. This meant I was susceptible to a key pitfall: wowguru and allakhazam use different XML structures from each other which is, additionally, different from the scheme I use.
Enter: XSL Transforms!
You may or may not have noticed that we added a link to a URL of ours. This is a little project we are working on which will, hopefully, have big results. While its still in the early development stages, I will give you a sneak peek.
About two years ago, towards the end of vanilla WoW, Jon and I ran a guild that did the 20-man content of the day. We managed loot by a system produced by the guild Nurfed. They kept this up-to-date until BC arrived when they went to a loot council system and dropped support for theirs, named NDKP. We were saddened by this when we picked up the game again a few months ago and wanted to use this system. It would seem, apparently, that others were also upset because they trusted this system.
NDKP version 3.22 still exists on the Nurfed servers but is severely out of date. Almost all of the code for the calculations and in-game add-ons are broken. We will attempt to update this code and the calculations for use in BC and, hopefully, into WotLK. We have, appropriately, named this new milestone on the system, ZSDKP (standing for zero-sum dkp, of course).
Check back often for more!