About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Friday, April 14, 2006

Krugle

So today, I got my Krugle beta test access. The not beta website, where you can read up on Krugle is: http://www.krugle.com/. Krugle is a search engine that you can use to search, view open source code, comment on, etc..

Well, the first thing I tried was C# to see if there was any, unfortunately there wasn't any.

So the next search I did, was on "reinforcment learning", and there were some code. I am pleased about this. I selected a source code called: test_agents.c

I am able to see the source code, the comments, etc. It is very nice to see how other programmers would do things.

I also took a look at a java class called RLPolicy.java, it was cool to see they implemented some of the exact same things I did.

They allow you to view the whole project, in which they catagorized the files to where they belong.

I'll probably look at some of the code, and if I find something I like, I'll probably rewrite it in C#, not to hard coming from code like C,C++, or Java.

Tuesday, April 11, 2006

Old, but new to me: C# will this compile?

From: http://blogs.msdn.com/brada/archive/2004/12/21/329270.aspx

using System;
using System.Threading;

public class Class1
{
   public static void Main ()
   {
      new Thread(delegate
         {
            Console.WriteLine("On another thread");
         }).Start();
   }
}

I couldn't see why it could ever worked, but then looking at his solutions http://blogs.msdn.com/brada/archive/2004/12/27/332863.aspx

I see why I didn't like it. I would have used the first version of his solution:

new Thread(
delegate ()
   {
      Console.WriteLine("On another thread");
   }
).Start();

since it looks like the way a delegate would be initialized and a function that a thread would call.

Monday, April 10, 2006

How To: Build a RPG in a week

http://www.gamedev.net/reference/articles/article2259.asp

Nice to see that an 80's RPG can easily be made with free tools. He did his programming with python, which is interesting to see that python has come a long way.

Friday, April 07, 2006

How to pull an all nighter... (Shout out to Cornell)

http://www.christianmontoya.com/2006/04/04/how-to-pull-an-all-nighter/

Good basic tips:

Drink caffene, but not too much.

Eat food

Take a shower

Loud Music (doesn't work for me, makes me tired)

Walk around (any good exercise, like 20 pushups or something)

Don't lie down

Don't eat fatty food, I would also add sugary foods since they make you drowsy after 15 minutes

Don't turn the lights out (hope you don't have a room mate)


I never did an all nighter, but I also never procastinated. I knew the sooner I got my shit done, the more time I had to play Counter Strike. :)

Friday, March 24, 2006

Updated: AIM Plugin: SignOff

I just updated the program again, this time I added a better looking graphics to mimic the AIM Triton look, and I have also added the possibility of using sound (only WAV) to make a noise for notification.

http://williamandrus.tripod.com/AIMPlugin.html

Here is some of the code used to play WAV files in C#, in which I think I stole from some other website, a while back.

Well you will need this:
using System.Runtime.InteropServices;

Import a dll to play the WAV sound
[DllImport("winmm.dll")]
private static extern bool PlaySound(string lpszName, int hModule, int dwFlags);


Here is the enumeration of the SND
public enum SND
{
SND_SYNC = 0x0000 ,/* play synchronously (default) */
SND_ASYNC = 0x0001 , /* play asynchronously */
SND_NODEFAULT = 0x0002 , /* silence (!default) if sound not found */
SND_MEMORY = 0x0004 , /* pszSound points to a memory file */
SND_LOOP = 0x0008 , /* loop the sound until next sndPlaySound */
SND_NOSTOP = 0x0010 , /* don't stop any currently playing sound */
SND_NOWAIT = 0x00002000, /* don't wait if the driver is busy */
SND_ALIAS = 0x00010000 ,/* name is a registry alias */
SND_ALIAS_ID = 0x00110000, /* alias is a pre d ID */
SND_FILENAME = 0x00020000, /* name is file name */
SND_RESOURCE = 0x00040004, /* name is resource name or atom */
SND_PURGE = 0x0040, /* purge non-static events for task */
SND_APPLICATION = 0x0080 /* look for application specific association */
}

Use this to play the WAV file:
PlaySound(fileName,0,1);

Thursday, March 23, 2006

AIM Plugin: Sign Off Timer

So this is my first AIM Plugin ever developed, yeah me.

It basically allows the user to set how many minutes he/she would like to stay online. When this time is reached, a pop-up box is displayed and you are signed off. I remember when I was a college student, and I would be almost late for class because I was on AIM losing track of time.

Here is the website where you can download it: http://williamandrus.tripod.com/AIMPlugin.html

I set it up so that the timer would run on it's own thread, that way it won't interfere with the AIM's thread. So in the Exec function I have this little sniplet:

if(command == kCommandId)
{
   Thread t = new Thread((new
ThreadStart(StartTimer)));
   t.Start();
}


this then calls my function called StartTimer:

public void StartTimer()
{
   TimeSelect timer = new TimeSelect(m_session);
   timer.ShowDialog();
}

this then starts up another file which I used to make the form. Here is a sniplet from that program:

private void buttonOK_Click(object sender, System.EventArgs e)
{
   CountDown = Convert.ToInt32(this.numericUpDownMinutes.Value);
   this.Visible = false;
   while(CountDown != 0)
   {
      Application.DoEvents();
   }
   MessageBox.Show("You haved been signed off
by the timer.","Sign Off Timer");
   this.session.SignOff();
}

private void timeKeeper_Tick(object sender, EventArgs e)
{
   if(sender == this.timeKeeper)
   {
      this.CountDown--;
   }
}

Monday, March 20, 2006

AIM SDK

Well, I just started using the AIM SDK and I'm trying to develop and learn about using plugins for AIM. http://developer.aim.com/pluginMain.jsp

Once I have become more confortable with this, I might develop a simple program and build up from there. I would like to see if I could somehow use Google Map's API with AIM's API and see what I could put together in the future.

Tuesday, March 14, 2006

Google Life

http://williamandrus.tripod.com/GoogleLife.html

Well, I added a little map of places I have worked, lived and went to school using google's map API. I would like to do something more complicated, but I would need to get a better website where I would be able to use ASP.Net and maybe a database together to make more complicated programs.

Saturday, March 11, 2006

Updated Reinforcement Learning Tic Tac Toe Game

I just put version 1.2 of my reinforcement learning tic tac toe game on my development website at: http://williamandrus.tripod.com/RLTTT.html


  • Increased learning speed and decrease xml file size by implementing rotation, and reflection of the states.

  • Fixed one minor bug in the Monte Carlo learning in recognizing a final state

  • Fixed one minor bug in the Temporal Difference learning in updating the state values

Wednesday, March 08, 2006

Sequence Number Test

http://mathtest.idiotworld.com/

I did ok, got 7 right, before I got bored and started to cheat. Some of the numbers that I didn't get look familar, and once I've google them I was upset to see what they were. Oh well. I did find all the answers with help from google.