<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3931007295392828726</id><updated>2011-08-17T02:05:41.920-07:00</updated><category term='ignore case'/><category term='case insensitive'/><category term='copy me'/><category term='EMAIL'/><category term='digits in a long'/><category term='grammar parsing'/><category term='Microsoft'/><category term='tools'/><category term='research'/><category term='SQL'/><category term='GoDaddy'/><category term='new mode'/><category term='unbounded values'/><category term='WALKTHROUGH'/><category term='digits in a number'/><category term='NUnit alternative'/><category term='Gmail'/><category term='XMPP'/><category term='benchmark'/><category term='Schema'/><category term='Visual Studio 2010 Unit Test'/><category term='guess number'/><category term='number of digits'/><category term='Configuration'/><category term='C#'/><category term='number vs tostring'/><category term='SMTP'/><category term='Google Talk'/><category term='AI'/><category term='SSRS 2005'/><category term='conversation'/><category term='unit testing'/><category term='Linked Server'/><category term='digits in an int'/><category term='Repeat group level information to detail'/><category term='array contains'/><category term='trial-and-error'/><category term='HOWTO'/><title type='text'>dlastlee</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-3539019037374579391</id><published>2011-08-17T01:46:00.001-07:00</published><updated>2011-08-17T02:05:41.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HOWTO'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='Repeat group level information to detail'/><title type='text'>HOWTO: Repeat Group CountRows in Details</title><content type='html'>I had to create a report for a user that provided the number of rows in the group on each row in the group for SSRS 2005. For example, I needed to create a report with first name, last name, and the total count of first names.&lt;br /&gt;&lt;br /&gt;&lt;table style="border:1px solid black"&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;&lt;b&gt;fname&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;lname&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;count&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Andy&lt;/td&gt;&lt;td&gt;Smith&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Bob&lt;/td&gt;&lt;td&gt;Smith&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;  &lt;tr&gt;&lt;td&gt;Bob&lt;/td&gt;&lt;td&gt;Doe&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The method I ended up using was to create a group to aggregate by first names, then used the CountRows(scope) [NOTE: default table1_Group1] is to count the rows in the group. Finally, delete row [NOTE: not delete group].&lt;br /&gt;&lt;br /&gt;Another method is to create the group in the table properties [Groups Tab &gt; Add...]. This is where you can also edit the group list from the above method because you can no longer access it quickly from the table after deleting the row.&lt;br /&gt;&lt;br /&gt;Although the second method is cleaner, I left the first method in because that was the process I figured to get it to work then couldn't figure a way to get back to the group list. I just hope this either helps someone or that someone can provide a better process to do the reporting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-3539019037374579391?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/3539019037374579391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/08/howto-repeat-group-countrows-in-details.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/3539019037374579391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/3539019037374579391'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/08/howto-repeat-group-countrows-in-details.html' title='HOWTO: Repeat Group CountRows in Details'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-5454314764174167975</id><published>2011-08-10T20:52:00.000-07:00</published><updated>2011-08-10T21:40:47.448-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google Talk'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='XMPP'/><title type='text'>Research: XMPP</title><content type='html'>An interesting thought came up about interfacing with Google Talk (aka GTALK or GTALK) and did not realize how much reading is involved. As a person that enjoys to understand things to as fine detailed as possible, I ended up looking into XMPP. &lt;br /&gt;&lt;br /&gt;Here's a link to a very detailed information about XMPP:&lt;br /&gt;http://xmpp.org/rfcs/rfc6120.html&lt;br /&gt;&lt;br /&gt;There's a lot of information that already exists, there are two main C# projects that keeps coming up with existing code:&lt;br /&gt;&lt;a href="http://www.ag-software.de/agsxmpp-sdk/"&gt;MatriX&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jabber-net/downloads/list"&gt;Jabber-net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;MatriX had some EXE that it downloads. The installation requested to install something at which point I cancelled. I was looking for source code, and MatriX appeared to provide source for the client portion but not the XMPP.&lt;br /&gt;&lt;br /&gt;Since I was looking for more about code examples of XMPP, I continued to search and found Jabber-net. It's open source included all the communications, easy ZIP file to download, and provides solution for VS 2003 and 2005. There were no problems converting 2005 to VS 2010 after changing the target framework and deleting the VB project. I haven't actually executed the project yet because I've been distracted by other new items.&lt;br /&gt;&lt;br /&gt;C#'s square bracket for attributes was something I've seen commonly but haven't actually sat down to learn and understand. This site was rather helpful in understanding that stuff:&lt;br /&gt;&lt;a href="http://www.csharphelp.com/2007/05/the-c-attribute/"&gt;csharphelp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I can use some uses, but I am not fully comfortable with its use yet so some more time needs to be spent on that.&lt;br /&gt;&lt;br /&gt;Another interesting piece of code I looked into was their own implementation of the doubly linked list. Not exactly sure why they did not use C# System.Collection LinkedList&lt;T&gt; which I am not too familiar with either [I mean C#'s implementation. I know what they are, just haven't had to the need for them in C# projects thus far]. I am going to hazard a guess that C#'s is not doubly-linked.&lt;br /&gt;&lt;br /&gt;Either way, it is interesting how they expanded on the Queue class (but in actuality, technically not expand but rather re-implemented it). &lt;br /&gt;&lt;br /&gt;Anyways, there is a lot to read and updating myself on. Hopefully it won't distract me too long from other projects. Another item on the horizon is possibly looking into interfacing with twitter (and other similar social networking sites) and facebook (although the latter seems like it would take some work to do anyways). Others just include statement parsing as that keep running into that when I want to interpret incoming messages. And of course, still need to interface with database. So lots still to do.  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-5454314764174167975?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/5454314764174167975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/08/research-xmpp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/5454314764174167975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/5454314764174167975'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/08/research-xmpp.html' title='Research: XMPP'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-6525737223829743609</id><published>2011-08-09T20:03:00.000-07:00</published><updated>2011-08-09T20:13:56.766-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010 Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='NUnit alternative'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='unbounded values'/><category scheme='http://www.blogger.com/atom/ns#' term='trial-and-error'/><title type='text'>Tools: Unit Testing</title><content type='html'>I also started using Visual Studio 2010's Unit Testing. It is very similar to NUnit in structure and execution. The nice thing is that it is fully integrated so not compiling and configuration. It is basically just a combination of right-clicks and wizards/context-menus... very intuitive from a tiny experience with NUnit.&lt;br /&gt;&lt;br /&gt;It was also nice to make use of some of the material I learned from my research in Unit Testing for a course I took for my graduate program: create a failed test then a working test. The number of test cases does get complicated when dealing with more subjective and unbounded cases (especially when it is the computer that limits the bound). For example, finding the number of digits in a number does not have any extreme bounds. It is limited by the size of the number type or if using string then the amount of memory, not by the criteria of the problem being solved. So except for the obvious 0, 1, -1, some positive value, and some negative value... testing the upper bounds although possible in some cases just seemed a bit awkward. To make it somewhat easier to catch people from actually breaking it, I put in limitations to the values that can be entered.&lt;br /&gt;&lt;br /&gt;One of the things I enjoy doing (not good practice) is learning code through trial-and-error in the project. Unit testing makes this even easier in that I can just fidget with different parameters to see make sure that I get the same results back without having to re-enter data each time. Once the test is set up, it is just a matter of right-clicking and run the test. You could even write the code in the unit test but that requires more work later in that I have to then reincorporate it to the main code and write tests again.&lt;br /&gt;&lt;br /&gt;Anyways, my quick two cents on this matter. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-6525737223829743609?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/6525737223829743609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/08/tools-unit-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/6525737223829743609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/6525737223829743609'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/08/tools-unit-testing.html' title='Tools: Unit Testing'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-5179760327715689541</id><published>2011-08-09T15:59:00.001-07:00</published><updated>2011-08-09T20:03:01.100-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='digits in a long'/><category scheme='http://www.blogger.com/atom/ns#' term='number vs tostring'/><category scheme='http://www.blogger.com/atom/ns#' term='digits in a number'/><category scheme='http://www.blogger.com/atom/ns#' term='digits in an int'/><category scheme='http://www.blogger.com/atom/ns#' term='number of digits'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>Benchmarking: Number of digits in a number</title><content type='html'>I've been curious about benchmarking certain code to see if which methods are better but just never got around to it. This is my first attempt because I wanted to know the efficiency of my method.&lt;br /&gt;&lt;br /&gt;The algorithm I am trying to test is to find the number of digits in a number (in my case of type long). Initially I tried to put in some hard-coded "random" numbers and the results came almost eventually with the mathematical approach to be slightly faster. Then I entered some larger numbers and the results became clearer.&lt;br /&gt;&lt;br /&gt;Approach #1 (mathematically):&lt;br /&gt;I used division until the value reached 0 to determine the length of the number.&lt;br /&gt;&lt;br /&gt;Approach #2 (convert to string):&lt;br /&gt;I used a ToString function to find the length of the string.&lt;br /&gt;&lt;br /&gt;Code to Approach #1:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:   public static int NumberOfDigits(long Number)  &lt;br /&gt;2:      {  &lt;br /&gt;3:        long temp = System.Math.Abs(Number);  &lt;br /&gt;4:        int counter = 0;  &lt;br /&gt;5:        while (temp &amp;gt; 0)  &lt;br /&gt;6:        {  &lt;br /&gt;7:          temp = temp / 10;  &lt;br /&gt;8:          counter++;  &lt;br /&gt;9:        }  &lt;br /&gt;10:        if (Number == 0) { counter = 1; }  &lt;br /&gt;11:        return counter;  &lt;br /&gt;12:      }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Code to Approach #2:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:      public static int NumberOfDigits_V2(long Number)  &lt;br /&gt;2:      {  &lt;br /&gt;3:        string temp = System.Math.Abs(Number).ToString();  &lt;br /&gt;4:        return temp.Length;  &lt;br /&gt;5:      }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Benchmark includes 105 different values including negative, zero, and positive values. Running 10,000,000 calculations of the preset 105 values.&lt;br /&gt;&lt;br /&gt;The results in milliseconds:&lt;br /&gt;#1&lt;br /&gt;1387.0793&lt;br /&gt;1733.0992&lt;br /&gt;&lt;br /&gt;#2&lt;br /&gt;1416.081&lt;br /&gt;1806.1033&lt;br /&gt;&lt;br /&gt;#3&lt;br /&gt;1422.0813&lt;br /&gt;1804.1032&lt;br /&gt;&lt;br /&gt;Conclusion, converting to string takes longer than the actual calculations but both takes less than a fifth of a millisecond. The code for the string conversion is much simpler and may be preferable for more readability. &lt;br /&gt;&lt;br /&gt;Tests can be run from &lt;a href="http://www.dlastlee.com"&gt;http://www.dlastlee.com&lt;/a&gt; and type in &lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt;run test1&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-5179760327715689541?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/5179760327715689541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/08/benchmarking-number-of-digits-in-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/5179760327715689541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/5179760327715689541'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/08/benchmarking-number-of-digits-in-number.html' title='Benchmarking: Number of digits in a number'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-9161248554517740790</id><published>2011-07-29T19:12:00.000-07:00</published><updated>2011-07-29T20:15:14.578-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='grammar parsing'/><category scheme='http://www.blogger.com/atom/ns#' term='case insensitive'/><title type='text'>In development: Parsing statements</title><content type='html'>The singleton and events have been implemented. It appears to be working.&lt;br /&gt;&lt;br /&gt;As I try to create response patterns, I quickly deviated to parsing messages to handle multiple statements. Some helpful code that helps make this easier is comparing strings without case-insensitivity:&lt;br /&gt;&lt;br /&gt;return sText01.Contains&lt;string&gt;(sText02, StringComparer.InvariantCultureIgnoreCase);&lt;br /&gt;&lt;br /&gt;Another helpful code is the ability to search by specific properties within an object:&lt;br /&gt;&lt;br /&gt;Message msg = _Brain.Dialogues[SessionId].History.Find(&lt;br /&gt;                    delegate(Message msg2)&lt;br /&gt;                    {&lt;br /&gt;                        return msg2.Value == "Existing message here";&lt;br /&gt;                    }&lt;br /&gt;                    );&lt;br /&gt;&lt;br /&gt;Once I attempted to break out any multiple statements, I tried to break statements into subject, verb, etc. Quickly this got out of hand too since I do not have all the information I need.&lt;br /&gt;&lt;br /&gt;Focusing back at just giving some simple commands, the next step is to start creating the back-end stuff. This might take a while as I'd like to see the capabilities of linq.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-9161248554517740790?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/9161248554517740790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/07/in-development-parsing-statements.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/9161248554517740790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/9161248554517740790'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/07/in-development-parsing-statements.html' title='In development: Parsing statements'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-5291357135001109292</id><published>2011-07-28T18:20:00.000-07:00</published><updated>2011-07-28T18:49:42.836-07:00</updated><title type='text'>In development: Adding events and singleton</title><content type='html'>I diverged a little from creating static responses while thinking how to generate a learning type of AI. Now that I separated the MW from the UI, I thought it would be interesting to try to design the MW more like a person. Thus I created a brain where most of the functions or generated.&lt;br /&gt;&lt;br /&gt;In the brain, I started with generic senses of touch, smell, see, hear, and taste. Besides hear, the others senses will just currently be not implemented. I just thought it interesting to leave it open for possible future enhancements. Hear and see are very plausible.&lt;br /&gt;&lt;br /&gt;For output, I only added speak at this time because there are no other simplified generic list of outputs.&lt;br /&gt;&lt;br /&gt;The next step was difficult as I read through the different senses, brain, thought, and philosophy of thought. There is little that we fully understand so at this point, I just decided on what I am most comfortable and familiar with. It may be completely wrong but might as well figure out why it's wrong that thinking it all through.&lt;br /&gt;&lt;br /&gt;I went with creating a conscience as a separate entity that "listens" to certain brain functions. The internal working of the brain, I will classify as sub-conscience although I could separate it out but that can be implemented later.&lt;br /&gt;&lt;br /&gt;Since my AI will just have one brain and one conscience, I made these singleton types so that only one instance is guaranteed. The conscience will access certain parts of the brain, in particular the listening buffer. An event is created whenever the brain hears something. Another event is a timer to periodically check certain statuses (primarily create responses when silence has reached a certain period of time).&lt;br /&gt;&lt;br /&gt;The step I am considering now is about memory. I am leaning towards creating a sensory, short-term and long-term memory architect. Sensory would be the instant responses like hi, hello... perhaps just recalling that we had already greeted at some point. Short-term will be things discussed but not beyond the conversation. Could potentially add a limit to the queue to "forget" certain things if the conversation becomes long but that's another phase. Long term will be important facts stored in the data-base. I haven't quite figured how to release all this yet though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-5291357135001109292?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/5291357135001109292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/07/in-development-adding-events-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/5291357135001109292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/5291357135001109292'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/07/in-development-adding-events-and.html' title='In development: Adding events and singleton'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-1420647016493727989</id><published>2011-07-16T20:17:00.000-07:00</published><updated>2011-07-16T20:35:50.461-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AI'/><category scheme='http://www.blogger.com/atom/ns#' term='ignore case'/><category scheme='http://www.blogger.com/atom/ns#' term='new mode'/><category scheme='http://www.blogger.com/atom/ns#' term='guess number'/><category scheme='http://www.blogger.com/atom/ns#' term='array contains'/><category scheme='http://www.blogger.com/atom/ns#' term='copy me'/><category scheme='http://www.blogger.com/atom/ns#' term='conversation'/><title type='text'>New interaction, plus two new modes, minus some responses</title><content type='html'>&lt;a href="http://www.dlastlee.com"&gt;http://www.dlastlee.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The interaction has been updated as previously mentioned. Took some time to modify the AJAX interface to play the way I want to. There is a two second delay to allow users to send multiple messages before the AI responds. &lt;br /&gt;&lt;br /&gt;To test this, I have created a mode to copy the user. By sending a message to "copy me", the AI will switch to a mode to copy the user. The user messages are queued, then the AI will respond in the same order. The mode will last a random number of times with a maximum of 15 before it gets "tired" of playing.&lt;br /&gt;&lt;br /&gt;To further additional modes, a simple game was also implemented. This can be triggered by entering "play guess number". It is not complete, but the portion to generate a random number and allow the user to guess is published. Depending on the number of guesses, a different response is given. The breaks are if you finish within 20% of the possible numbers, 50%, and just completing.&lt;br /&gt;&lt;br /&gt;Responses have also been modified to allow multiple responses, although a delay has not been implemented. They will appear almost instantly. I may or may not modify this in the future as it's more a UI modification.&lt;br /&gt;&lt;br /&gt;I have also separated the library of messages to its own static class. A useful functionality I found was also searching arrays with ignoring cases:&lt;br /&gt;array.Contains("str", StringComparer.InvariantCultureIgnoreCase);&lt;br /&gt;array.Contains("str", StringComparer.OrdinalIgnoreCase);&lt;br /&gt;array.Contains("str", StringComparer.CurrentCultureIgnoreCase);&lt;br /&gt;[[source: http://stackoverflow.com/questions/952679/how-can-i-make-array-contains-case-insensitive-on-a-string-array]]&lt;br /&gt;&lt;br /&gt;There is a lot of places for improvements in the response. One of the tricky parts of redundancies in similar terms with almost the same definitions. A simple example is different ways to agree to a question (e.g. y, yes, Y, Yes, of course, definitely, sure, why not, etc.). Besides case sensitivity, there is also misspelling. If a user mistypes yes as yse (sic), it is still highly possible it was meant to be yes.  This is especially more useful for larger words. Another case is for words that are commonly misspelled or have multiple ways of spelling. To understand that a person may be speaking of Johnathon but may spell the name as Jon or John, Jonny, etc. Or "their" vs "there".&lt;br /&gt;&lt;br /&gt;Next step will primarily be concentrating on how a figuring out the topic of the conversation, learning more of the user, and maybe start on some database stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-1420647016493727989?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/1420647016493727989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/07/new-interaction-plus-two-new-modes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/1420647016493727989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/1420647016493727989'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/07/new-interaction-plus-two-new-modes.html' title='New interaction, plus two new modes, minus some responses'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-6631417189053251327</id><published>2011-07-11T12:54:00.000-07:00</published><updated>2011-07-11T14:21:16.966-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AI'/><category scheme='http://www.blogger.com/atom/ns#' term='conversation'/><title type='text'>Attempting at a basic conversation AI</title><content type='html'>After finally saving enough to buy and build a system, I went over the long list of ideas that I've been wanting to build. I went through many iterations, and one that I seem to have got stuck on is building a conversational AI.&lt;br /&gt;&lt;br /&gt;There are some things in life that a person just wants to see what he's capable of and this is one of those things for me. So please no solutions; maybe a gentle nudge or better yet a challenging question to my methods.&lt;br /&gt;&lt;br /&gt;So I have been working on this for a couple weeks on and off. My first version of course was very simple model to respond to the user's response. This is primarily to set up my development environment and make sure things work. I worked through a few kinks in the JavaScript side.&lt;br /&gt;&lt;br /&gt;I then attempted to start building lists of similar texts so that there is more dynamic responses. I simply used the Random class to generate which text to pick. Some examples include greetings like "hi", "hey", "hello", etc.&lt;br /&gt;&lt;br /&gt;Then there were certain user messages (i.e. statements or questions) that have similar meanings thus the response would be the same set: "How are you?", "How're you?", "How're you feeling?", "What's up?", etc.&lt;br /&gt;&lt;br /&gt;The latest obstacle was handling multiple level questions. If a user responds to a question, then the user's message is dependent on the question. Thus I have to remember what I asked to respond properly. If the user responds "Yes", I will need to provide a response appropriate to the question asked (e.g. "Are you bored?", "Are you hungry?"). It wouldn't be right to say "Go eat something" when I asked "Are you bored?". &lt;br /&gt;&lt;br /&gt;Next step is to add a back-end to the application. Recently, I just haven't had time to take a break from developing the middle-ware.&lt;br /&gt;&lt;br /&gt;I also need to vamp up the front-end to better handle a different style of conversation. Currently the message-response model cannot handle someone that splits ideas among several lines. This requires a lot of change to the conversation topics. In the mean-time, the AI should be able to send multiple messages. &lt;br /&gt;&lt;br /&gt;It'll probably be a while till my next code update.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-6631417189053251327?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/6631417189053251327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2011/07/attempting-at-basic-conversation-ai.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/6631417189053251327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/6631417189053251327'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2011/07/attempting-at-basic-conversation-ai.html' title='Attempting at a basic conversation AI'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-1761827492258251290</id><published>2010-11-12T13:00:00.001-08:00</published><updated>2010-11-12T13:07:19.122-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Schema'/><category scheme='http://www.blogger.com/atom/ns#' term='Linked Server'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Query Schema for table on a Linked Server</title><content type='html'>SQL SERVER: MS SQL 2005&lt;br /&gt;Precondition: Linked Server already configured (There are plenty of resources online)&lt;br /&gt;Reason for post: Difficult to find solutions, mostly found how to configure with a couple with how to access but didn't work for me; used following queries:&lt;br /&gt;"Linked Server query"&lt;br /&gt;"access Linked Server"&lt;br /&gt;"MS SQL linked server query"&lt;br /&gt;&lt;br /&gt;My Issue: I needed to access a scalar data on a table from another SQL server with Linked Server already configured&lt;br /&gt;&lt;br /&gt;My Solution:&lt;br /&gt;SELECT field FROM [Linked Server Name].[Database Name].[User (typically dbo)].[Table Name]&lt;br /&gt;&lt;br /&gt;Post-Mortem: The solution is so obvious after I got it to work, but I'm sure I'll forget anyways in about 10 years.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-1761827492258251290?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/1761827492258251290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2010/11/query-schema-for-table-on-linked-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/1761827492258251290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/1761827492258251290'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2010/11/query-schema-for-table-on-linked-server.html' title='Query Schema for table on a Linked Server'/><author><name>Douglas Lee</name><uri>http://www.blogger.com/profile/10554105680370535003</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3931007295392828726.post-8586461345585437135</id><published>2009-07-31T09:26:00.001-07:00</published><updated>2010-11-12T08:40:10.654-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='GoDaddy'/><category scheme='http://www.blogger.com/atom/ns#' term='EMAIL'/><category scheme='http://www.blogger.com/atom/ns#' term='Gmail'/><category scheme='http://www.blogger.com/atom/ns#' term='WALKTHROUGH'/><title type='text'>Gmail / GoDaddy - Settings to configure Gmail to use GoDaddy's SMTP</title><content type='html'>1. smtpout.secureserver.net&lt;br /&gt;2. Select port 465&lt;br /&gt;3. Enter your email address&lt;br /&gt;4. Enter your password&lt;br /&gt;5. Enable SSL&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;You get this error if you unselect SSL and use Port 25:&lt;/span&gt;&lt;br /&gt;Authentication failed. Please check your username/password.&lt;br /&gt;[Server response: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 500 Remote server does not support TLS (state 6). code(500) ] &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;You get this error if you select SSL and use port 465:&lt;/span&gt;&lt;br /&gt;Authentication failed. Please check your username/password.&lt;br /&gt;[Server response: 451 Internal error. code(451) ] &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;You get this error if you use the incorrect SMPT Server:&lt;/span&gt;&lt;br /&gt;Your other email provider is responding too slowly. Please try again later, or contact the administrator of your other domain for further information.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3931007295392828726-8586461345585437135?l=dlastlee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlastlee.blogspot.com/feeds/8586461345585437135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlastlee.blogspot.com/2009/07/gmail-godaddy-settings-to-configure.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/8586461345585437135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3931007295392828726/posts/default/8586461345585437135'/><link rel='alternate' type='text/html' href='http://dlastlee.blogspot.com/2009/07/gmail-godaddy-settings-to-configure.html' title='Gmail / GoDaddy - Settings to configure Gmail to use GoDaddy&apos;s SMTP'/><author><name>id1337</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry></feed>
