<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bobobobo's Weblog &#187; programming</title>
	<atom:link href="http://bobobobo.wordpress.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://bobobobo.wordpress.com</link>
	<description>technology and the internets</description>
	<lastBuildDate>Mon, 30 Nov 2009 16:56:23 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='bobobobo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/0e8d17c68f90a18a1e89a776717e00e2?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Bobobobo's Weblog &#187; programming</title>
		<link>http://bobobobo.wordpress.com</link>
	</image>
			<item>
		<title>Getting started with MySQL in C++</title>
		<link>http://bobobobo.wordpress.com/2009/04/05/getting-started-with-mysql-in-c/</link>
		<comments>http://bobobobo.wordpress.com/2009/04/05/getting-started-with-mysql-in-c/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 21:49:14 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[C C++]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=840</guid>
		<description><![CDATA[

/////
// Connects to MySQL database server from
// C or C++ program.
/////

/////////////////////////////////////////////
//                                         //
// Connecting C++ Win32 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=840&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote>
<pre>
/////
// Connects to MySQL database server from
// C or C++ program.
/////

/////////////////////////////////////////////
//                                         //
// Connecting C++ Win32 App To MySQL       //
//                                         //
// You found this at bobobobo's weblog,    //
// http://bobobobo.wordpress.com           //
//                                         //
// Creation date:  Apr 5/09                //
// Last modified:  Apr 5/09                //
//                                         //
/////////////////////////////////////////////

// !! Note!  I've included copies of the MySQL
// include headers and library files.. I've done this
// so that the project will compile and run
// more easily for you, but this DOES NOT mean
// that you should skip the SETUP-Y stuff section
// below!

// If you want MySQL to work easily for you in new
// projects, you really should set up Visual Studio
// as explained below.

#pragma region all the setup-y stuff
/////////
// MAKINET WORK: (any prince of persia 2 the shadow and the flame fans out there?)
//
// 1)  First, you OBVIOUSLY must install MySQL.
//     Be sure to download the 32-BIT VERSION (NOT THE x64)
//     of MySQL 5.1 - "Windows MSI Installer"
//     Located at http://dev.mysql.com/downloads/mysql/5.1.html#win32
//     DO NOT GET THE "WINDOWS ESSENTIALS" PACKAGE
//     DO NOT GET __ANY__ x64 crap EVEN IF you are on
//     windows 64 bit, ALWAYS use the NORMAL (non-64 bit)
//     stuff (see Ancient Dragon's comments for why:
//     http://www.programmingforums.org/thread16958.html)

//     Done that?  GOOD!!  Onto step 2.

// 2)  ENSURE THAT mysql.h is in your VISUAL STUDIO
//     PROJECT PATH SETTINGS.  If you don't do this,
//     then you'll may an error of the form of:

// Error	1	fatal error C1083: Cannot open include file: 'mysql.h':
//          No such file or directory

// For me, mysql.h is in :
// C:\Program Files\MySQL\MySQL Server 5.1\include

// But you have to tell VISUAL STUDIO THAT!!  IT doesn't know.

// Need to edit Visual Studio INCLUDE Directory settings.  here's how.

// SO I, click
//   1  TOOLS -&gt; OPTIONS
//   2  PROJECTS AND SOLUTIONS -&gt; VC++ DIRECTORIES (left hand panel)

//   3  (now in right hand panel),
//    from the two dropdowns there
//      (hanging like two microsoft eyes..), uh,

//   4  you just make sure under PLATFORM,
//      it says Win32,

//   5  and under SHOW DIRECTORIES FOR,
//      it says INCLUDE FILES.

//   6  THEN, click the SHINY YELLOW FOLDER,
//      and then click the '...'
//   7  and navigate to your MySQL INSTALL DIR\INCLUDE
//      add that folder there.

//    For me, I end up with an extra entry in that list that says:

//       C:\Program Files\MySQL\MySQL Server 5.1\include

//    yours may be slightly different, but not too different,
//    hey, don't try and be cool here by being REALLY different please.
//   

// OK?  So now the #include below should work for you.
// If it doesn't, INSTALL MYSQL FIRST!

// YOU MUST #INCLUDE WINDOWS.H FIRST IF YOU WANT MYSQL
// TO WORK ON WINDOWS!!
#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;

// To get autocomplete to work, you may have to right-click
// your Header Files -&gt; Add Existing Item... and pick
// mysql.h and add it to your project.  I've copy and pasted
// the file into this project, though.

// !!
// You may only use the form below if you have followed the
// installation instructions above.
/////#include &lt;mysql.h&gt;

#include "mysql_include/mysql.h"  // use this form if you haven't "installed"
// MySQL header files into visual studio as explained above.

// You must also add C:\Program Files\MySQL\MySQL Server 5.1\lib\debug
// to your Visual Studio LIBRARY directory settings (follow steps above again, except
// at step 5, you choose "SHOW DIRECTORIES FOR -&gt; LIBRARY FILES"
// and at step 7, you add C:\Program Files\MySQL\MySQL Server 5.1\lib\debug
// (or whatever yours really is)

// !!
// You may only use the form below if you have followed the
// installation instructions above.
/////#pragma comment( lib, "libmysql.lib" )

#pragma comment( lib, "mysql_lib/debug/libmysql.lib" )  // use this form if you haven't "installed"
// MySQL header files into visual studio as explained above.

// libmysql.lib is what is termed an "import library" - basically
// it is what wires up function calls in this program to MYSQL
// functionality to the libmysql.dll file.

// So what about libmysql.dll?

// FINALLY, ENSURE TO COPY libmysql.dll to EITHER:  the \Debug folder
// of this project (WHERE THE FINAL .EXE RESIDES), __OR__, to
// C:\WINDOWS\System32 (if that doesn't work, then copy it to C:\WINDOWS\System).

// For me, libmysql.dll lives in
// C:\Program Files\MySQL\MySQL Server 5.1\lib\debug
// Its also included in the mysql_lib/debug folder of
// this project.

// To quote Charlie Charlie Petzold, Programming windows 5th ed:
// You can put a DLL file:

// A dynamic library must be present on the disk
// when a program is run that uses the library.
// When Windows needs to load a DLL module before running
// a program that requires it, the librar must be stored:
//   1.  In the directory containing the .exe program
//   2.  the current directory
//   3.  the Windows system directory
//   4.  the windows directory
//   5.  or a directory accessibel through the PATH string in the MS-DOC environment

// The directories are searched in the above order.

#pragma endregion

#pragma region CODING WITH MYSQL

////
// Globals
MYSQL mysql;    // the MYSQL global object.  Passed to mysql_init,
                // and there's only one of this.

MYSQL * conn ;  // represents connection to database
//
////

int main()
{
  // OK!!  Now that you've got all the setup-y stuff out of the way, its
  // time to connect to MySQL!!

  // here are some great references:
  // 1)  http://c-programming.suite101.com/article.cfm/using_a_mysql_databases_with_c
  // 2)  http://dev.mysql.com/doc/refman/5.1/en/windows-client-compiling.html
  mysql_init( &amp;mysql ) ;

  // PLEASE SEE DOCS PAGE FOR MORE DETAILS
  // ABOUT mysql_real_connect():
  //   http://dev.mysql.com/doc/refman/5.0/en/mysql-real-connect.html
  conn = mysql_real_connect(  &amp;mysql,
                              "localhost",// synonymous with 127.0.0.1
                              "root",     // connect as user="root".  Uh, bad security here..
                              "",         // my root password is blank.  REALLY bad security :)
                              "mysql",    // connect to the 'mysql' _database_ within MySQL itself.
                                          // if you create another database, then you can
                                          // specify you'd like to connect to that one here.

                              0,          // port.  Mine is on 3306, but you can leave it as 0
                                          // and it seems to work automatically.

                              0,          // unix_socket (not in use)

                              0 ) ;       // client flag:  usually 0, unless you want special features (see docs page)

  // At this point you may be wondering, ok,
  // so if this is real_connect, what's fake_connect?
  // There is a mysql_connect() function!  Which is
  // basically the "fake" connect... see docs, but
  // the "fake" functions (mysql_query(), mysql_connect()),
  // are like watered down version of their _real_ counterparts.
  // Sometimes useful, sometimes not.  Again, see docs pages.

  // Check if connection succeeded.
  if( conn == NULL )
  {
    printf("Couldn't connect to MySQL database server!\n");
    printf("Error: %s\n", mysql_error( &amp;mysql ) ) ;
    return 1 ;
  }
  else
  {
    printf("Connect success\n") ;
  }

  #pragma region running an actual query
  // Here, we are connected.
  // form a sql string to execute.

  char * query = "select * from user" ;
  int queryState;

  queryState = mysql_query( conn, query ) ;

  if( queryState != 0 )
  {
    printf("Whoops!  The query failed.  Error:  %s\n", mysql_error( conn ) );
    return 1 ;
  }

  // here, query succeeded, so we can proceed
  // to pull out results.
  MYSQL_RES * resultset ;
  MYSQL_ROW row;  // MYSQL_ROW is #defined as (char **)
  // Data ALWAYS comes back from MySQL as
  // an array of strings.  To convert it
  // to ints or whatever is YOUR JOB as the programmer.

  // mysql_store_result basically fetches
  // the entire array of results and dumps them
  // into our local program memory space (all
  // in the resultset variable.
  resultset = mysql_store_result( conn );

  // How many rows will there be?
  int numRows = mysql_num_rows( resultset ) ;
  printf( "There are %d ROWS (records) of data\n", numRows ) ;

  // Now tell me what columns there are
  // in the result set.
  int numFields = mysql_num_fields( resultset ) ;
  printf( "There are %d FIELDS (columns) of data\n", numFields ) ;

  // Print all those column by name
  MYSQL_FIELD * fields = mysql_fetch_fields( resultset ) ;
  for( int i = 0 ; i &lt; numFields ; i++ )
  {
    printf( "%25s", fields[i].name ) ;
  }

  printf( "\n" ) ;
  // print all results
  while( row = mysql_fetch_row( resultset ) )
  {
    // row is 2d array of char
    // underlying type is char **
    for ( int i = 0; i &lt; numFields ; i++ )
    {
      printf( "%25s", row[ i ] ) ;
    }

    // next row
    printf( "\n" ) ;
  }

  #pragma endregion

  // Now free the result
  mysql_free_result( resultset );

  // And close down.
  mysql_close( conn ) ;
  return 0;
}

#pragma endregion // CODING WITH MYSQL

// Your hands quiver with power.

// You are now a MySQL GURU.

// For the record, there's also:
// Connector C++:  http://forge.mysql.com/wiki/Connector_C%2B%2B
// MySQL++:  http://tangentsoft.net/mysql++/

// I chose not to use either library because.. well, I dislike
// additional layers.

// TROUBLESHOOTING:
//
// "This application has failed to start because LIBMYSQL.dll
// was not found.  Re-installing the application may fix this problem."

// So, like internet superhero says, you have 3 options:
// [ http://blog.ulf-wendel.de/?p=215 ]
// 1.  Copy LIBMYSQL.dll into you Windows system directory (C:\Windows\system and/or C:\windows\system32, whichever spins your wheels)
// 2.  You copy LIBMYSQL.dll into the current working directory
// 3.  You add the location of the LIBMYSQL.dll to your path setting, for example using SET PATH=%PATH%;C:\path\to\LIBMYSQL.dll

// LIBMYSQL.dll is somewhere in your MYSQL INSTALLATION directory..
// so find it, and copy LIBYMSQL.dll to C:\Windows\System32 and/or C:\Windows\System
// OR copy it to the \Debug directory for this project (where the final .exe resides)

// Final note:  static lib compiling.
//#pragma comment( lib, "mysqlclient.lib" )   // doesn't work.. produces 76 errors of the form
// Error	1	error LNK2005: __aligned_malloc already defined in MSVCRTD.lib(MSVCR90D.dll)	       (from file LIBCMTD.lib)
//
// root of problem seems to be in the warning:
//  Warning 44 warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library

// Problem docs:
//     http://curl.haxx.se/mail/lib-2006-04/0101.html
//     http://www.codeguru.com/forum/archive/index.php/t-375084.html

// MikeAThon, at the bottom of the second post there, says
// LIBCMT is the static C-runtime library (and is multi-threaded),
// whereas MSVCRTD is the dynamic linking C-runtime. See
// "How to link with the correct C Run-Time (CRT) library" at
// http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q140584&amp; .
// According to that KB article, "the linker will issue a warning
// (LNK4098) if a resulting module attempts to combine more than
// one copy of the CRT library"

// So go into linker -&gt; input -&gt; ignore all default libraries (/NODEFAULTLIB)
// See Internet Superhero again for more help http://blog.ulf-wendel.de/?p=215
</pre>
</blockquote>
<h3>Download <a href="http://www.esnips.com/nsdoc/1dbc4f8a-7ca5-42a9-881f-8bd2abdc7ee3/?action=forceDL">Visual Studio 2008 project files on esnips</a> (thanks esnips!)</h3>
Posted in C C++, C++, mysql, programming, sql  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/840/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/840/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/840/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/840/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/840/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/840/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/840/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/840/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/840/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/840/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=840&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2009/04/05/getting-started-with-mysql-in-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>what is metaprogramming?</title>
		<link>http://bobobobo.wordpress.com/2008/12/30/what-is-metaprogramming/</link>
		<comments>http://bobobobo.wordpress.com/2008/12/30/what-is-metaprogramming/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 15:34:27 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=543</guid>
		<description><![CDATA[I actually have done this in JavaScript.

metaprogramming
program that writes code that it will later run (itself)

I guess this is like generating JavaScript from PHP code.
I didn&#8217;t realize it was called metaprogramming.  But its basically when you use code to write code.
When you start metaprogramming, the application boosts in complexity10 or something.  It becomes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=543&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I actually have done this in JavaScript.</p>
<dl>
<dt>metaprogramming</dt>
<dd>program that writes code that it will later run (itself)</dd>
</dl>
<p>I guess this is like generating JavaScript from PHP code.</p>
<p>I didn&#8217;t realize it was called metaprogramming.  But its basically when you use code to write code.</p>
<p>When you start metaprogramming, the application boosts in complexity<sup>10</sup> or something.  It becomes very hard to understand, and even harder to debug.  Because you&#8217;ve now got 2 levels to debug on:  is the code being generated correctly (php side), and is the code running correctly (javascript side).</p>
<p>I suppose you might use code of one language to run again later from that same language.  E.g. writing Python code that creates Python code, which is later evaluated.</p>
<p>Might be useful for generating a callback, or something.</p>
<p>Another form of metaprogramming is these frameworks (prototype, joose) that have facilities to write &#8220;Classes&#8221; in JavaScript (even though keyword &#8220;class&#8221; doesn&#8217;t exist in JavaScript 1.5).  You write something like:</p>
<p>var Animal = Class.create({<br />
  initialize: function(name, sound) {<br />
    this.name  = name;<br />
    this.sound = sound;<br />
  },</p>
<p>  speak: function() {<br />
    alert(this.name + &#8221; says: &#8221; + this.sound + &#8220;!&#8221;);<br />
  }<br />
});</p>
<p>Then the prototype framework takes that code you wrote and turns it into &#8220;real javascript&#8221; that can actually run</p>
<p>function Animal( name, sound )<br />
{<br />
  this.name = name ;<br />
  this.sound = sound ;</p>
<p>  this.speak = function() {<br />
    alert(this.name + &#8221; says: &#8221; + this.sound + &#8220;!&#8221;);<br />
  }</p>
<p>  return this ;<br />
}</p>
Posted in programming  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/543/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=543&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/12/30/what-is-metaprogramming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>HOW TO LEARN REGULAR EXPRESSIONS</title>
		<link>http://bobobobo.wordpress.com/2008/12/30/how-to-learn-regular-expresssions/</link>
		<comments>http://bobobobo.wordpress.com/2008/12/30/how-to-learn-regular-expresssions/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 13:30:06 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=541</guid>
		<description><![CDATA[Just get regex coach.
Posted in programming       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=541&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just get <a href="http://www.weitz.de/regex-coach/">regex coach</a>.</p>
Posted in programming  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/541/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/541/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/541/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=541&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/12/30/how-to-learn-regular-expresssions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>ftw python</title>
		<link>http://bobobobo.wordpress.com/2008/12/26/ftw-python/</link>
		<comments>http://bobobobo.wordpress.com/2008/12/26/ftw-python/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 23:58:52 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=505</guid>
		<description><![CDATA[how can anyone take python seriously?
Background: Avid PHP user.  Thought about switching over to Python.
At first, I thought, let&#8217;s use Python 3.0.  Then I thought, well, that&#8217;s a bit new, let&#8217;s use Python 2.6.  Then I realized that you CAN&#8217;T (as of right now, dec 26/08) use the STANDARD MySQLDB extension to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=505&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1>how can anyone take python seriously?</h1>
<p>Background: Avid PHP user.  Thought about switching over to Python.</p>
<p>At first, I thought, let&#8217;s use Python 3.0.  Then I thought, well, that&#8217;s a bit new, let&#8217;s use Python 2.6.  Then I realized that you <a href="http://bytes.com/groups/python/854793-will-mysqldb-python-shim-supported-python-2-6-3-x">CAN&#8217;T</a> (as of right now, dec 26/08) use the <a href="http://sourceforge.net/projects/mysql-python">STANDARD MySQLDB extension</a> to Python unless you&#8217;re on Python 2.4 (32 bit) or Python 2.5 (32 bit).  On Windows anyway, the extension SIMPLY WON&#8217;T INSTALL for anything other than Python 2.4 (32-bit) or Python 2.5 (32-bit).  It won&#8217;t even work for the 64-bit version of Python 2.5.</p>
<p>I find the blazen lack of &#8230; EASE to connect to a MySQL database .. concerning.  I mean, in PHP, <a href="http://ca.php.net/mysql_connect">mysql_connect()</a> has been PART OF THE PHP language for I don&#8217;t know how long.  AT LEAST since PHP 4.  I find it absolutely amazing that something as popular as Python doesn&#8217;t think to / doesn&#8217;t feel a need to integrate MySQL connectability like as a CORE PART of its language .. not to be left to somebody else to do and wait for an extension to come out for Python 3.  KNOW WHAT I MEAN??  I just can&#8217;t take Python seriously as a web development platform if they haven&#8217;t bothered to provide first class functionality to CONNECT to a MySQL database in the latest hash of their language.  Nah mean.</p>
<p><a href="http://www.cs.virginia.edu/~lab2q/">At a glance here</a>, compared with PHP, I think that Python is simply light years behind.  Unless you use a <a href="http://www.djangoproject.com/">framework</a>, you&#8217;re going to have <a href="http://www.cs.virginia.edu/~lab2q/lesson_7/">hella time even maintaining a SESSION</a> (see code example 7.3).</p>
<p>This doesn&#8217;t seem like the way to go to me, at all.  <kbd>session_start()</kbd> anyone?</p>
<p>Maybe they didn&#8217;t want to crowd the language with functions as PHP is crowded with functions.  But still.  I&#8217;m absolutely amazed at how low level, and the fact that you have to hunt down and install separate extensions, with this language to get basic stuff done that you absolutely must have to build a web app.</p>
<p>I still have yet to resolve the difference between <a href="http://www.activestate.com/store/download.aspx?prdGUID=b08b04e0-6872-4d9d-a722-7a0c2dea2758">activepython</a> and the <a href="http://python.org/download/">python.org</a> stuff.</p>
Posted in programming, python  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/505/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=505&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/12/26/ftw-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;element is null&#8221; weird prototype start error</title>
		<link>http://bobobobo.wordpress.com/2008/09/29/element-is-null-weird-prototype-start-error/</link>
		<comments>http://bobobobo.wordpress.com/2008/09/29/element-is-null-weird-prototype-start-error/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 15:26:55 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=351</guid>
		<description><![CDATA[i was trying to bring prototype into a non-prototype page and this error happened:

element is null

on page load.
BUT I DIDN&#8217;T DO ANYTHING WITH PROTOTYPE YET!!
How come its not loading?
Well it turns out I&#8217;m so in love with prototype that I had already defined:


function $(a)
{
  return document.getElementById( a ) ;
}


as you recognize as a commonly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=351&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>i was trying to bring prototype into a non-prototype page and this error happened:</p>
<blockquote><p>
element is null
</p></blockquote>
<p>on page load.</p>
<p>BUT I DIDN&#8217;T DO ANYTHING WITH PROTOTYPE YET!!</p>
<p>How come its not loading?</p>
<p>Well it turns out I&#8217;m so in love with prototype that I had already defined:</p>
<blockquote>
<pre>
function $(a)
{
  return document.getElementById( a ) ;
}
</pre>
</blockquote>
<p>as you recognize as a commonly used prototype convenience function.  once that function decl is deleted, prototype now integrates beautifully into my already javascript-caked page.</p>
Posted in javascript, programming  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/351/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=351&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/09/29/element-is-null-weird-prototype-start-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>How do I design a simple &#8220;front-controller&#8221;?</title>
		<link>http://bobobobo.wordpress.com/2008/05/04/how-do-i-design-a-simple-front-controller/</link>
		<comments>http://bobobobo.wordpress.com/2008/05/04/how-do-i-design-a-simple-front-controller/#comments</comments>
		<pubDate>Sun, 04 May 2008 15:05:50 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[internets]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=211</guid>
		<description><![CDATA[In any modern web app, you probably want to have really cool and simple URLs like how WordPress does for your permalinks.  E.g., the permalink for this posting is 
http://bobobobo.wordpress.com/2008/05/04/how-do-i-design-a-simple-front-controller/
MUCH better than the typical MSDN type urls:

http://msdn.microsoft.com/en-us/library/52cs05fz.aspx
http://msdn.microsoft.com/en-us/library/d06h2&#215;6e.aspx
http://msdn.microsoft.com/en-us/library/bb385954.aspx

Do you think when I complete this posting and publish it, WordPress will ACTUALLY PUT A FILE at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=211&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In any modern web app, you probably want to have really cool and simple URLs like how WordPress does for your permalinks.  E.g., the permalink for this posting is </p>
<p><a href="http://bobobobo.wordpress.com/2008/05/04/how-do-i-design-a-simple-front-controller/">http://bobobobo.wordpress.com/2008/05/04/how-do-i-design-a-simple-front-controller/</a></p>
<p>MUCH better than the typical MSDN type urls:</p>
<blockquote>
<p>http://msdn.microsoft.com/en-us/library/52cs05fz.aspx</p>
<p>http://msdn.microsoft.com/en-us/library/d06h2&#215;6e.aspx</p>
<p>http://msdn.microsoft.com/en-us/library/bb385954.aspx</p>
</blockquote>
<p>Do you think when I complete this posting and publish it, WordPress will ACTUALLY PUT A FILE at <b>http://bobobobo.wordpress.com/2008/05/04/how-do-i-design-a-simple-front-controller/</b>?</p>
<p>NO you dummy!!</p>
<p>Anytime you see REALLY simple urls like http://www.website.com/PersonsUsername/ most likely what is happening there is the web application is using something called REQUEST MAPPING.  You do REQUEST MAPPING using what is called a FRONT CONTROLLER.</p>
<p>The FRONT CONTROLLER works to INTERPRET requests for specific URI&#8217;s AS requests to OTHER pages, engines, and so on.</p>
<p>Give <a href="http://cakephp.org/screencasts/view/3">this a watch</a>.</p>
<p>First, NOTICE how simple that uri is?  In case you didn&#8217;t follow the link through, its http://cakephp.org/screencasts/view/3.</p>
<p>So CakePHP a front controller to do &#8220;request mapping!&#8221;  WATCH THE VIDEO to get an idea, dude.</p>
<p>ANYWAY, how do you create a really simple front-controller and do request mapping from a Java servlet?</p>
<p>Just create a regular servlet, then make the web.xml entry for it something like this:</p>
<blockquote>
<pre>
&lt;servlet&gt;
  &lt;servlet-name&gt;member&lt;/servlet-name&gt;
  &lt;servlet-class&gt;member&lt;/servlet-class&gt;
&lt;/servlet&gt;

&lt;servlet-mapping&gt;
  &lt;servlet-name&gt;member&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/member/*&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
</pre>
</blockquote>
<p>NOTICE the /member/* for the &lt;url-pattern&gt;?  THAT means that ANY requests that come in with the pattern http://www.my.server.com/member/WHATEVER will AUTOMATICALLY be mapped down into the &#8220;member&#8221; servlet.</p>
<p>So the &#8220;member&#8221; servlet class might look something like this:</p>
<blockquote>
<pre>
public class member extends HttpServlet
{
  protected void doGet( HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
    String requestURI = request.getRequestURI();  // if the user hit
    // http://www.my.site.com/member/BOB then the REQUEST URI looks like
    // /member/BOB
    // All I'm going to do now is get everything after the last slash,
    // and that is what will tell me which member profile is desired:
    String desiredUserProfile = requestURI.substring( requestURI.lastIndexOf("/") + 1 );

    // work with desiredUserProfile to produce page output, whatever.
  }
}
</pre>
</blockquote>
<p>Get the idea?</p>
<p>See also:</p>
<p>Java:<br />
<a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/FrontController.html">http://java.sun.com/blueprints/corej2eepatterns/Patterns/FrontController.html</a></p>
<p>PHP:<br />
<a href="http://www.phpwact.org/pattern/front_controller">http://www.phpwact.org/pattern/front_controller</a></p>
<p>Apache Server:</p>
<h1><a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a></h1>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bobobobo.wordpress.com/211/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bobobobo.wordpress.com/211/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=211&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/05/04/how-do-i-design-a-simple-front-controller/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>Hibernating Quickly</title>
		<link>http://bobobobo.wordpress.com/2008/04/27/hibernating-quickly/</link>
		<comments>http://bobobobo.wordpress.com/2008/04/27/hibernating-quickly/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 22:34:39 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=208</guid>
		<description><![CDATA[Wow!  WordPress really did it this time.
They totally overhauled the UI for this site.  And it, at first glance, seems fantastic.
It seems they&#8217;ve fixed a lot of the little annoyances that were in the previous version of WordPress.  As usual, very Ajax-y too.
Anyway, I&#8217;m currently reading about Hibernate because I want to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=208&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Wow!  WordPress really did it this time.</p>
<p>They totally overhauled the UI for this site.  And it, at first glance, seems fantastic.</p>
<p>It seems they&#8217;ve fixed a lot of the little annoyances that were in the previous version of WordPress.  As usual, very Ajax-y too.</p>
<p>Anyway, I&#8217;m currently reading about Hibernate because I want to start using it at work.</p>
<p>Sunday at 6:30pm is the only time I have to do research on how to better do my 9-to-9 job &#8211;</p>
<p>Well, I couldn&#8217;t read at any other time.  I&#8217;m still working on finishing Super Metroid for SNES.</p>
<p>Jeez.  Do I suck, or is programming just really really involved?</p>
<p>Anyway, in Hibernate Quickly, Nick Heudecker says:</p>
<dl>
<dt>Persistence</dt>
<dd>Data that oulives the process that created it.</dd>
</dl>
<p>Great def, and I just had to share it with ya.  Seems like <a href="http://www.amazon.com/Hibernate-Quickly-Patrick-Peak/dp/1932394419/">this is a great book so far</a>.  Amazon reviews only give it 3 stars, but Amazon reviews <i>aren&#8217;t</i> always accurate.</p>
<p>This book and <a href="http://www.amazon.com/Advanced-Programming-DirectX-Wordware-Developers/dp/1556229682/">Walsh&#8217;s DirectX book</a> really get smashed pretty unfairly.</p>
<p>Anyway, anyway.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bobobobo.wordpress.com/208/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bobobobo.wordpress.com/208/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=208&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/04/27/hibernating-quickly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenGL references</title>
		<link>http://bobobobo.wordpress.com/2008/02/27/opengl-references/</link>
		<comments>http://bobobobo.wordpress.com/2008/02/27/opengl-references/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 03:09:43 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[C C++]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=201</guid>
		<description><![CDATA[the sample code from the OpenGL RedBook

A collection of a couple of more GLUT examples

Nate Robins OpenGL tutors programs
 (very good for gaining an intuitive understanding!)
SURPRISINGLY GOOD MSDN OpenGL reference
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=201&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2><a href="http://www.opengl.org/resources/code/samples/redbook/">the sample code from the OpenGL RedBook</a></h2>
<p></p>
<h2><a href="http://www.opengl.org/resources/code/samples/glut_examples/">A collection of a couple of more GLUT examples</a></h2>
<p></p>
<h2><a href="http://www.xmission.com/~nate/tutors.html">Nate Robins OpenGL tutors programs</a></h2>
<p> (very good for gaining an intuitive understanding!)</p>
<h2><a href="http://msdn2.microsoft.com/en-us/library/ms537040(VS.85).aspx">SURPRISINGLY GOOD MSDN OpenGL reference</a></h2>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bobobobo.wordpress.com/201/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bobobobo.wordpress.com/201/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=201&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/02/27/opengl-references/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use zlib</title>
		<link>http://bobobobo.wordpress.com/2008/02/23/how-to-use-zlib/</link>
		<comments>http://bobobobo.wordpress.com/2008/02/23/how-to-use-zlib/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 17:43:02 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[C C++]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=200</guid>
		<description><![CDATA[
//////////////////////////////////////////
//                                      //
// Using zlib               [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=200&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><pre>
//////////////////////////////////////////
//                                      //
// Using zlib                           //
//                                      //
// You found this at bobobobo's weblog, //
// http://bobobobo.wordpress.com        //
//                                      //
// Creation date:  Feb 22/08            //
// Last modified:  Feb 23/08            //
//                                      //
//////////////////////////////////////////

//////////////////////////////////////////
//////////////////////////////////////////
///////////  BEFORE YOU START  ///////////
//////////////////////////////////////////
//////////////////////////////////////////

// Visit <a href="http://zlib.net/">zlib.net</a>, bookmark it,
// and <a href="http://www.zlib.net/zlib123-dll.zip">grab the dll version of zlib</a>.

// Once you get zlib, as the docs say:
// "Copy ZLIB1.DLL to the SYSTEM or the
//  SYSTEM32 directory."

// C:\WINDOWS\System32 may not work for you
// if you're on 64-bit.  Instead, use
// the C:\WINDOWS\System directory.

// If you don't do this, you get this error
// when you try to launch any program
// that uses "zlib1.dll":

/*
     "THIS APPLICATION has failed to start
      because zlib1.dll was not found.
      Re-installing the application
      may fix this problem."
*/

// This is because Windows can't find
// the dll.

// The other option is to place the
// .dll file in the same directory
// as the EXECUTABLE that uses the
// dll.  So, you'd copy out zlib1.dll
// into the Using_zlib\debug folder,
// since that's where visual studio
// dumps the final executable after building.

/////////////////////
// QUICK NOTES ABOUT .LIB AND .DLL FILES:
//
// .LIB FILES:
//
// .lib files are library files and they
// are used for static linking.  That is,
// they contain precompiled code that other
// applications can link to.  When you link
// your application with a .lib library, then
// the .lib library's code is intermixed
// with your own code in the final executable.

// .DLL FILES:
//
// .dll files are dynamically linked library files
// and applications link to them at runtime.

/////////////
// WHAT'S A DLL?

// What's a DLL anyway?

// DLL stands for DYNAMICALLY
// LINKED LIBARY.

// Why "LIBRARY"?  Well, clearly because
// the .DLL is just a LIBRARY of
// FUNCTIONS that you can CALL.

// ZLIB is really just a bunch of
// subroutines that you use to zip
// and unzip data.

// "DYNAMICALLY LINKED":  Because
// the actual code of ZLIB (that performs
// the zipping and unzipping operations),
// is going to REMAIN STORED inside of
// zlib.dll.

// Even though your program that you write
// will make calls to zlib's functions,
// THERE WILL BE NO _ACTUAL_ ZLIB CODE
// IN __YOUR__ FINAL EXECUTABLE.

// In other words, the actual ZIP /UNZIP
// code routines WILL NOT be packed into
// YOUR final executable that you build
// with your code when you use zlib.dll.

// Instead, your code will contain REFERENCES TO
// the actual executable code pieces inside
// of zlib.dll, and WINDOWS will resolve
// ("LINK") your application's calls with
// the .dll file's subroutines DYNAMICALLY
// (AT RUN TIME).

// Hence the term "dynamically linked library".
// Because the LINKING of the code happens
// DYNAMICALLY ("dynamically" just means
// "at run time", just like "dynamically allocated
// memory" is memory that you allocate at
// run time using malloc()).

// So at the end of the day, a .dll file
// just contains a bunch of CODE.

// The difference comes in in HOW the
// Windows operating system manages
// that code.

///////////////////////////
// WHAT'S THIS FILE?
//
// This project shows you how to use zlib.
// Its a console project, because there's
// no need to create a window to demonstrate
// use of zlib.

// "words.txt" was generated from the 5 letter
// words listed @ http://www.math.toronto.edu/~jjchew/scrabble/lists/common-5.html

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;

#include &lt;windows.h&gt;

// the zlib.h header file contains
// function prototypes and a lot
// of information about zlib!
#include "zlibdll/include/zlib.h"

// link the static lib
#pragma comment (lib, "zlibdll/lib/zdll.lib" )

int main()
{
    srand(time(0));      // seed random number generator

    bool showOutput;     // make false if you don't want text output
    printf( "Show textual output?  [y/n]\n");
    if ( tolower(getchar()) == 'y' )
        showOutput = true;
    else
        showOutput = false;

    printf("*********************\n");
    printf("* zlib test file\n");
    printf("* Using version %s of zlib\n", zlibVersion() ) ;

    #pragma region _make some data to compress_
    const int NUM_WORDS = 8938;     // pre-counted constant

    char * randomWords[ NUM_WORDS ] = {
#include "words.txt"  // get in <a href="http://www.esnips.com/doc/c79918b2-77a7-41b0-9822-fc39d21d6c8a/Using_zlib">project files</a>
    };

    const int NUM_WORDS_TO_USE = 80;

    // Fill dataOriginal with a random jumbling of
    // 80 * (5 letter words + 1 space)
    // (each word followed by a space).
    int sizeDataOriginal = 6 * NUM_WORDS_TO_USE + 1 ;
    printf("* Before compression:  your data is %d bytes\n", sizeDataOriginal );
    BYTE * dataOriginal = (BYTE*)malloc( sizeDataOriginal );

    for( int i = 0; i &lt; 6 * NUM_WORDS_TO_USE; i += 6 )
    {
        int randomIndex = rand() % NUM_WORDS ;
        static char buf[6];
        strncpy( buf, randomWords[ randomIndex ], 5 );  // don't copy the NULL character.
        buf[5] = ' ';
        strncpy( (char*)(dataOriginal+i), buf, 6 );
    }

    dataOriginal[ sizeDataOriginal - 1 ] = NULL; // null terminator.
    // test it.
    printf("* \n* Here's the data we generated for you:\n\n--\n");
    if( showOutput )
    {
        for( int i = 0 ; i &lt; sizeDataOriginal ; i++ )
        {
            putchar( dataOriginal[i] ); // coulda puts'd this
            // but wanted to be consistent.
        }
        printf("\n--\n\n");
    }
    else
        printf(" (suppressed)\n--\n\n");
    #pragma endregion

    #pragma region compress the data
    //////////////
    // compress it.
    // To compress some data, we'll use the compress()
    // function.

    // To use the compress function, we must
    // create a destination buffer to
    // hold the compressed data.

    // So how big should the compressed
    // data buffer be?

    // This may seem a bit weird at first,
    // but the array that is to hold the compressed
    // data must start out being AT LEAST 0.1% larger than
    // the original size of the data, + 12 extra bytes.

    // So, we'll just play it safe and alloated 1.1x
    // as much memory + 12 bytes (110% original + 12 bytes)

    ULONG sizeDataCompressed  = (sizeDataOriginal * 1.1) + 12;

    BYTE * dataCompressed = (BYTE*)malloc( sizeDataCompressed );

    // Now hold on, you ask.  WHY is the array
    // that's supposed to hold the COMPRESSED
    // data ALREADY BIGGER than the original
    // data array?  This isn't compression!
    // This is meaningless expansion!

    // Well, you'll see that this extra space
    // in the compressed array is only TEMPORARY.
    // Just suffice it to say that zlib
    // "needs room to breathe".

    // When zlib performs compression, it will
    // need a bit of extra room to do its work.

    // When the compress() routine returns,
    // the compressedData array will have
    // been AUTOMATICALLY RESIZED by ZLIB
    // to being a smaller, compressed size.

    // We will also know the EXACT size of
    // that compressed data by looking at
    // the 'sizeDataCompressed' variable
    // AFTER the compress() routine runs.
    // That variable 'sizeDataCompressed'
    // will updated by the compress()
    // function when we call it!

    // Don't worry, the "compressed" data
    // will be smaller than the original
    // data was in the end!
    int z_result = compress(

        dataCompressed,         // destination buffer,
                                // must be at least
                                // (1.01X + 12) bytes as large
                                // as source.. we made it 1.1X + 12bytes

        &amp;sizeDataCompressed,    // pointer to var containing
                                // the current size of the
                                // destination buffer.
                                // WHEN this function completes,
                                // this var will be updated to
                                // contain the NEW size of the
                                // compressed data in bytes.

        dataOriginal,           // source data for compression

        sizeDataOriginal ) ;    // size of source data in bytes

    switch( z_result )
    {
    case Z_OK:
        printf("***** SUCCESS! *****\n");
        break;

    case Z_MEM_ERROR:
        printf("out of memory\n");
        exit(1);    // quit.
        break;

    case Z_BUF_ERROR:
        printf("output buffer wasn't large enough!\n");
        exit(1);    // quit.
        break;
    }

    printf("*******************************\n");
    printf("* DATA COMPRESSION COMPLETE!! :\n");
    printf("*\n");
    printf("* Compressed size is %d bytes\n", sizeDataCompressed );
    printf("* This is what it looks like:\n\n--\n");

    // Now we want to print the compressed data out.
    // Can't just printf() it because
    // the nulls will be all over the place, and there
    // isn't necessarily a null at the end.
    if( showOutput )
    {
        for( int i = 0; i &lt; sizeDataCompressed; i++ )
        {
            putchar( dataCompressed[i] );
        }
        printf("\n--\n\n");
    }
    else
        printf(" (suppressed)\n--\n\n");
    #pragma endregion

    #pragma region save compressed data to disk
    //////////////////
    // Save that compressed data to disk.
    // Maybe its save game information or
    // something.
    printf("********************************\n");
    printf("* Saving compressed data to disk\n\n");

    ///////////////////////////////////////////////
    //////////////!!!!!!!!!!!!!!!!!!!!/////////////
    //////////////!!!IMPORTANT NOTE!!!/////////////
    // You see how I'm opening the file in "wb" mode,
    // NOT just "w" mode?????
    FILE * out = fopen( "savedData.dat", "wb" );
    // Well, "wb" means BINARY MODE for writing.
    // THIS IS EXTREMELY IMPORTANT.  IF YOU DON'T
    // USE "wb" TO WRITE YOUR FILES, AND YOU DON'T
    // USE "rb" TO READ YOUR FILES, YOU FILE
    // WILL BE VERY SLIGHTLY CORRUPTED,
    // WINDOWS PROMISES YOU THAT!!

    // One of the reasons for the corruption is
    // under Windows, if you write out a
    // NEWLINE (ASCII code 10, escape sequence "\n",
    // aka the "LINEFEED" (LF)) to the output stream,
    // then Windows puts out a 13 FIRST, then a 10.

    // 13 is the ascii code for CARRIAGE RETURN (CR),
    // and 10 is ascii code for the Linefeed (LF).

    // Now that seems awfully stupid.  Why would Windows
    // output hex 0D 0A when I clearly asked it to
    // output just 0A?

    // The answer is that Windows uses TWO CHARACTERS
    // to designate the new line:  (CRLF), NOT just LF.

    // Unix uses just LF.  Macs use just CR.  (Windows is
    // the only weirdo that uses 2 characters for a newline.
    // I suppose you could say that this is more true to the
    // original typewriter (or the dot matrix printer),
    // where you have to push the "carriage" (thing that types)
    // back to the left side (carriage return), then
    // you have to feed the paper up a line (linefeed)).

    // SO, this is significant because everytime you write
    // the integer value 10 to the output stream, IF you're
    // NOT writing in binary mode, Windows thinks you're
    // trying to write text.  So NATURALLY, if you write
    // the integer value 10 out in one of the bytes,
    // Windows recognizes this is a linefeed and
    // write out 13 10 instead.

    // This introduces extra data into your output
    // and is enough to significantly corrupt the result.

    if( out == NULL )
    {
        printf("Couldn't open output file for writing\n");
        exit(1);    //quit
    }
    fwrite( dataCompressed, sizeDataCompressed, 1, out );
    fclose( out );
    out = NULL;
    #pragma endregion

    #pragma region read in data from disk
    ///////////////
    // Next, we'll READ the compressed data
    // from the file, then DECOMPRESS it, to
    // prove that it'll be the same as
    // the original data.
    printf("********************************\n");
    printf("* Reading in data from save file\n");

    //////////////!!!!!!!!!!IMPORTANT:  note "rb"
    // NOT just "r".
    FILE * readFile = fopen("savedData.dat", "rb");
    if( readFile == NULL )
    {
        printf("Couldn't open input file for reading\n");
        exit(1);    //quit
    }

    // get size of file
    fseek( readFile, 0, SEEK_END );
    ULONG fileLength = ftell( readFile );
    rewind( readFile );

    // allocate enough mems to hold entire file
    // alternatively, we could "memory map" the
    // file contents using the CreateFileMapping and
    // MapViewOfFile funcs.
    BYTE * dataReadInCompressed = (BYTE*)malloc( fileLength );

    // read in entire file
    fread( dataReadInCompressed, fileLength, 1, readFile );

    // close file
    fclose( readFile );
    readFile = NULL;

    printf("*\n* This is what I read from the saved file:\n");
    printf("\n--\n");
    if( showOutput )
    {
        for( int i = 0 ; i &lt; fileLength ; i++ )
        {
            putchar( dataReadInCompressed[i] );
        }
        printf("\n--\n\n");
    }
    else
        printf(" (suppressed)\n--\n\n");
    #pragma endregion

    #pragma region decompress the read-in data
    ///////////////
    // Next, we'll decompress that
    // data we just read in from disk.

    // How large should we make the array
    // into which the UNZIPPED/UNCOMPRESSED
    // data will go?

    // WELL, there's the catch with ZLIB.
    // You never know how big compressed data
    // will blow out to be.  It can blow up
    // to being anywhere from 2 times as big,
    // or it can be (exactly the same size),
    // or it can be up to 10 times as big
    // or even bigger!

    // So, you can tell its a really bad idea
    // to try to GUESS the proper size that the
    // uncompressed data will end up being.

    // You're SUPPOSED TO HAVE SAVED THE INFORMATION
    // about the original size of the data at
    // the time you compress it.

    // There's a note on how to do that easily
    // at the bottom of this file, in the end notes.

    // FOR NOW, we're just going to
    // use the dataSizeOriginal variable.
    printf("*******************************\n");
    printf("* Decompressing your data . . .\n");
    ULONG sizeDataUncompressed = sizeDataOriginal;
    BYTE * dataUncompressed = (BYTE*)malloc( sizeDataUncompressed );

    //////////////
    // now uncompress
    z_result = uncompress(

        dataUncompressed,       // destination for the uncompressed
                                // data.  This should be the size of
                                // the original data, which you should
                                // already know.

        &amp;sizeDataUncompressed,  // length of destination (uncompressed)
                                // buffer

        dataReadInCompressed,   // source buffer - the compressed data

        sizeDataCompressed );   // length of compressed data in bytes

    switch( z_result )
    {
    case Z_OK:
        printf("***** SUCCESS! *****\n");
        break;

    case Z_MEM_ERROR:
        printf("out of memory\n");
        exit(1);    // quit.
        break;

    case Z_BUF_ERROR:
        printf("output buffer wasn't large enough!\n");
        exit(1);    // quit.
        break;
    }

    printf("************************\n");
    printf("* Uncompressed size is %d bytes\n", sizeDataUncompressed );
    printf("* Your UNCOMPRESSED data looks like this:\n");

    printf("\n--\n");
    if( showOutput )
    {
        for( int i = 0 ; i &lt; sizeDataUncompressed ; i++ )
        {
            putchar( dataUncompressed[i] );
        }
        printf("\n--\n\n");
    }
    else
        printf(" (suppressed)\n--\n\n");
    #pragma endregion

    #pragma region compare decompressed data with original data
    if( memcmp( dataOriginal, dataUncompressed, sizeDataOriginal ) == 0 )
    {
        printf("* SEE?  It was EXACTLY the same.\n");
    }
    else
    {
        printf( "\n\n=====================================\n"
                "Oh. . . dear.  There is a problem.  The uncompressed data "
                "isn't exactly the same as the original data.  Your data "
                "may be corrupted.  WHOOPS!!\n"
                "Please make sure if that you are reading and writing "
                "any file i/o in BINARY MODE." );
    }
    #pragma endregion

    free( dataOriginal );
    free( dataCompressed );
    free( dataReadInCompressed );
    free( dataUncompressed );

}

/////////
// END NOTES:

// So in this tutorial, when I saved the
// data out to a file, I just used fwrite()
// and dumped the array of bytes with no
// information ABOUT what the file is
// whatsoever.

// in real life, that's probably not a good idea.
// You want to always output at the beginning
// of your compressed data AT LEAST the size
// the data will be when it becomes uncompressed.
// This is the only way you can know how big
// to make the "receiving array" for the uncompressed data.

// ZLIB has no "tell_me_the_size_of_this_thing_
// when_it_gets_uncompressed() function.

// You MUST keep that data in the file itself.

// So, you might create a structure like thus
// and like so:

/*

struct saveFile
{
    ULONG compressedSize;   // size of the data array, compressed
    ULONG uncompressedSize; // size when data gets uncompressed
    char what[16];          // what is this file?  may want to
                            // indicate what kind of data is saved here.

    // add whatever other info you need
    // here.

    BYTE * data;            // the actual compressed data

};

*/

// Then, just fwrite out the data,
// with a couple of fwrites().

// When you fread it, you fread the
// size fields first . . . you know
// what to do.

/*
     ____   __   __      __   __  ___
    / _  \ /  / /  /    /  /  \ \/  /
   / _/ / /  / /  /    /  /    \   /
  / _/ \ /  / /  /__  /  /__   /  /
 /_____//__/ /______//______/ /__/

*/
</pre>
<p>Download the <a href="http://www.esnips.com/doc/c79918b2-77a7-41b0-9822-fc39d21d6c8a/Using_zlib">Visual Studio 2005 project files</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bobobobo.wordpress.com/200/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bobobobo.wordpress.com/200/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=200&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/02/23/how-to-use-zlib/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>You know what&#8217;s stupid?  Putting a signed value in an unsigned type . . .</title>
		<link>http://bobobobo.wordpress.com/2008/02/22/you-know-whats-stupid-putting-a-signed-value-in-an-unsigned-type/</link>
		<comments>http://bobobobo.wordpress.com/2008/02/22/you-know-whats-stupid-putting-a-signed-value-in-an-unsigned-type/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 00:39:09 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[C C++]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=199</guid>
		<description><![CDATA[I was attempting to use buffered input for the mouse and I was getting erratic behavior at first.
What was the problem?
Here we have some code.  g.xPos and g.yPos are floats.


switch( inputData.dwOfs )
{
    case DIMOFS_X:
        g.xPos += inputData.dwData ;
       [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=199&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was attempting to use buffered input for the mouse and I was getting erratic behavior at first.</p>
<p>What was the problem?</p>
<p>Here we have some code.  g.xPos and g.yPos are floats.</p>
<blockquote>
<pre>
switch( inputData.dwOfs )
{
    case DIMOFS_X:
        g.xPos += inputData.dwData ;
        break;

    case DIMOFS_Y:
        g.yPos += inputData.dwData ;
        break;
}
</pre>
</blockquote>
<p>At first glance, this appears to work fine.  At least, it works fine until you try to move the mouse up or left.</p>
<p>Then all hell breaks loose.  The mouse jumps nonsensically offscreen to the right when you pull it left, and it jumps to the extreme bottom when you move it even one pixel up.</p>
<p>Closer inspection reveals that insanely huge values are being added to g.xPos and g.yPos whenever you move the mouse left or up.</p>
<p>So you know what the problem is now, huh.</p>
<h1>What&#8217;s the problem already?</h1>
<p>dwData is unsigned.</p>
<blockquote>
<pre>

int * d = (int*)&amp;inputData.dwOfs ;

switch( inputData.dwOfs )
{
    case DIMOFS_X:
        g.xPos += *d;
        break;

    case DIMOFS_Y:
        g.yPos += *d;
        break;
}
</pre>
</blockquote>
<p>I think microsoft made a bad typing decision here.  Why is dwData unsigned when its going to carry signed data . . ?</p>
<p>Sheesh.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bobobobo.wordpress.com/199/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bobobobo.wordpress.com/199/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=199&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2008/02/22/you-know-whats-stupid-putting-a-signed-value-in-an-unsigned-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
	</channel>
</rss>