<?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>CM &#187; General</title>
	<atom:link href="http://corymathews.com/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://corymathews.com</link>
	<description>Things I should remember and then some...</description>
	<lastBuildDate>Thu, 26 Jan 2012 16:27:17 +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>jQuery Custom Events</title>
		<link>http://corymathews.com/jquery-custom-events/</link>
		<comments>http://corymathews.com/jquery-custom-events/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 19:01:23 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=872</guid>
		<description><![CDATA[We are used to javascript events such as a &#8220;click&#8221; being handled similar to the following: $('#id').on(&#34;click&#34;, function() { alert(&#34;Item clicked&#34;); }); But less common is the use of custom events available with the .trigger() and .triggerHandler() jQuery functions. With this I could create an event such as &#8220;cory.says.hello&#8221;, if I so wished and then [...]]]></description>
			<content:encoded><![CDATA[<p>We are used to javascript events such as a &#8220;click&#8221; being handled similar to the following:</p>
<pre class="prettyprint linenumstrigger linenums">
$('#id').on(&quot;click&quot;, function() {
    alert(&quot;Item clicked&quot;);
});
</pre>
<p>But less common is the use of custom events available with the <a href="http://api.jquery.com/trigger/">.trigger()</a> and <a href="http://api.jquery.com/triggerHandler/">.triggerHandler()</a> jQuery functions. With this I could create an event such as &#8220;cory.says.hello&#8221;, if I so wished and then handle it with </p>
<pre class="prettyprint linenumstrigger linenums">
$('#id').on(&quot;cory.says.hello&quot;, function() {
    alert(&quot;Hello Cory&quot;);
});
</pre>
<h2> Usage</h2>
<p>So you are writting a lightbox plugin (or whatever plugin really), and you want to give anyone the ability to add additional logic when the lightbox opens. Of the many ways to allow them to do this an easy way is to create a custom event for them to handle.</p>
<p>So continuing with the lightbox example, you could add an event when you open the lightbox with something like:</p>
<pre class="prettyprint linenumstrigger linenums">
function open() {
  //blah
  $('#id')triggerHandler({ type:&quot;lightbox.open&quot; });
  //more
}
</pre>
<p>which could then later be caught by anyone using your plugin like so:</p>
<pre class="prettyprint linenumstrigger linenums">
$(function() {
  $('#id').on(&quot;lightbox.open&quot;, function() {
    alert(&quot;The lightbox just opened. Woo!&quot;);
  });
});
</pre>
<p>Nice and simplistic. What about passing variables to the event handler? Maybe I want to run an event on an ajax response or whatever the case may be. </p>
<pre class="prettyprint linenumstrigger linenums">
  $('#id').triggerHandler({
    type:&quot;lightbox.open&quot;,
    var1:'Howdy',
    information:'I could pass something here also'
  });
</pre>
<p>Then to get the var1, and information data out of the previous example we would do:</p>
<pre class="prettyprint linenumstrigger linenums">
$(function() {
  $('#id').on(&quot;lightbox.open&quot;, function(o) {
    alert(o.var1 + &quot; - &quot; + o.information);
  });
});
</pre>
<h2>Differences between .trigger() and .triggerHandler()</h2>
<p>The differences between the two are pretty small, but still important. To quote the jQuery Docs:</p>
<blockquote><p>
The .triggerHandler() method behaves similarly to .trigger(), with the following exceptions:</p>
<ul>
<li>The .triggerHandler() method does not cause the default behavior of an event to occur (such as a form submission).</li>
<li>While .trigger() will operate on all elements matched by the jQuery object, .triggerHandler() only affects the first matched element.</li>
<li>Events created with .triggerHandler() do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing.</li>
<li>Instead of returning the jQuery object (to allow chaining), .triggerHandler() returns whatever value was returned by the last handler it caused to be executed. If no handlers are triggered, it returns undefined</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/jquery-custom-events/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Quartz.Net to Create Scheduled Tasks</title>
		<link>http://corymathews.com/using-quartz-net-to-create-scheduled-tasks/</link>
		<comments>http://corymathews.com/using-quartz-net-to-create-scheduled-tasks/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 16:07:50 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=854</guid>
		<description><![CDATA[Quartz.Net is a full-featured, open source job scheduling system. Basically this system allows an asp.net web application to schedule and run background jobs. This makes it much simpler for us developers by making it so that we do not have to have a windows service running on the server as well. To get started open [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://quartznet.sourceforge.net/" title="Quartz.Net">Quartz.Net</a> is a full-featured, open source job scheduling system. Basically this system allows an asp.net web application to schedule and run background jobs. This makes it much simpler for us developers by making it so that we do not have to have a windows service running on the server as well. </p>
<p>To get started open up the NuGet package manager. (right click on the projects name, and select Manage NuGet Packages) Search for Quartz and click install. This will add the needed references as well as download the Common.Logging dependency if needed.</p>
<p>Now to the code, we need to create our Job which will be run by the scheduler. This class must use the IJob interface provided from Quartz.Net. </p>
<pre class="prettyprint linenumstrigger linenums">
...
using Quartz;
using Quartz.Impl;
...

public class DailyJob : IJob
{
    public DailyJob() { }

    public void Execute( JobExecutionContext context )
    {
        try {
            //Your Logic
        } catch( Exception e ) {
            //Handle this please
        }
    }

    public static void ScheduleJob( IScheduler sc )
    {
        JobDetail job = new JobDetail( &quot;Send&quot;, &quot;Daily&quot;, typeof( DailyJob ) );
        sc.ScheduleJob( job, TriggerUtils.MakeDailyTrigger( &quot;trigger1&quot;, 8, 15 ) );
        sc.Start();
    }
}
</pre>
<p>The code placed in the Execute function is obviously what will run when the job is executed at its scheduled time. If you fail to add the try/catch block then the code can silently fail without being caught by a global error handler since there is no http request present. The ScheduleJob function is not required by the IJob interface but seems more logical to me, so it is added as well. </p>
<p>The Scheduling function above creates a new job Daily.Send (thats GroupName.TaskName ) and schedules it to run daily at 8:15am (14, 15 would be 2:15pm). You can replacing the TriggerUtils.MakeDailyTrigger with how often you want the Job to run, such as every 20 minutes, every hour, etc. </p>
<p>Lastly we need to call this Schedule function from the Global.asax Application_Start function so that when our app starts the code is automatically scheduled.</p>
<pre class="prettyprint linenumstrigger linenums">
DailyJob.ScheduleJob( new StdSchedulerFactory().GetScheduler() );
</pre>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/using-quartz-net-to-create-scheduled-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EventType clr20r3, P1 w3wp.exe &#8211; system.nullreferenceexception</title>
		<link>http://corymathews.com/eventtype-clr20r3-p1-w3wp-exe-system-nullreferenceexception/</link>
		<comments>http://corymathews.com/eventtype-clr20r3-p1-w3wp-exe-system-nullreferenceexception/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 20:07:30 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=838</guid>
		<description><![CDATA[My web app was crashing every few minutes, logging everyone off and completely restarting. Here was the message I had to go on and how I fixed it. Event Type: Error Event Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: ****** Time: ******* User: N/A Computer: ******* Description: EventType clr20r3, [...]]]></description>
			<content:encoded><![CDATA[<p>My web app was crashing every few minutes, logging everyone off and completely restarting. Here was the message I had to go on and how I fixed it.</p>
<blockquote><p>Event Type: Error<br />
Event Source: .NET Runtime 2.0 Error Reporting<br />
Event Category: None<br />
Event ID: 5000<br />
Date: ******<br />
Time: *******<br />
User: N/A<br />
Computer: *******<br />
Description:<br />
EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 *******, P4 *******, P5 1.0.0.0, P6 *******, P7 3b6, P8 c2, P9 system.nullreferenceexception, P10 NIL.</p>
<p>For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.</p></blockquote>
<p>This was found in my Windows Application Error Log. Basically I had a system.nullreferenceexception somewhere in my application that was causing the ENTIRE application to restart. Fucking retarded, but according to <a href="http://support.microsoft.com/kb/911816">this KB</a></p>
<blockquote><p>&#8220;ASP.NET uses the default policy for unhandled exceptions in the .NET Framework 2.0. <strong>When an unhandled exception is thrown, the ASP.NET-based application unexpectedly quits</strong>.</p>
<p>This behavior does not apply to exceptions that occur in the context of a request. These kinds of exceptions are still handled and wrapped by an HttpException object. Exceptions that occur in the context of a request do not cause the worker process to end. However,<strong> unhandled exceptions outside the context of a request, such as exceptions on a timer thread or in a callback function, cause the worker process to end.</strong>&#8221;</p>
<p>&#8220;This behavior is by design.&#8221;</p></blockquote>
<p>So now I know that I have an error in code that runs behind the scenes. But without some direction good luck ever figuring out the problem, which is where this nasty cryptic error message above comes into play.</p>
<p>The key items are the P1 &#8211; P10 specifically p7. According to <a href="http://www.netframeworkdev.com/common-language-runtime/clr20r3-from-a-windows-service-calling-a-dot-net-dll-32830.shtml">this article on clr20r3</a> (notice clr20r3 was given before the P1 for EventType)</p>
<blockquote><p>P1: Application Name<br />
P2: Application version<br />
P3: Application time stamp<br />
P4: Assembly/Module name<br />
P5: Assembly/Module version<br />
p6: Assembly/Module timestamp<br />
<strong>P7: MethodDef</strong><br />
p8: IL offset<br />
p9: Exception name (Hashed because the name is too long )</p></blockquote>
<p>So in my error above p7 is 3b6. Now comes the fun part. Open up IL Disassembler (comes with visual studio under the SDK tools)</p>
<ol>
<li>Go to File &gt; Open and select the .dll the error is happening in (the P4 from the error message)</li>
<li>View &gt; Meta Info &gt; Show!</li>
<li>Find and type in 06000 and your p7 so in this case 060003b6</li>
<li>You should see something like the picture below. If you scroll up the page it will say class and you should be able to narrow down the function causing the error from there.</li>
</ol>
<p><a href="http://corymathews.com/wp-content/uploads/2011/12/ILDisassembler.png"><img class="size-medium wp-image-839" title="ILDisassembler" src="http://corymathews.com/wp-content/uploads/2011/12/ILDisassembler-300x128.png" alt="" width="300" height="128" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/eventtype-clr20r3-p1-w3wp-exe-system-nullreferenceexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Placeholder in IE and Unsupported Browsers</title>
		<link>http://corymathews.com/html5-placeholder-in-ie/</link>
		<comments>http://corymathews.com/html5-placeholder-in-ie/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 19:50:00 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=819</guid>
		<description><![CDATA[The html5 placeholder attribute on an input tag is a really nice ( &#60;input type=&#34;text&#34; name=&#34;user&#34; /&#62; ), however easily adding that feature to older IE versions and any other browsers that don&#8217;t support it renders it unusable in production. The below javascript/jquery code will check the page for any inputs with the placeholder attribute [...]]]></description>
			<content:encoded><![CDATA[<p>The html5 placeholder attribute on an input tag is a really nice (
<pre class="prettyprint linenumstrigger linenums">&lt;input type=&quot;text&quot; name=&quot;user&quot; /&gt;</pre>
<p>), however easily adding that feature to older IE versions and any other browsers that don&#8217;t support it renders it unusable in production.</p>
<p>The below javascript/jquery code will check the page for any inputs with the placeholder attribute and make it work in browsers that do not support it, and it will do nothing in those that do.</p>
<pre class="prettyprint linenumstrigger linenums">
(function($) {
  $.fn.placeholder = function() {
    if(typeof document.createElement(&quot;input&quot;).placeholder == 'undefined') {
      $('[placeholder]').focus(function() {
        var input = $(this);
        if (input.val() == input.attr('placeholder')) {
          input.val('');
          input.removeClass('placeholder');
        }
      }).blur(function() {
        var input = $(this);
        if (input.val() == '' || input.val() == input.attr('placeholder')) {
          input.addClass('placeholder');
          input.val(input.attr('placeholder'));
        }
      }).blur().parents('form').submit(function() {
        $(this).find('[placeholder]').each(function() {
          var input = $(this);
          if (input.val() == input.attr('placeholder')) {
            input.val('');
          }
        })
      });
    }
  }
})(jQuery);
</pre>
<p>Line 3 of the javascript checks if the browser supports the placeholder attribute and only runs if it does not.</p>
<p>To call this plugin just add the following to your page.</p>
<pre class="prettyprint linenumstrigger linenums">$.fn.placeholder();</pre>
<p>You may also want to add the following css to make it more like the browsers that do support it.</p>
<pre class="prettyprint linenumstrigger linenums">.placeholder { color: #aaa; }</pre>
<p><em>The original bulk of this code was written by <a href="http://www.hagenburger.net/BLOG/HTML5-Input-Placeholder-Fix-With-jQuery.html">Nico Hagenburger</a>. I basically only added the support check and turned it into a plugin.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/html5-placeholder-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>301 Redirect using URLRewrite</title>
		<link>http://corymathews.com/301-redirect-using-urlrewrite/</link>
		<comments>http://corymathews.com/301-redirect-using-urlrewrite/#comments</comments>
		<pubDate>Tue, 11 May 2010 13:30:40 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=597</guid>
		<description><![CDATA[Just in case.. A 301 redirect tells the browser/search engine that the page has permanently been moved to this new address. First install URLRewrite on a windows server with IIS7 from  http://www.iis.net/download/URLRewrite After its installed a new button titled URL Rewrite will be added. Select it. Under Actions click Add Rule(s)&#8230; Select Rule with URL [...]]]></description>
			<content:encoded><![CDATA[<p><em>Just in case.. A 301 redirect tells the browser/search engine that the page has permanently been moved to this new address. </em></p>
<p>First install URLRewrite on a windows server with IIS7 from  <a href="http://www.iis.net/download/URLRewrite">http://www.iis.net/download/URLRewrite</a></p>
<p>After its installed a new button titled<strong> URL Rewrite</strong> will be added. Select it.</p>
<p><a href="http://corymathews.com/wp-content/uploads/2010/04/IISUrlRedirect.jpg"><img class="aligncenter size-full wp-image-599" title="IISUrlRedirect" src="http://corymathews.com/wp-content/uploads/2010/04/IISUrlRedirect.jpg" alt="IIS7 URL Redirect" width="546" height="277" /></a></p>
<p>Under Actions click <strong>Add Rule(s)</strong>&#8230;</p>
<p>Select <strong>Rule with URL Rewrite map</strong></p>
<p><a href="http://corymathews.com/wp-content/uploads/2010/04/IISRuleWithRewriteMap.jpg"><img class="aligncenter size-full wp-image-600" title="IISRuleWithRewriteMap" src="http://corymathews.com/wp-content/uploads/2010/04/IISRuleWithRewriteMap.jpg" alt="IIS7 Rule With Rewrite Map" width="546" height="277" /></a></p>
<p><strong>Change the Rule Action to Redirect</strong> and give it any name you wish it makes no difference what it is.</p>
<p>Then under actions click <strong>Add Mapping Entry</strong>&#8230;</p>
<p><a href="http://corymathews.com/wp-content/uploads/2010/04/IISMapping.jpg"><img class="aligncenter size-full wp-image-601" title="IISMapping" src="http://corymathews.com/wp-content/uploads/2010/04/IISMapping.jpg" alt="IIS7 Mapping" width="385" height="212" /></a></p>
<p>In the Original Value field give the path to the old page without the http://www.example.com in the above example it redirects /oldpage.html to /newpage.html</p>
<p>Keep adding new Mapping Entries for every page you need to redirect.</p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/301-redirect-using-urlrewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery to solve the 100% height problem</title>
		<link>http://corymathews.com/jquery-to-solve-the-100-height-problem/</link>
		<comments>http://corymathews.com/jquery-to-solve-the-100-height-problem/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 19:47:48 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=532</guid>
		<description><![CDATA[Real short post today just a quick snippet of jQuery that solves the 100% height problem. Yes there are complete CSS solutions to this but it seems that at times they can be problematic, and at other times laziness can kick in. $(document).ready(function () { $(&#34;#divID&#34;).height($(document).height()); }); //And the slightly more fancy way. With a [...]]]></description>
			<content:encoded><![CDATA[<p>Real short post today just a quick snippet of jQuery that solves the 100% height problem. </p>
<p>Yes there are complete CSS solutions to this but it seems that at times they can be problematic, and at other times laziness can kick in.</p>
<pre class="prettyprint linenumstrigger linenums">$(document).ready(function () {
    $(&quot;#divID&quot;).height($(document).height());
});</pre>
<p>//And the slightly more fancy way. With a subtle slide down.</p>
<pre class="prettyprint linenumstrigger linenums">$(document).ready(function () {
    $(&quot;#divID&quot;).animate({ height: $(document).height() }, 500 );
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/jquery-to-solve-the-100-height-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>12 Slick jQuery Plugins</title>
		<link>http://corymathews.com/12-slick-jquery-plugins/</link>
		<comments>http://corymathews.com/12-slick-jquery-plugins/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 12:38:07 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=412</guid>
		<description><![CDATA[As I have been updating the jQuery links on my @jQueryLinks twitter account there were a couple that really stood out as a way to make just about any site feel slick. So here they are. Enjoy. 1. Gritter &#8211; By:@jboesch Plugin Page Demo 2. jQuery Link Nudging &#8211; By: @davidwalshblog Plugin Page Demo 3. [...]]]></description>
			<content:encoded><![CDATA[<p>As I have been updating the jQuery links on my <a href="http://twitter.com/jQueryLinks">@jQueryLinks</a> twitter account there were a couple that really stood out as a way to make just about any site feel slick. So here they are. Enjoy.</p>
<h2>1. Gritter &#8211; By:<a href="http://twitter.com/jboesch">@jboesch</a></h2>
<div id="attachment_413" class="wp-caption aligncenter" style="width: 560px"><a href="http://boedesign.com/2009/07/11/growl-for-jquery-gritter/"><img src="http://corymathews.com/wp-content/uploads/2009/08/Gritter.jpg" alt="jQuery Grown look-a-like plugin" title="Gritter jQuery Plugin" width="550" height="250" class="size-full wp-image-413" /></a><p class="wp-caption-text">jQuery Grown look-a-like plugin</p></div>
<p><a href="http://boedesign.com/2009/07/11/growl-for-jquery-gritter/">Plugin Page</a></p>
<p><a href="http://boedesign.com/demos/gritter/">Demo</a></p>
<hr />
<h2>2. jQuery Link Nudging &#8211; By: <a href="http://twitter.com/davidwalshblog">@davidwalshblog</a></h2>
<div id="attachment_420" class="wp-caption aligncenter" style="width: 560px"><a href="http://davidwalsh.name/jquery-link-nudging"><img class="size-full wp-image-420" title="jQuery Link Nudging Plugin" src="http://corymathews.com/wp-content/uploads/2009/08/LinkNudging.jpg" alt="Link Nudging" width="550" height="250" /></a><p class="wp-caption-text">A jQuery Link Nudging Plugin which is essentially a classy, subtle link animation </p></div>
<p><a href="http://davidwalsh.name/jquery-link-nudging">Plugin Page</a></p>
<p><a href="http://davidwalsh.name/dw-content/jquery-link-nudging.php">Demo</a></p>
<hr />
<h2>3. Create The Fanciest Dropdown Menu You Ever Saw</h2>
<p><div id="attachment_423" class="wp-caption aligncenter" style="width: 560px"><a href="http://www.webdesigndev.com/web-development/create-the-fanciest-dropdown-menu-you-ever-saw"><img src="http://corymathews.com/wp-content/uploads/2009/08/FancyDropdown.jpg" alt="Create The Fanciest Dropdown Menu You Ever Saw" title="Fancy Dropdown" width="550" height="250" class="size-full wp-image-423" /></a><p class="wp-caption-text">Create The Fanciest Dropdown Menu You Ever Saw</p></div><br />
<a href="http://www.webdesigndev.com/web-development/create-the-fanciest-dropdown-menu-you-ever-saw">Plugin Page</a></p>
<p><a href="http://www.webdesigndev.com/wp-content/uploads/2009/07/fancydropdown.html">Demo</a></p>
<hr />
<h2>4. ColorBox &#8211; By: <a href="http://twitter.com/jacklmoore">@jacklmoore</a></h2>
<p><div id="attachment_425" class="wp-caption aligncenter" style="width: 560px"><a href="http://colorpowered.com/colorbox/"><img src="http://corymathews.com/wp-content/uploads/2009/08/ColorBox.jpg" alt="A light-weight, customizable lightbox plugin for jQuery 1.3" title="ColorBox" width="550" height="250" class="size-full wp-image-425" /></a><p class="wp-caption-text">A light-weight, customizable lightbox plugin for jQuery 1.3</p></div><br />
<a href="http://colorpowered.com/colorbox/">Plugin Page</a></p>
<p><a href="http://colorpowered.com/colorbox/core/example5/index.html">Demo</a></p>
<hr />
<h2>5. Interactive, Filterable Portfolio &#8211; By: <a href="http://twitter.com/JoelSutherland">@JoelSutherland<a/></h2>
<p><div id="attachment_427" class="wp-caption aligncenter" style="width: 560px"><a href="http://www.newmediacampaigns.com/page/a-jquery-plugin-to-create-an-interactive-filterable-portfolio-like-ours"><img src="http://corymathews.com/wp-content/uploads/2009/08/FilterablePortfolio.jpg" alt="A jQuery Plugin to Create an Interactive, Filterable Portfolio" title="FilterablePortfolio" width="550" height="250" class="size-full wp-image-427" /></a><p class="wp-caption-text">A jQuery Plugin to Create an Interactive, Filterable Portfolio</p></div><br />
<a href="http://www.newmediacampaigns.com/page/a-jquery-plugin-to-create-an-interactive-filterable-portfolio-like-ours">Plugin Page</a></p>
<p><a href="http://www.newmediacampaigns.com/section/portfolio">Demo</a></p>
<hr />
<h2>6. Animated Menu Using jQuery</h2>
<p><div id="attachment_434" class="wp-caption aligncenter" style="width: 560px"><a href="http://jqueryglobe.com/article/animated-menu"><img src="http://corymathews.com/wp-content/uploads/2009/08/FancyMenus.jpg" alt="Nice animated menu using jQuery and CSS" title="FancyMenus" width="550" height="250" class="size-full wp-image-434" /></a><p class="wp-caption-text">Nice animated menu using jQuery and CSS</p></div><br />
<a href="http://jqueryglobe.com/article/animated-menu">Plugin Page</a></p>
<p><a href="http://jqueryglobe.com/labs/animated_menu/">Demo</a></p>
<hr />
<h2>7. jQuery Ajax delete</h2>
<p><div id="attachment_432" class="wp-caption aligncenter" style="width: 560px"><a href="http://papermashup.com/jquery-ajax-delete/"><img src="http://corymathews.com/wp-content/uploads/2009/08/DeleteComment.jpg" alt="jQuery Ajax delete" title="DeleteComment" width="550" height="250" class="size-full wp-image-432" /></a><p class="wp-caption-text">jQuery Ajax delete</p></div><br />
<a href="http://papermashup.com/jquery-ajax-delete/">Plugin Page</a></p>
<p><a href="http://papermashup.com/demos/jquery-delete/">Demo</a></p>
<hr />
<h2>8. Galleria</h2>
<p><div id="attachment_439" class="wp-caption aligncenter" style="width: 560px"><a href="http://devkick.com/lab/galleria/"><img src="http://corymathews.com/wp-content/uploads/2009/08/Galleria.jpg" alt="Galleria is a javascript image gallery" title="Galleria" width="550" height="250" class="size-full wp-image-439" /></a><p class="wp-caption-text">Galleria is a javascript image gallery</p></div><br />
<a href="http://devkick.com/lab/galleria/">Plugin Page</a></p>
<p><a href="http://devkick.com/lab/galleria/demo_01.htm#img/grass-blades.jpg">Demo</a></p>
<hr />
<h2>9. Easy Slider By: <a href="http://twitter.com/cssglobe">@cssglobe</a></h2>
<p><div id="attachment_441" class="wp-caption aligncenter" style="width: 560px"><a href="http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider"><img src="http://corymathews.com/wp-content/uploads/2009/08/EasySlider1.jpg" alt="Easy Slider 1.7 - Numeric Navigation jQuery Slider" title="EasySlider" width="550" height="250" class="size-full wp-image-441" /></a><p class="wp-caption-text">Easy Slider 1.7 - Numeric Navigation jQuery Slider</p></div><br />
<a href="http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider">Plugin Page</a></p>
<p><a href="http://cssglobe.com/lab/easyslider1.7/03.html">Demo</a></p>
<hr />
<h2>10. Cycle Lite</h2>
<p><div id="attachment_431" class="wp-caption aligncenter" style="width: 560px"><a href="http://malsup.com/jquery/cycle/lite/"><img src="http://corymathews.com/wp-content/uploads/2009/08/cycleLite.jpg" alt="lightweight slideshow plugin" title="cycleLite" width="550" height="250" class="size-full wp-image-431" /></a><p class="wp-caption-text">lightweight slideshow plugin</p></div><br />
<a href="http://malsup.com/jquery/cycle/lite/">Plugin Page</a></p>
<p><a href="http://malsup.com/jquery/cycle/lite/">Demo</a></p>
<hr />
<h2>11. Notify Bar By: <a href="http://twitter.com/DmitriSmirnov">@DmitriSmirnov</a></h2>
<p><div id="attachment_440" class="wp-caption aligncenter" style="width: 560px"><a href="http://www.dmitri.me/blog/notify-bar/"><img src="http://corymathews.com/wp-content/uploads/2009/08/NotifyBar.jpg" alt="shows a notify bar (like on Twitter&#039;s webpage)" title="NotifyBar" width="550" height="250" class="size-full wp-image-440" /></a><p class="wp-caption-text">shows a notify bar (like on Twitter's webpage)</p></div><br />
<a href="http://www.dmitri.me/blog/notify-bar/">Plugin Page</a></p>
<p><a href="http://www.dmitri.me/misc/notify/">Demo</a></p>
<hr />
<h2>12. Animated Tabbed Content &#8211; By: <a href="http://twitter.com/gayadesign">@gayadesign</a></h2>
<p><div id="attachment_443" class="wp-caption aligncenter" style="width: 560px"><a href="http://www.gayadesign.com/diy/animated-tabbed-content-with-jquery/"><img src="http://corymathews.com/wp-content/uploads/2009/08/AnimatedTabs.jpg" alt="Animated Tabbed Content" title="AnimatedTabs" width="550" height="250" class="size-full wp-image-443" /></a><p class="wp-caption-text">Animated Tabbed Content</p></div><br />
<a href="http://www.gayadesign.com/diy/animated-tabbed-content-with-jquery/">Plugin Page</a></p>
<p><a href="http://www.gayadesign.com/scripts/tabbed/">Demo</a></p>
<hr />
<p>To Stay up to date with more great jQuery Links follow <a href="http://twitter.com/jQueryLinks">@jQueryLinks</a> on twitter.</p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/12-slick-jquery-plugins/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Understanding URL Variables</title>
		<link>http://corymathews.com/understanding-url-variables/</link>
		<comments>http://corymathews.com/understanding-url-variables/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 05:53:32 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=168</guid>
		<description><![CDATA[Over the past couple weeks I realized there isn&#8217;t really much information about how dynamic web pages work. The lack of this information makes it harder for new developers to grasp these topics that are fairly simple, but may seem hard without a good example. So the next couple articles are going to cover some [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past couple weeks I realized there isn&#8217;t really much information about how dynamic web pages work. The lack of this information makes it harder for new developers to grasp these topics that are fairly simple, but may seem hard without a good example. So the next couple articles are going to cover some of these topics. If you have a topic you would like for me to cover be sure to let me know in the comments below.</p>
<p>On ward to <strong>Url Variables</strong>.</p>
<p><strong>Url variables</strong> is one of the first topics to learn for a new developer wanting to move from static web sites to dynamic sites. <strong>Url variables</strong>, also called <strong>query strings</strong> in some languages(asp.net), <strong>allow a variable to be passed from one page to another with very little overhead and very little code</strong>.<br />
<span id="more-168"></span><br />
We have all seen the sites, such as mine here, where they have a url such as corymathews.com/<strong>?id=12</strong> or something similar. These extra items after the ? are called url variables and I am going to explain what these are, what are they used for, and how do they work?</p>
<p><strong>What are url variables?</strong></p>
<p>Url variables allow developers to  pass multiple values from one page to another in order to display different results every time the same page is loaded. This saves the developer from having to make hundreds of pages which are exactly the same. This is mainly because doing so wouldn&#8217;t be very realistic or good for any budget.</p>
<p><strong>How do url parameters work? </strong></p>
<p>Take a look at the following link:</p>
<p>http://www.osguide.net/Software/index.php?p=2</p>
<p>We see a couple different parts. We see the domain <strong>osguide.net</strong> a directory named <strong>Software</strong> the current page <strong>index.php</strong> and then we see a <strong>?p=2.</strong> This ?p=2 is a url variable setting the variable &#8220;p&#8221; equal to 2. In this case its being used as a variable to store the current page for my pagination script on the site, but it could be for just about anything. When the page is first loaded I have programmed it page to look to see if the variable p is declared in the url bar. If it is declared then my page knows to display the corresponding page of results, in this case 2. On the other hand you must always take into account if the url parameter is not declared. In my example here if p was not in the url I would consider this page 1 and thus set p to 1.</p>
<p>A thing to note here is that this url can be rewritten as http://www.osguide.net/Software/?p=2 since the index.php is understood and not actually needed.</p>
<p>What if you want to pass multiple parameters? This can be easily accomplished, with the &amp; symbol. For instance in the previous example If I also wanted to set the variable &#8216;R&#8217; I would simple use a url like so:</p>
<p>http://www.osguide.net/Software/index.php?p=2&#038;r=3</p>
<p>This can go on and on for as long as you like. Take a look at some of the sites you go to such as gmail, they may pass quite a few different url variables, mainly depending on your browser. All you have to do is keep adding the &amp; in between every variable.</p>
<p><strong>So What are url parameters used for?</strong></p>
<p>Probably most common use for url parameters is to associate the correct information to display from a database. The way this works logically is very simple. A page is set up kind of like a template for content without any &#8220;real&#8221; content in it. Then from the url variable passed in a query is run on a database and the related page&#8217;s contents are returned from the database to be displayed on the page. This allows a developer to create one page to show the details of anything, such as this article, without having to create a different page for every article.</p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/understanding-url-variables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SaveTheDevelopers.org</title>
		<link>http://corymathews.com/savethedevelopersorg/</link>
		<comments>http://corymathews.com/savethedevelopersorg/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 12:43:07 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=100</guid>
		<description><![CDATA[EDIT: It seems that Microsoft was purchased savethedevelopers.org so the site is no longer the same Recently I was introduced to SaveTheDevelopers.org. Their mission is simple &#8220;Save A Developer. Upgrade Your Browser.&#8221; Basically they want to speed up the transition from IE6 to a modern browser. What makes SaveTheDevelopers.org so much better than the rest [...]]]></description>
			<content:encoded><![CDATA[<p><strong>EDIT: It seems that Microsoft was purchased savethedevelopers.org so the site is no longer the same</strong></p>
<p>Recently I was introduced to <a title="SaveTheDevelopers.org" href="http://www.savethedevelopers.org/" target="_blank">SaveTheDevelopers.org</a>. Their mission is simple</p>
<blockquote><p>&#8220;Save A Developer. Upgrade Your Browser.&#8221;</p></blockquote>
<p>Basically they want to speed up the transition from IE6 to a modern browser.</p>
<p>What makes <a title="SaveTheDevelopers.org" href="http://www.savethedevelopers.org/" target="_blank">SaveTheDevelopers.org</a> so much better than the rest is that it is much more professional looking than any other anti-IE6 &#8220;movement&#8221; site. Most anti-IE6 sites simply bash IE6 and never tell you why other browsers really are better.  <span id="more-100"></span></p>
<p>They have made it extremely simple to add their image on your site as well. You simply include one line of javascript in the header of all your pages.</p>
<pre lang="javascript"><script src="http://www.savethedevelopers.org/say.no.to.ie.6.js"></pre>
<p>You can also download the javascript and link to it on your own site if you don't wish to link to their site every time.  This javascript creates a small image that only appears to a user running IE6. The image slides down in the top right corner of your site and links back to <a title="SaveTheDevelopers.org" href="http://www.savethedevelopers.org/" target="_blank">SaveTheDevelopers.org</a>.</p>
<p><a title="SaveTheDevelopers.org" href="http://www.savethedevelopers.org/" target="_blank"><img class="aligncenter size-full wp-image-101" title="savethedevelopers" src="http://corymathews.com/wp-content/uploads/2008/07/savethedevelopers.jpg" alt="SaveTheDevelopers.org" width="348" height="72" /></a></p>
<p>I know almost every web developer, including myself, is fed up with supporting IE6. It has cost us all many, many extra hours of work. It is time to realize that it time has come and passed, so why not help speed up the transition to modern browsers by hosting SaveTheDevelopers.org's simple javascript to help people realize they need to upgrade.  Some other anti-IE6 sites that I have come across.</p>
<ul>
<li> <a title="Browsehappy.com" href="http://browsehappy.com/" target="_blank">browsehappy.com</a></li>
<li><a title="NoIE6.com" href="http://noie6.com/" target="_blank">noie6.com</a></li>
</ul>
<p>If you have a favorite or another that I have not listed share feel free to share it with us.</p>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/savethedevelopersorg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linked Lists in Java Part 2</title>
		<link>http://corymathews.com/linked-lists-in-java-part-2/</link>
		<comments>http://corymathews.com/linked-lists-in-java-part-2/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 17:05:14 +0000</pubDate>
		<dc:creator>CoryMathews</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Lists]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://corymathews.com/?p=63</guid>
		<description><![CDATA[In Part One we learned the basics of using the Linked list class in java. I showed how to create, add, edit, and remove items from the list. Now I am going to show you how to use the following functions: .toString(), .equal(), .hashCode(), .isEmpty(), .subList(), .contains(), For all my examples I am using the [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://corymathews.com/index.php?p=61">Part One</a> we learned the basics of using the Linked list class in java. I showed how to create, add, edit, and remove items from the list.</p>
<p>Now I am going to show you how to use the following functions:</p>
<pre class="prettyprint linenumstrigger linenums">.toString(), .equal(), .hashCode(), .isEmpty(), .subList(), .contains(),</pre>
<p>For all my examples I am using the list MyList with the contents [1, 2, 3].</p>
<p><strong>.toString() </strong></p>
<p>This function is an excellent debugging statement, or just a simple very quick way to see everything in your list. Its simple to use:</p>
<pre class="prettyprint linenumstrigger linenums">
MyList.toString();
//or to print out the list
System.out.println(MyList.toString());
</pre>
<p>This would print out:</p>
<pre class="prettyprint linenumstrigger linenums">[1, 2, 3]</pre>
<p><strong>.equal()</strong></p>
<p>This method does exactly what you would think it would. It compares two lists to see if they are equal. For two lists to be equal they must have all the same items, and they must be in the same order. So in other words one must be a deep copy of the other. Here is a little example using .equal() and .toString().</p>
<pre class="prettyprint linenumstrigger linenums">
MyList.add(&quot;1&quot;);
MyList.add(&quot;2&quot;);
MyList.add(&quot;3&quot;);
MyList2.add(&quot;1&quot;);
MyList2.add(&quot;2&quot;);
MyList2.add(&quot;3&quot;);
System.out.println(MyList.toString());
System.out.println(MyList2.toString());
System.out.println(MyList.equals(MyList2));

MyList2.remove(1);
MyList2.add(&quot;2&quot;);
System.out.println(MyList.toString());
System.out.println(MyList2.toString());
System.out.println(MyList.equals(MyList2));
</pre>
<p>This would print out</p>
<pre class="prettyprint linenumstrigger linenums">[1, 2, 3]
[1, 2, 3]
true
[1, 2, 3]
[1, 3, 2]
false</pre>
<p><strong>.hashCode()</strong></p>
<p>.hashCode() uses an algorithm to generate a number based on the list. This can be used for encryption or anything that you need a simple reliable number to represent a list. Sun provides the algorithm for generating the number and here it is.</p>
<pre class="prettyprint linenumstrigger linenums">
  hashCode = 1;
  Iterator i = list.iterator();
  while (i.hasNext()) {
      Object obj = i.next();
      hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
  }
</pre>
<p>You don&#8217;t actually need to know its algorithm but its always nice to see what exactly it is doing. so Now here is a short example using the hasCode(). I am using the resulting values from the .equal() section so as a reminder MyList contains [1,2,3] and MyList2 contains [1,3,2] and they are all strings.</p>
<pre class="prettyprint linenumstrigger linenums">
System.out.println(MyList.hashCode());
System.out.println(MyList.hashCode());
</pre>
<p>This would output</p>
<pre class="prettyprint linenumstrigger linenums">
78481
78511</pre>
<p>As you can see these two lists produce different hash codes. So even though the lists contain the same strings they still produce different hash codes.</p>
<p><strong>.isEmpty()</strong></p>
<p>This is a boolean method that does exactly what it says. It return true or false depending if the list contains anything.</p>
<pre class="prettyprint linenumstrigger linenums">System.out.println(MyList.isEmpty());</pre>
<p>would output</p>
<pre class="prettyprint linenumstrigger linenums">false</pre>
<p><strong>.subList()</strong></p>
<p>subList allows you to return a shallow copy of part of the list. So changing the values of the subList will change the values of the original list. So for example MyList contains [1,2,3] the example code:</p>
<pre class="prettyprint linenumstrigger linenums">System.out.println(MyList.subList(0,3));
System.out.println(MyList.subList(1,2));
System.out.println(MyList.subList(2,3));
System.out.println(MyList.subList(2,6));</pre>
<p>displays</p>
<pre class="prettyprint linenumstrigger linenums">[1, 2, 3]
[2]
[3]
Exception in thread &quot;main&quot; java.lang.IndexOutOfBoundsException: toIndex = 6
at java.util.SubList.(AbstractList.java:705)
at java.util.AbstractList.subList(AbstractList.java:570)
at LinkedListTest.main(LinkedListTest.java:37)

Since my list is only 3 items long you can see that trying to go to 6 gives and IndexOutOfBoundsException and crashes. But looking at the 3 previous calls, I can get the entire list as a sublist, kind of pointless but it can be done. I can also take just specific elements as you see in the middle 2 examples.

We can also combine subList and clear to imitate the method removeRange which for whatever reason I could never get to work. The code:

&lt;code&gt;MyList.subList(0, 2).clear();
System.out.println(MyList.size());
System.out.println(MyList.toString());</pre>
<p>would change our list and output</p>
<pre class="prettyprint linenumstrigger linenums">1
[3]</pre>
<p><strong>.contains()</strong></p>
<p>This is a very useful method. It return a true or false depending if the item you are looking for is in the list or not. So if i was to run the code</p>
<pre class="prettyprint linenumstrigger linenums">
System.out.println(MyList.contains(&quot;1&quot;));
System.out.println(MyList.contains(&quot;0&quot;));</pre>
<p>It would print out</p>
<pre class="prettyprint linenumstrigger linenums">true
false</pre>
<p>Thats all for now, as always here is an example source with all the explained methods being used.</p>
<pre class="prettyprint linenumstrigger linenums">
import java.util.*;
public class LinkedListTest
{
  public static void main(String[] args)
  {
	  LinkedList MyList = new LinkedList();
	  LinkedList MyList2 = new LinkedList();

	  MyList.add(&quot;1&quot;);
	  MyList.add(&quot;2&quot;);
	  MyList.add(&quot;3&quot;);
	  MyList2.add(&quot;1&quot;);
	  MyList2.add(&quot;2&quot;);
	  MyList2.add(&quot;3&quot;);
	  System.out.println(MyList.toString());
	  System.out.println(MyList2.toString());
	  System.out.println(MyList.equals(MyList2));

	  MyList2.remove(1);
	  MyList2.add(&quot;2&quot;);
	  System.out.println(MyList.toString());
	  System.out.println(MyList2.toString());
	  System.out.println(MyList.equals(MyList2));

	  System.out.println(MyList.hashCode());
	  System.out.println(MyList2.hashCode());

	  System.out.println(MyList.isEmpty());
	  System.out.println(MyList.subList(0,3));
	  System.out.println(MyList.subList(1,2));
	  System.out.println(MyList.subList(2,3));
	  MyList.subList(0, 2).clear();
	  System.out.println(MyList.size());
	  System.out.println(MyList.toString());
	  MyList.add(&quot;2&quot;);
	  MyList.add(&quot;1&quot;);

	  System.out.println(MyList.contains(&quot;1&quot;));
	  System.out.println(MyList.contains(&quot;0&quot;));
  }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://corymathews.com/linked-lists-in-java-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

