Code

Too much PHP

Posted in Code by Daniel Von Fange on Thursday, January 22, 2004
You know you have been writing too much PHP when: While writing you find yourself putting ";"'s at the end of complete thoughts instead of periods; Like this;

Precisely predicted

Posted in Code by Daniel Von Fange on Thursday, January 22, 2004
I completed a small web programming project this morning, and spent within a minute of my initial estimated time. It comes from making lots of pots.

Password protect only if not from certain IP’s

Posted in Code by Daniel Von Fange on Thursday, January 22, 2004
I needed to password protect a page, but only if it was not being requested from a trusted ip address. I was not sure apache could do this, but lo and behold, a magical Satisfy directive. .htaccess file
Satisfy Any

AuthName "Password protected area"
AuthType Basic
AuthUserFile /home/joeshmoe/.htpasswd
require valid-user


Order Deny,Allow
Deny from all
Allow from 10.1.1.79

WordPress

Posted in Code by Daniel Von Fange on Monday, January 19, 2004
I just setup a site powered by the blogging software Wordpress . It's got an extremely easy setup process.

Embedding Ruby in C++

Posted in Code by Daniel Von Fange on Tuesday, January 13, 2004
Embedding Ruby in C++ (Since the only links I don't lose are the ones I blog.)

Bolo Brain with Ruby

Posted in Code by Daniel Von Fange on Monday, January 12, 2004
Perhaps the best way to write a brain for winbolo is to use Ruby. Bolo brains must be written in C, but ruby interfaces with C very nicely.

Cooperative human-robot soccer

Posted in Code by Daniel Von Fange on Monday, January 12, 2004
One team using the segway bots is developing soccer playing robots designed to play along with with humans on segways. Once I played with building a "brain" for winbolo. Since I realized I did not have the time or the knowledge of C to create a truly autonomous tank, I decided to do a "cooperative" AI. Essentially, the bot would run right at a sighted enemy and blaze away, or it would flock together with other friendly tanks. When played with several of these bots, you would find the flock of them, and then drive toward the enemy. As you moved away from the center of the flock, the flock would follow. When the flock spotted the enemy all the tanks rushed him. Considering the ridicules small amount of programming I did, it worked out okay. Essentially, I offloaded all of the higher level thinking to the human.
Page 7 of 39 pages « First  <  5 6 7 8 9 >  Last »