You touch my Tralala?

Gavin likes bad techno…

(May not be appropriate for all audiences, or for work…)

Google Chart Helper 0.1

Jobba the Site is coming along great and is getting closer and closer to being done.

As I am sure you know, Google recently released a chart api, but it is a bit of a pain to generate all of the numbers and put them in the image uri so that Google can generate the charts for you. That is why I created the google_chart_helper for Code Igniter. So far it is pretty beta, and only does one chart type, the pie chart, but I figured I would put it up here to see if anyone has a better way of doing it (or some cool tips that I don’t know about).

Here is how it works:

$chart = new google_chart();
$chart_data = array(2,3,4);
$chart_labels = array(two, three, four);
$width = 500;
$threedee = false;
$colourful = true;
$chart->pie_chart($chart_data, $chart_labels,
$width, $threedee, $colourful);

and the result will be something like:

This was generated a while ago, and I saved it, but generally, Google will create a new chart for you every time you ask for one.

Here is the php file:

my_google_chart_helper

Have fun!

Edit
Here is the file as a txt so you can look at it (or what ever)

Testing the C# waters

So, since my desktop got fried and will barely boot into Linux, I figured it was time to check out Visual Studio 2005 (which my dad gave me at Christmas time). Installed with no problem, other than finding the key that I was given. It then decided that it needed a number of updates, so I let it do its thing, and eventually I was greeted with this:

Nice clean, and it started up faster than eclipse or Netbeans, though it is out dated by comparison. I decided that I wanted to write a quick hello world application, so I created a C# Project (or ’solution’ as it is referred to in some locations). And was greeted with this:

Also nice and clean, so far so good. It looks like a lot of code to write a small program though. Strange that System needs to be added via ‘using’ which I am assuming is similar to an import. Fair enough, it does it for me so I am not really that bothered by it. Now what do I type to print stuff out… hmmm… Since it is a console program, perhaps it is console (the first thing that showed up using code completion, fancy that).

It makes sense, and there is a description of it right there and everything. How convenient.

Console.WriteLine("Howdy World");

There we go, run it and woah, that was fast, no pausing on debug apparently. Should probably make it wait a second so that I can see what is going on in the console.
After looking around on the Internet a little, I found that you do that by:

System.Threading.Thread.Sleep(3000);

So without further ado, here is a screen shot of the running program:

That wasn’t so bad, I guess I could get used to the weird redundancies of the language. Its sort of like java I guess.

If you want to run my totally awesome program, here it is:

Howdy World.exe

Edit

And there is why we don’t like Microsoft, its so obtrusive… Installing VS 2005 has removed all of my previous java file associations. They are now associated with j# files… grrr…

Fried? Apparently only a little bit…

Why am I up so late? I fried my computer. Not with software, but rather, I electrocuted it and seem to have lost all of the data that was on it. I cannot mount the file system with a live cd. That sucks, but what sucks more is that it wont even boot on a fresh install. I think the hard drive is toast… I wonder if Windows will boot… Hopefully it will and I will not have lost all of the data (I am mostly worried about my homework) that was on my computer…

Ok, weird, I just forced it to boot (to see what would happen) and it booted up just fine… even with the short read errors. It wouldn’t do that before the fresh install. Strangeness. Now I have to set it up the way that I want it again, but at least it is working (for the moment). I wonder what else got corrupted when I zapped it?

Edit

Apparently this has had no effect on the Windows XP install that is located on a different partition (but not a different drive). Weird.