<?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/"
	>

<channel>
	<title>sanschagrin.com</title>
	<atom:link href="http://www.sanschagrin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sanschagrin.com</link>
	<description>Welcome to our web site. Feel free to peruse and we hope you enjoy.</description>
	<lastBuildDate>Mon, 09 Apr 2012 21:01:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>From our trip to Vermont in August 2011</title>
		<link>http://www.sanschagrin.com/2012/04/09/from-our-trip-to-vermont-in-august-2011/</link>
		<comments>http://www.sanschagrin.com/2012/04/09/from-our-trip-to-vermont-in-august-2011/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 20:55:54 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Trip Reports]]></category>
		<category><![CDATA[Lake Champlain]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[Vermont]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1765</guid>
		<description><![CDATA[<p>I finally managed to post a Trip Report and some Photosfrom our trip last August.We rented a cottage in Addison VT right on Lake Champlain. We had a great time.</p> <p class="wp-caption-text">Our cottage&#39;s bay at sunset</p> <p class="wp-caption-text">Kyle enjoying some fishing</p> <p>&#160;</p> [...]]]></description>
			<content:encoded><![CDATA[<p>I finally managed to post a <a title="Aug &amp; Sep 2011: Vermont – Trip report" href="http://www.sanschagrin.com/travel/aug-sep-2011-vermont-trip-report/">Trip Report</a> and some <a title="Aug &amp; Sep 2011: Vermont" href="http://www.sanschagrin.com/photos/travel-photos/north-america/aug-sep-2011-vermont/">Photos</a>from our trip last August.We rented a cottage in Addison VT right on Lake Champlain. We had a great time.</p>
<div class="wp-caption alignleft" style="width: 378px"><a href="http://www.sanschagrin.com/photos/travel-photos/north-america/aug-sep-2011-vermont/"><img class=" " src="http://www.sanschagrin.com/wordpress/wp-content/gallery/aug-sep-2011-vermont/350D_1_20110829_IMG_27124.jpg" alt="" width="368" height="200" /></a><p class="wp-caption-text">Our cottage&#39;s bay at sunset</p></div>
<div class="wp-caption alignright" style="width: 143px"><a class="thickbox" href="http://www.sanschagrin.com/wordpress/wp-content/gallery/aug-sep-2011-vermont/PSA590IS_20110903_IMG_2188.jpg"><img src="http://www.sanschagrin.com/wordpress/wp-content/gallery/aug-sep-2011-vermont/thumbs/thumbs_PSA590IS_20110903_IMG_2188.jpg" alt="Another fish" width="133" height="200" /></a><p class="wp-caption-text">Kyle enjoying some fishing</p></div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2012/04/09/from-our-trip-to-vermont-in-august-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brief update and a few photos</title>
		<link>http://www.sanschagrin.com/2012/02/28/brief-update-and-a-couple-of-photos/</link>
		<comments>http://www.sanschagrin.com/2012/02/28/brief-update-and-a-couple-of-photos/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 03:48:37 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Update]]></category>
		<category><![CDATA[Kyle]]></category>
		<category><![CDATA[pho]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1695</guid>
		<description><![CDATA[<p>It&#8217;s been a while since I did any kind of an update. Not that that much has changed in the past few months. We had a very nice Christmas, with Jack and Mary Lou coming up for some of the time. We both get the week between Christmas and New Years off, which is always [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since I did any kind of an update. Not that that much has changed in the past few months. We had a very nice Christmas, with Jack and Mary Lou coming up for some of the time. We both get the week between Christmas and New Years off, which is always nice. (Well &#8230; Suzanne actually has to take it as part of her vacation time as the plant is shut down.)</p>
<p>In late January, we had a wonderful birthday party for Kyle. It happened to be on the <strong>one</strong> day of snow we had all year, but the roads were decent enough to get around and no one was coming from very far. We had a science, mostly chemistry, themed party with a bunch of experiments making some kind of goo. Several people from my work loaned by stuff which was great. Suzanne did a wonderful job organizing it. I don&#8217;t have many photos as I was busy helping the entire time.</p>
<div id="attachment_1696" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-1696 " title="Kyle's birthday party" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2012/02/350D_1_20120121_IMG_27986-300x200.jpg" alt="" width="300" height="200" /><p class="wp-caption-text">Kyle&#39;s birthday party</p></div>
<div id="attachment_1697" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-1697 " title="Kyle and Robby at Kyle's birthday party" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2012/02/350D_1_20120121_IMG_27992-300x200.jpg" alt="" width="300" height="200" /><p class="wp-caption-text">Kyle and Robby at Kyle&#39;s birthday party</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Last weekend, Kyle had another party to go to at a bowling alley in Garwood. He had a great time. It worked out very well for us too as it was 4:30-6:00. Suzanne and I were able to leave a grab an early dinner at a nearby (excellent) Asian-fusion place by ourselves. Many kudos to Mikey&#8217;s parents. Sunday, we visited what will be Kyle&#8217;s day camp for most of the summer. It&#8217;s a <strong>really</strong> nice place (<a title="Oak Crest Day Camp" href="http://www.oakcrestdaycamp.com/index.php" target="_blank">Oak Crest Day Camp</a>), but not cheap. (At least his school year costs will drop a lot next year with full day school.)</p>
<p><img src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2012/02/IMG_2415-300x225.jpg" alt="" title="" width="300" height="225" class="alignleft size-medium wp-image-1714" /><img src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2012/02/IMG_2416-300x225.jpg" alt="" title="" width="300" height="225" class="alignright size-medium wp-image-1715" /><br />
&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;<br />
Not too many plans for the near future. It looks like we&#8217;ll be heading our west to the Grand Canyon and southern Utah at the end of the summer. We&#8217;re still working on airline tickets, but we&#8217;re pretty excited. (Okay, maybe that wasn&#8217;t so brief.)</p>
<p>Extra: I had to toss in the one last photo of me at a recent metal (Megadeth &amp; Motorhead) concert.<br />
<img alt="" src="https://lh4.googleusercontent.com/-dtcjADYDOE4/TzMtfTv6fwI/AAAAAAAAALw/hnrq5heXWSc/s490/GigantourLowell.jpg" title="Me at Gigantour (Megadeth &#038; Motorhead)" class="alignleft" width="490" height="327" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2012/02/28/brief-update-and-a-couple-of-photos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Some more photos of Kyle</title>
		<link>http://www.sanschagrin.com/2012/01/18/some-more-photos-of-kyle/</link>
		<comments>http://www.sanschagrin.com/2012/01/18/some-more-photos-of-kyle/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 19:03:52 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Kyle]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1689</guid>
		<description><![CDATA[<p>I just posted photos of Kyle from November &#38; December including our visit to the Sterling Hill Mining Museum and Christmas. Now I&#8217;m all caught up, just in time for his birthday party this weekend.</p> <p></p> [...]]]></description>
			<content:encoded><![CDATA[<p>I just posted photos of Kyle from <a href="http://www.sanschagrin.com/kyle/kyle-nov-dec-2011/">November &amp; December</a> including our visit to the <a href="http://sterlinghillminingmuseum.org/">Sterling Hill Mining Museum</a> and Christmas. Now I&#8217;m all caught up, just in time for his birthday party this weekend.</p>
<p><a class="thickbox" rel="" href='http://www.sanschagrin.com/wordpress/wp-content/gallery/kyle-2011-1112/PSA590IS_20111110_IMG_2388.jpg' title=''><img src='http://www.sanschagrin.com/wordpress/wp-content/gallery/kyle-2011-1112/thumbs/thumbs_PSA590IS_20111110_IMG_2388.jpg' alt='At the Sterling Hill Mining Museum' class='ngg-singlepic ngg-left' /></a><a class="thickbox" rel="" href='http://www.sanschagrin.com/wordpress/wp-content/gallery/kyle-2011-1112/PSA590IS_20111212_IMG_2412.JPG' title=''><img src='http://www.sanschagrin.com/wordpress/wp-content/gallery/kyle-2011-1112/thumbs/thumbs_PSA590IS_20111212_IMG_2412.JPG' alt='Kyle &amp; Santa at Macy&#039;s' class='ngg-singlepic ngg-left' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2012/01/18/some-more-photos-of-kyle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kyle &amp; Fire Truck Santa</title>
		<link>http://www.sanschagrin.com/2011/12/19/kyle-fire-truck-santa/</link>
		<comments>http://www.sanschagrin.com/2011/12/19/kyle-fire-truck-santa/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 03:13:38 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[Kyle]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1677</guid>
		<description><![CDATA[<p>Just a quick photo of Kyle and Fire Truck Santa from last Saturday.</p> <p style="text-align: center;"></p> ]]></description>
			<content:encoded><![CDATA[<p>Just a quick photo of Kyle and Fire Truck Santa from last Saturday.</p>
<p style="text-align: center;"><a href="http://www.sanschagrin.com/wordpress/wp-content/uploads/2011/12/IMG_7898.jpg"><img class="aligncenter size-medium wp-image-1678" title="Kyle and Fire Truck Santa" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2011/12/IMG_7898-200x300.jpg" alt="" width="200" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2011/12/19/kyle-fire-truck-santa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS 601 &#8211; MySQL INSERT &#8230; SET syntax</title>
		<link>http://www.sanschagrin.com/2011/12/15/cs-601-mysql-insert-set-syntax/</link>
		<comments>http://www.sanschagrin.com/2011/12/15/cs-601-mysql-insert-set-syntax/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 14:13:04 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[BU MET CS 601 Fall 2011]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1667</guid>
		<description><![CDATA[<p>While working on my project, I came across the following. The standard syntax for inserting items into a database is something akin to:</p> INSERT INTO tblMyTable (FirstName, LastName, Email, Phone) VALUES ('John', 'Doe', 'johndoe@gmail.com', '1234567890') <p>This is standard SQL. However, MySQL has an alternative syntax using SET which is similar to the UPDATE syntax:</p> INSERT [...]]]></description>
			<content:encoded><![CDATA[<p>While working on my project, I came across the following. The standard syntax for inserting items into a database is something akin to:</p>
<pre>
INSERT INTO tblMyTable (FirstName, LastName, Email, Phone)
     VALUES ('John', 'Doe', 'johndoe@gmail.com', '1234567890')
</pre>
<p>This is standard SQL. However, MySQL has an alternative syntax using SET which is similar to the UPDATE syntax:</p>
<pre>
INSERT INTO tblMyTable SET
       FirstName = 'John',
       LastName  = 'Doe',
       Email = 'johndoe@gmail.com',
       Phone = '1234567890'
</pre>
<p>I ended up using the alternative syntax throughout my project. Why? I felt it is <b>much</b> cleaner and easier to read than the standard syntax, especially when removing a column to insert. (When adding a column, it&#8217;s easy enough to add them to the end of the lists.) It should also greatly reduce errors from incorrect ordering between column names and values since they&#8217;re right next to each other. I realize that using MySQL specific syntax would break the site if it was moved to another database, but I don&#8217;t feel that was a concern for this project. In the real world, especially dealing with projects that are commercial and may/will grow larger, it might not be a good idea.</p>
<p>Here&#8217;s an example from my actual code:</p>
<pre>
$query = &lt;&lt;&lt;EOT
    INSERT INTO tblReservations SET
        dtReservationDateTime = FROM_UNIXTIME($datetimeunix),
        intPartySize = {$_POST['numparty']},
        intCustomerID = &quot;{$_POST['userid']}&quot;,
        vcReservationNameFirst = &quot;{$_POST['firstname']}&quot;,
        vcReservationNameLast = &quot;{$_POST['lastname']}&quot;,
        vcReservationEmail = &quot;{$_POST['email']}&quot;,
        chReservationPhone = $phone,
        vcComments = &quot;{$_POST['comment']}&quot;,
        dtReservationDateTimeMade = NOW()
EOT;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2011/12/15/cs-601-mysql-insert-set-syntax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS 601 &#8211; JQuery UI Datepicker &#8211; Blocking Dates</title>
		<link>http://www.sanschagrin.com/2011/12/06/cs-601-jquery-ui-datepicker-blocking-dates/</link>
		<comments>http://www.sanschagrin.com/2011/12/06/cs-601-jquery-ui-datepicker-blocking-dates/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 23:02:35 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[BU MET CS 601 Fall 2011]]></category>
		<category><![CDATA[datepicker]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1662</guid>
		<description><![CDATA[<p>One of the things I wanted to do is to block certain dates from being enabled in the JQuery UI Datepicker widget. There is built-in functionality for blocking weekends, but not for particular dates, e.g., Christmas. Some web searching led me to a fairly easy solution. The widget has an option for providing a function [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I wanted to do is to block certain dates from being enabled in the JQuery UI Datepicker widget. There is built-in functionality for blocking weekends, but not for particular dates, e.g., Christmas. Some web searching led me to a fairly easy solution. The widget has an option for providing a function to call before a date is shown. Here is my widget constructor:</p>
<pre>
$('#datepicker').datepicker({
                inline: true,
                showOn: "both",
                buttonImage: "/cafemarburg/images/calendar.jpg",
                minDate: +1,
                maxDate: +180,
                beforeShowDay: checkClosedDates
        });
</pre>
<p>checkClosedDates is a function that returns an array of the form [true/false, a class to add, a tooltip message], the last two being optional. It takes the date (as a Javascript object) as a parameter.<br />
Here is the function call:</p>
<pre>
var closedFullDates = new Array(); // Used for one-time closures or irregular scheduled holidays
var closedYearlyDates = new Array('12-25','7-4'); // Used to regular holidays (e.g., Christmas)
var closedDaysOfWeek = new Array('0')
function checkClosedDates(date) {
 var blocked = false;
 var ymd = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate();
 var md = (date.getMonth()+1) + '-' + date.getDate();
 if ($.inArray(ymd,closedFullDates) > -1) {
     blocked = true;
 } else if ($.inArray(md,closedYearlyDates) != -1) {
     blocked = true;
 } else if ($.inArray(String(date.getDay()),closedDaysOfWeek) != -1) {
     blocked = true;
 }
 if (blocked) {
    return [false,'dpClosedDate','Sorry, we are closed that day.'];
 } else {
     return [true];
 }
}
</pre>
<p>As can be seen, I use three separate arrays. One is for one-time events or events that change date year to year. Another is for dates that occur on the same date. The third is for days of the week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2011/12/06/cs-601-jquery-ui-datepicker-blocking-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS 601 &#8211; PHP Multiline Strings</title>
		<link>http://www.sanschagrin.com/2011/12/05/cs-601-php-multiline-strings/</link>
		<comments>http://www.sanschagrin.com/2011/12/05/cs-601-php-multiline-strings/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 05:50:19 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[BU MET CS 601 Fall 2011]]></category>
		<category><![CDATA[cs 601 project]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1658</guid>
		<description><![CDATA[<p>During the course of my project, I had many instances of needing to write very long strings, often when constructing moderately complex MySQL queries. There are several way to do this. One would be repeated each statements or assignment with .= . Another would be running the echo/assignment over multiple lines by using . at [...]]]></description>
			<content:encoded><![CDATA[<p>During the course of my project, I had many instances of needing to write very long strings, often when constructing moderately complex MySQL queries. There are several way to do this. One would be repeated each statements or assignment with .= . Another would be running the echo/assignment over multiple lines by using . at the end of each until the final one (ended with ;&nbsp;). Example:</p>
<pre>
$mystr = 'Here is a really long line of text that runs to '.
         'more than one line';
</pre>
<p>I found a very clean and convenient way is to use PHP&#8217;s heredoc syntax. Here&#8217;s an example:</p>
<pre>
$query = &lt;&lt;&lt;EOT
        SELECT * FROM tblOrderItems
        INNER JOIN tblFoodItems
                ON tblFoodItems.intFoodItemID = tblOrderItems.intFoodItemID
        INNER JOIN tblFoodCategories
                ON tblFoodCategories.intFoodCategoryID = tblFoodItems.intFoodCategoryID
        INNER JOIN tblFoodCategoryOrder
                ON tblFoodCategoryOrder.intFoodCategoryID = tblFoodCategories.intFoodCategoryID
        WHERE intOrderID = {$order['intOrderID']}
        ORDER BY tblFoodCategoryOrder.intFoodCategoryOrder, tblFoodItems.vcFoodItemName
EOT;
</pre>
<p>There&#8217;s a few things to note:</p>
<ul>
<li>The EOT is arbitrary as long as both instances are the same. (I use EOT for &#8220;end of text&#8221;.)</li>
<li>Variables can be included in the string. A simple variable is simply included as $myvar. Here, I use the {} to separate out a &#8220;complex&#8221; variable. (I didn&#8217;t realize this could be done until later on, so for some of my earlier instances, I set it to a simpler variable immediately before the heredoc declaration.)</li>
<li>The terminator (here EOT;) <b>MUST</b> be on a line by itself with no leading or trailing whitespace. This cannot be emphasized enough. Leading whitespace is pretty easy to spot, but several times NetBeans added trailing whitespace which wasn&#8217;t obvious in and of itself. (NetBeans does color the heredoc string differently, so you will see the &#8220;carry over&#8221;.) I finally got in the habit of checking.</li>
</ul>
<p>PHP &ge; 5.3.0 also has the nowdoc syntax. It&#8217;s very similar to heredoc except is uses $myvar = &lt;&lt;&lt;&#8217;EOT&#8217; (note the single quotes). The difference is that variables are not expanded akin to standard single quoted strings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2011/12/05/cs-601-php-multiline-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS601 &#8211; Delete Current Element from DOM</title>
		<link>http://www.sanschagrin.com/2011/11/30/cs601-delete-current-element-from-dom/</link>
		<comments>http://www.sanschagrin.com/2011/11/30/cs601-delete-current-element-from-dom/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 06:22:45 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[BU MET CS 601 Fall 2011]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1655</guid>
		<description><![CDATA[<p>At one point a few weeks back (for one of the homeworks), I could not figure out how to delete the current element from the DOM while working in Javascript. Some searching turned up the following solution: detaildiv.parentNode.removeChild(detaildiv); Basically, you get the element&#8217;s parent node, then deleted the specified child node, this being the element. [...]]]></description>
			<content:encoded><![CDATA[<p>At one point a few weeks back (for one of the homeworks), I could not figure out how to delete the current element from the DOM while working in Javascript. Some searching turned up the following solution:<br />
<code><br />
detaildiv.parentNode.removeChild(detaildiv);<br />
</code><br />
Basically, you get the element&#8217;s parent node, then deleted the specified child node, this being the element. I&#8217;m not sure this the standard method, but it works and is clean. (This was before we were looking at JQuery, so perhaps it has a better solution.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2011/11/30/cs601-delete-current-element-from-dom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS601 &#8211; Tablesorter</title>
		<link>http://www.sanschagrin.com/2011/11/30/cs601-tablesorter/</link>
		<comments>http://www.sanschagrin.com/2011/11/30/cs601-tablesorter/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 06:16:50 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[BU MET CS 601 Fall 2011]]></category>
		<category><![CDATA[cs 601 project]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1647</guid>
		<description><![CDATA[<p>I&#8217;m a bit behind in blogging for class due to time constraints. I&#8217;m spending most of my free time working on my project. I have a bunch of ideas in the queue, but here&#8217;s one I just used tonight.</p> <p>One aspect of the project requires a sortable table. Not easy to implement on my own, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a bit behind in blogging for class due to time constraints. I&#8217;m spending most of my free time working on my project. I have a bunch of ideas in the queue, but here&#8217;s one I just used tonight.</p>
<p>One aspect of the project requires a sortable table. Not easy to implement on my own, but I found the very nifty JQuery <a href="From: http://tablesorter.com/docs/">UI Tablesort plugin</a>. This is pretty cool and pretty easy to implement. I&#8217;ll include some snippets from the page which shows the employees as list of all reservations.</p>
<p>Here is the JS code which creates the object:<br />
<code><br />
&lt;script type="text/javascript"&gt;</code></p>
<p>// add parser through the tablesorter addParser method<br />
$.tablesorter.addParser({<br />
// set a unique id<br />
id: &#8216;restatus&#8217;,<br />
is: function(s) {<br />
// return false so this parser is not auto detected<br />
return false;<br />
},<br />
format: function(s) {<br />
// format your data for normalization<br />
return s.toLowerCase().replace(/made/,0).replace(/arrived/,1).replace(/seated/,2);<br />
},<br />
// set type, either numeric or text<br />
type: &#8216;numeric&#8217;<br />
}); $(document).ready(function()<br />
{<br />
$(&#8220;#restable&#8221;)<br />
.tablesorter();<br />
}<br />
);<br />
&lt;/script&gt;</p>
<p>The first block is simply a function to allow me to sort the reservation status (e.g., has the party arrived, have they been seated) using an ordering index regardless of the text for the status. (E.g., I would want &#8220;Made&#8221; sorted before &#8220;Arrived&#8221;.)</p>
<p>The second block actually creates the applies the tablesorter object to the HTML table with the ID of restable. This table is a plain old HTML table with the addition of the class of tablesorter.</p>
<p>You can also download the themes from the site, put them in your CSS directory, and then include that in your header. With all that you get the following (on load):</p>
<p><img class="alignnone size-full wp-image-1649" title="Tablesorter Capture 1" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2011/11/Capture.jpg" alt="" width="597" height="169" /></p>
<p>If you click the Last Name column:</p>
<p><img class="alignnone size-full wp-image-1650" title="Tablesorter Capture 2" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2011/11/Capture2.jpg" alt="" width="593" height="172" /></p>
<p>If you click the Date/Time column:</p>
<p><img class="alignnone size-full wp-image-1651" title="Tablesorter Capture 3" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2011/11/Capture3.jpg" alt="" width="591" height="167" /></p>
<p>It does the date correctly automatically. (Verified as 11/30/2011 12:00 PM sorts before 11/30/2011 01:30 PM and before 01/20/2012 07:45 PM. If it was a simple text-based sort, this would not be the case as 0 comes before 1.)</p>
<p>It can also do multicolumn sort and a multitude of other things which I have not explored.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2011/11/30/cs601-tablesorter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Even More Photos: Sep &amp; Oct</title>
		<link>http://www.sanschagrin.com/2011/11/12/even-more-photos-sep-oct/</link>
		<comments>http://www.sanschagrin.com/2011/11/12/even-more-photos-sep-oct/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 03:07:58 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Kyle]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://www.sanschagrin.com/?p=1642</guid>
		<description><![CDATA[<p>I&#8217;m almost all caught up now. I just finished uploading photos from September &#38; October. Included are photos from Kyle&#8217;s first day of kindergarten and a few from Halloween. Hopefully I&#8217;ll have the last few (from early November) up tomorrow.</p> <p class="wp-caption-text">Kyle ready for kindergarten</p> <p class="wp-caption-text">Kyle ready for trick-or-treating</p> [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m almost all caught up now. I just finished uploading photos from <a title="Kyle: Sep &amp; Oct 2011" href="http://www.sanschagrin.com/kyle/kyle-sep-oct-2011/">September &amp; October</a>. Included are photos from Kyle&#8217;s first day of kindergarten and a few from Halloween. Hopefully I&#8217;ll have the last few (from early November) up tomorrow.</p>
<div id="attachment_1644" class="wp-caption alignleft" style="width: 235px"><a href="http://www.sanschagrin.com/kyle/kyle-sep-oct-2011/"><img class="size-medium wp-image-1644" title="Kyle on his first day of school at our house in Fanwood" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2011/11/PSA590IS_20110906_IMG_2219-225x300.jpg" alt="" width="225" height="300" /></a><p class="wp-caption-text">Kyle ready for kindergarten</p></div>
<div id="attachment_1643" class="wp-caption alignleft" style="width: 210px"><a href="http://www.sanschagrin.com/kyle/kyle-sep-oct-2011/"><img class="size-medium wp-image-1643" title="Kyle dressed for trick-or-treating at our house in Fanwood" src="http://www.sanschagrin.com/wordpress/wp-content/uploads/2011/11/PSA590IS_20111031_IMG_2349-200x300.jpg" alt="" width="200" height="300" /></a><p class="wp-caption-text">Kyle ready for trick-or-treating</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sanschagrin.com/2011/11/12/even-more-photos-sep-oct/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 7.949 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-08 19:19:16 -->

