<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">Mark Rogers</title>
  <icon>http://www.markdavidrogers.com/oxitesample/Content/icons/flame.ico</icon>
  <logo>http://www.markdavidrogers.com/oxitesample/Content/icons/flame.png</logo>
  <updated>2009-11-19T06:47:00Z</updated>
  <subtitle type="html">This is the Oxite Sample description</subtitle>
  <id>http://www.markdavidrogers.com/oxitesample/atom</id>
  <link rel="alternate" type="text/html" hreflang="en" href="/oxitesample/"/>
  <link rel="self" type="application/atom+xml" href="http://www.markdavidrogers.com/oxitesample/ATOM"/>
  <generator uri="http://oxite.net" version="1.0">Oxite</generator>
  <entry>
    <title type="html">jqGrid missing search codes</title>
    <link rel="alternate" type="text/html" href="http://www.markdavidrogers.com/oxitesample/Blog/jqgrid-missing-search-codes"/>
    <id>http://www.markdavidrogers.com/oxitesample/Blog/jqgrid-missing-search-codes</id>
    <updated>2009-12-01T15:16:06.34Z</updated>
    <published>2009-11-19T06:47:00Z</published>
    <author>
      <name>Admin</name>
    </author>
    <category term="jqgrid" />
    <category term="mvc" />
    <category term="search" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Recently, I've had a need for presenting tabular data in my &lt;a href=&quot;http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&quot;&gt;MVC-style&lt;/a&gt; web application, and I figured this is such a common task that I might as well ask around.   Thus I posted &lt;a href=&quot;http://stackoverflow.com/questions/1736288/whats-the-best-way-to-create-a-paging-gridview-style-partial-view-in-asp-net-mvc&quot;&gt;this question&lt;/a&gt; on stack-overflow about presenting tabular data, and was told about &lt;a href=&quot;http://www.trirand.com/blog/&quot;&gt;jqGrid (the project author's site can load a little slow sometimes)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
jqGrid is pretty impressive, as far as client-side capabilities go, it puts the old asp.net webforms GridView to shame.  But it's got a couple of minor problems, for one the API has a kind of hacked-together feel and the jQuery plugin initialization function call is epic, even for average uses of the grid.  That said the jqGrid does almost everything you can think of, from searching and paging to editing and selecting rows.  &lt;/p&gt;

&lt;p&gt;I think what slowed me down the most was the disjointed nature of the documentation. After reading some random blog posts, I finally found the main core of &lt;a href=&quot;http://www.secondpersonplural.ca/jqgriddocs/index.htm&quot;&gt;docs here&lt;/a&gt;.  But even those docs have some random holes in them that have to be filled via google and blog posts.&lt;/p&gt;

&lt;p&gt;One thing in particular I found missing, was that when you are implementing searching you have to be able to translate the search operator codes sent by the grid to the server into something you can use on the server side.  One mildly frustrating problem was that the documentation only lists 9 of the 14 total search operator codes that you have to translate.&lt;/p&gt;

I'll list the rest of the codes here:
&lt;blockquote&gt;
bn - not begins with ( !(LIKE val%) )&lt;br/&gt;
in - is in ( checks if the searchField is in the searchString )&lt;br/&gt;
ni - is not in (checks if the searchField is not in the searchString  )&lt;br/&gt;
en - does not end with (!(LIKE %val) )&lt;br/&gt;
nc - does not contain (!(LIKE %val%))&lt;br/&gt;
&lt;/blockquote&gt;

    </content>
  </entry>
  <entry>
    <title type="html">Random Name Generator .Net Library</title>
    <link rel="alternate" type="text/html" href="http://www.markdavidrogers.com/oxitesample/Blog/random-name-generator-net-library"/>
    <id>http://www.markdavidrogers.com/oxitesample/Blog/random-name-generator-net-library</id>
    <updated>2009-11-21T23:57:51.753Z</updated>
    <published>2009-11-05T15:22:00Z</published>
    <author>
      <name>Admin</name>
    </author>
    <category term=".net" />
    <category term="library" />
    <category term="random" />
    <content type="html" xml:lang="en">
      &lt;p&gt;While I was working on my current project, I found I needed the ability to generate a name randomly.  Pretty simple task, but I have been unable to google a free .net random name generating library that I could use.  After reading &lt;a href=&quot;http://stackoverflow.com/questions/274062/name-generator-for-net&quot;&gt;this question&lt;/a&gt;, I came to the conclusion that no such library exists.  So I decided to make one myself, and give it out for free in the hopes that it might generate a few hits.&lt;/p&gt;

&lt;div&gt;
  &lt;p&gt;You can try it out right here:&lt;/p&gt;
  &lt;div&gt;&lt;input type=&quot;button&quot; value=&quot;Generate Random Person Name&quot; id=&quot;randomPersonButton&quot; /&gt;:  
  &lt;span id=&quot;randomPersonResult&quot;&gt; Click To Generate &lt;/span&gt;&lt;/div&gt;
  &lt;div&gt;&lt;input type=&quot;button&quot; value=&quot;Generate Random Place Name&quot; id=&quot;randomPlaceButton&quot; /&gt;:  
  &lt;span id=&quot;randomPlaceResult&quot;&gt; Click To Generate &lt;/span&gt;&lt;/div&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
      $(document).ready(function() {
          $(&quot;#randomPersonButton&quot;).click( function () {
	      		$.getJSON(&quot;/oxitesample/RandomNameGenerator/GenerateRandomPersonName&quot;,
			     function(data){
						$('#randomPersonResult').text(data);
        	 	 });
	 });
	 $(&quot;#randomPlaceButton&quot;).click( function () {
	      $.getJSON(&quot;/oxitesample/RandomNameGenerator/GenerateRandomPlaceName&quot;,
		 function(data){
	         	 $('#randomPlaceResult').text(data);
        	 });
	 });
      });
  &lt;/script&gt;
&lt;/div&gt;

&lt;div&gt;
&lt;p&gt;&lt;a href=&quot;http://www.markdavidrogers.com/files/RandomNameGenerator.zip&quot;&gt;You can download a zip file containing the DLL here (using .net framework 3.5). [406k]&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;


&lt;p&gt;The library contains a stripped down lists of human names from the &lt;a href=&quot;http://www.census.gov/genealogy/names/names_files.html&quot;&gt;US Census names list&lt;/a&gt;, and a list of place names from another &lt;a href=&quot;http://www.census.gov/tiger/tms/gazetteer/places2k.txt&quot;&gt;census list&lt;/a&gt;. The library allows you to get random first and last names or both and you can get male and female first names. You can also generate random place names as well. To access this functionality create a NameGenerator in namespace RandomNameGenerator, and call one of the functions like GenerateRandomFirstAndLastName().  The functions names describe literally and simply what those functions do.&lt;/p&gt;

&lt;p&gt;For this demo post, I used jQuery's $.getJSON to perform the Ajax, and ASP.net MVC on the server side to receive the request.  A controller there asks the library for a random name.&lt;/p&gt;

&lt;p&gt; You are free to use the library however you like, commerical or otherwise, but I would expect you not to claim that you made it or sue me for some reason.&lt;/p&gt;

&lt;p&gt; If anyone wants the source code, or a version of the library that compresses and decompresses the names lists (in order to trade disk size for in-memory computation), let me know!&lt;/p&gt;

    </content>
  </entry>
  <entry>
    <title type="html">There Can Be Only One!</title>
    <link rel="alternate" type="text/html" href="http://www.markdavidrogers.com/oxitesample/Blog/there-can-be-only-one"/>
    <id>http://www.markdavidrogers.com/oxitesample/Blog/there-can-be-only-one</id>
    <updated>2009-11-14T17:30:45.627Z</updated>
    <published>2009-10-07T14:44:00Z</published>
    <author>
      <name>Admin</name>
    </author>
    <category term="analytics" />
    <category term="google" />
    <category term="seo" />
    <content type="html" xml:lang="en">
      &lt;p&gt;One of the main reasons I setup my own custom site, was to begin experimenting with SEO.  &lt;a href=&quot;http://en.wikipedia.org/wiki/Search_engine_optimization&quot;&gt;Search engine optimization&lt;/a&gt; is one of the primary ways to get new surfers to your website.&lt;/p&gt;  
&lt;p&gt;
What does that mean in practice?
&lt;/p&gt;
&lt;p&gt;
Trying to figure out ways to get your website listed higher in google search results.
&lt;/p&gt;
&lt;p&gt;
Usually this is done by getting people to link to you, as well as creating content for your website.  Preferably content that {gasp} is actually useful to someone other than yourself.  Part of the motivation for this very post, in fact :p.
&lt;/p&gt;
&lt;p&gt;
Other than creating content, I have also signed up for google's &lt;a href=&quot;http://www.google.com/webmasters/tools/&quot;&gt;Web Master Tools&lt;/a&gt;, and &lt;a href=&quot;http://www.google.com/analytics/&quot;&gt;Analytics&lt;/a&gt;.  I don't know if I've ever come across a serious web page that did not use google analytics, and I figured that google might rank me higher simply by having more information about my website.  Also I added a robots.txt to help the robots crawl the website, and soon I'll be adding a &lt;a href=&quot;http://en.wikipedia.org/wiki/Site_map&quot;&gt;site map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
We'll see how it goes, but I'm already watching my site move up in the results of different search queries!
&lt;/p&gt;

    </content>
  </entry>
  <entry>
    <title type="html">SchemaUpdate for NHibernate</title>
    <link rel="alternate" type="text/html" href="http://www.markdavidrogers.com/oxitesample/Blog/schemaupdate-for-nhibernate"/>
    <id>http://www.markdavidrogers.com/oxitesample/Blog/schemaupdate-for-nhibernate</id>
    <updated>2009-11-14T17:31:25.033Z</updated>
    <published>2009-10-05T11:36:00Z</published>
    <author>
      <name>Admin</name>
    </author>
    <category term="Fluent-Nhibernate" />
    <category term="Nhibernate" />
    <category term="SchemaExport" />
    <category term="SchemaUpdate" />
    <content type="html" xml:lang="en">
      &lt;p&gt;I was looking into how SchemaExport and SchemaUpdate work for NHibernate.Tool.hbm2ddl.  I'm about to put another website up and I wanted to be able to generate the database schema for the new site, instead of creating the tables by hand.  I've done this for a couple applications before, but I have to admit to only vaguely understanding how hbm2ddl works.  This is probably do to the almost total lack of documentation on these features, outside of a &lt;a href=&quot;http://www.hibernate.org/hib%5Fdocs/nhibernate/html/toolsetguide.html&quot;&gt;quick run-down&lt;/a&gt; in the nhibernate docs .&lt;/p&gt;

&lt;p&gt;At first glance it looks like Export generates SQL create table statements, and SchemaUpdate generates a bunch of update statements. But one thing I was curious about was whether or not SchemaUpdate would create new tables if they didn't exist.  After looking at the current nhibernate source code, it appears that SchemaUpdate iterates through each table and if the table exists in the destination database then it generates an update script, otherwise it generates a create script.&lt;/p&gt;

&lt;p&gt; NHibernate.Cfg.Configuration generates both the update, drop, and create scripts.  SchemaUpdate will connect to the database and check the database's metadata to see if the table exists.&lt;/p&gt;

&lt;p&gt;I also looked into Fluent Nhibernate's BuildSchema, curious to see how they approached it.  But it appears to be little more than a wrapper around SchemaExport.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Encryption Blues</title>
    <link rel="alternate" type="text/html" href="http://www.markdavidrogers.com/oxitesample/Blog/encryption-blues"/>
    <id>http://www.markdavidrogers.com/oxitesample/Blog/encryption-blues</id>
    <updated>2009-10-01T17:11:41.057Z</updated>
    <published>2009-10-01T10:02:00Z</published>
    <author>
      <name>Admin</name>
    </author>
    <category term="encryption" />
    <content type="html" xml:lang="en">
      Currently I'm trying to create a single-sign on solution, and I was having trouble because sometimes (but not always) the encrypted text would fail to decrypt.  I found out that the later .net versions have stricter checking for valid characters.  So when the encrypted byte array was converted to a string, the encoding process would create characters that the stricter decoding process did not like.

This &lt;a href=&quot;http://blogs.msdn.com/shawnfa/archive/2005/11/10/491431.aspx&quot;&gt;article&lt;/a&gt; on msdn's .net security blog finally helped me out.
    </content>
  </entry>
  <entry>
    <title type="html">First Post</title>
    <link rel="alternate" type="text/html" href="http://www.markdavidrogers.com/oxitesample/Blog/First"/>
    <id>http://www.markdavidrogers.com/oxitesample/Blog/First</id>
    <updated>2009-11-05T21:39:31.133Z</updated>
    <published>2009-09-04T09:09:00Z</published>
    <author>
      <name>Admin</name>
    </author>
    <category term="Oxite" />
    <content type="html" xml:lang="en">
      I Just set this thing up, now lets see if I can get it to do what I want.
    </content>
  </entry>
</feed>
