<?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>DansNetwork.com</title>
	<atom:link href="http://dansnetwork.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dansnetwork.com</link>
	<description>Web Design, Javascript, CSS, and More...</description>
	<lastBuildDate>Tue, 01 Dec 2009 02:24:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Round Half To Even With Javascript</title>
		<link>http://dansnetwork.com/2009/11/30/round-half-to-even-with-javascript/</link>
		<comments>http://dansnetwork.com/2009/11/30/round-half-to-even-with-javascript/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 02:19:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Financial]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://dansnetwork.com/?p=69</guid>
		<description><![CDATA[The following script provides an easy way to perform unbiased rounding, convergent rounding, statistician&#8217;s rounding, Dutch rounding, Gaussian rounding, or bankers&#8217; rounding using Javascript.
Examples
var numToRound = 10.005;
document.write(numToRound.rhte(0.01);
result: 10.00
var numToRound = 10.0015;
document.write(numToRound.rhte(0.001);
result: 10.002
var numToRound = 10.00500000001;
document.write(numToRound.rhte(0.01);
result: 10.01
var numToRound = 1005001;
document.write(numToRound.rhte(10000);
result: 1010000
/*
	Round Half To Even (rhte) extends the 'Number' and 'String' objects

	Argument(placeToRound) examples: 0.0001,0.01,1,10,100

	Usage:
		Number.rhte(rounding value)
			(124.34450000).rhte(0.001) - [Result: [...]]]></description>
			<content:encoded><![CDATA[<p>The following script provides an easy way to perform unbiased rounding, convergent rounding, statistician&#8217;s rounding, Dutch rounding, Gaussian rounding, or bankers&#8217; rounding using Javascript.</p>
<p><span style="text-decoration: underline;">Examples</span></p>
<p><em>var numToRound = 10.005;<br />
document.write(numToRound.rhte(0.01);<br />
result: <span style="text-decoration: underline;">10.00</span></em></p>
<p><strong>var numToRound = 10.0015;<br />
document.write(numToRound.rhte(0.001);<br />
result: <span style="text-decoration: underline;">10.002</span></strong></p>
<p><em>var numToRound = 10.00500000001;<br />
document.write(numToRound.rhte(0.01);<br />
result: <span style="text-decoration: underline;">10.01</span></em></p>
<p><strong>var numToRound = 1005001;<br />
document.write(numToRound.rhte(10000);<br />
result: <span style="text-decoration: underline;">1010000</span></strong></p>
<pre class="brush: jscript;">/*
	Round Half To Even (rhte) extends the 'Number' and 'String' objects

	Argument(placeToRound) examples: 0.0001,0.01,1,10,100

	Usage:
		Number.rhte(rounding value)
			(124.34450000).rhte(0.001) - [Result: 124.344]
			(124.34450001).rhte(0.001) - [Result: 124.345]
			(124.34550000).rhte(0.001) - [Result: 124.346]

		String.rhte(rounding value)
			'124.34450000'.rhte(0.001) - [Result: 124.344]
			'124.34450001'.rhte(0.001) - [Result: 124.345]
			'124.34550000'.rhte(0.001) - [Result: 124.346]
*/
function rhte(placeToRound){
	var pToRnd = parseFloat(placeToRound);
	var decNum = parseFloat(this)/pToRnd;
	var floor = Math.floor(decNum);
	var dec = decNum - floor;
	var floor,oddEven,places;
	parseFloat(this) &gt; 0 ? floor = Math.floor(decNum) : floor = Math.ceil(decNum);
	pToRnd &lt; 1 ? places = pToRnd.toString().split('.')[1].length : places = 0;
	floor % 2 == 1 ? oddEven = 1 : oddEven = 0;
	if(dec != 0.5){
		return ((Math.round(decNum)) * pToRnd).toFixed(places);
	}
	else{
		if(oddEven == 1){
			return ((floor + 1) * pToRnd).toFixed(places);
		}
		else{
			return (floor * pToRnd).toFixed(places);
		}
	}
}

Number.prototype.rhte = rhte;
String.prototype.rhte = rhte;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2009/11/30/round-half-to-even-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress postMash Widget</title>
		<link>http://dansnetwork.com/2009/07/21/wordpress-postmash-widget/</link>
		<comments>http://dansnetwork.com/2009/07/21/wordpress-postmash-widget/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 21:57:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://dansnetwork.com/?p=56</guid>
		<description><![CDATA[I really like the postMash plugin for Wordpress. It allows you to drag and drop your posts into any order. This is great when using posts as events. You can put them into the order that they&#8217;ll occur rather than the order that you posted them. The only problem is that the Recent Posts widget [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I really like the <a href="http://joelstarnes.co.uk/blog/postMash/">postMash</a> plugin for Wordpress. It allows you to drag and drop your posts into any order. This is great when using posts as events. You can put them into the order that they&#8217;ll occur rather than the order that you posted them. The only problem is that the Recent Posts widget won&#8217;t match your post order once you&#8217;ve re-ordered them.</p>
<p style="text-align: left;">Here I&#8217;ve modified the Recent Posts widget (file: /wp-includes/<strong>default-widgets.php</strong>) so that it&#8217;ll work with this plugin.</p>
<p>
Insert the following code after line #545 (<em>$r = new WP_Query(array(&#8217;showposts&#8217; =>&#8230;</em>)(WP ver-2.8)</p>
<pre class="brush: php;">
$r-&gt;set('orderby', 'menu_order');
$r-&gt;set('order', 'ASC');
$r-&gt;get_posts();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2009/07/21/wordpress-postmash-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slicehost &#8211; Ubuntu Quick Setup</title>
		<link>http://dansnetwork.com/2009/04/21/slicehost-ubuntu-quick-setup/</link>
		<comments>http://dansnetwork.com/2009/04/21/slicehost-ubuntu-quick-setup/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 13:37:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://dansnetwork.com/?p=39</guid>
		<description><![CDATA[I&#8217;ve been looking at different hosting options for the past few weeks (mainly dedicated and virtual private / virtual dedicated). It seems as if they&#8217;re all out to nickle and dime you to death. &#8220;Oh, you want your server to be connected to the internet?&#8230; that&#8217;ll be an extra $20/mo please&#8221;. They don&#8217;t even really [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking at different hosting options for the past few weeks (mainly dedicated and virtual private / virtual dedicated). It seems as if they&#8217;re all out to nickle and dime you to death. &#8220;Oh, you want your server to be connected to the internet?&#8230; that&#8217;ll be an extra $20/mo please&#8221;. They don&#8217;t even really say &#8220;please&#8221; (I threw that in myself). Through some forums, I discovered a company called <a title="slicehost" href="http://slicehost.com">slicehost</a>. They only sell VPS plans, but it seems as if they know what we (the developer) want. It says so right on their website. They offer multiple flavors of Linux installs and you have full root access to them along with a bunch of other features. Last year Slicehost was aquired by the mighty <a title="rackspace" href="http://rackspace.com">RackSpace</a>, one of the top hosting companies in the world.</p>
<p>Everything sounded interesting, so I decided to try my first &#8220;slice&#8221;. I went with the 256, knowing that I can upgrade at any time. After you pay, your slice is ready within minutes and your ip address and root password are emailed to you. I chose to go with an Ubuntu image (8.04 LTS) and I&#8217;ll show you how to get it up and running ASAP!</p>
<p>If you like this tutorial and think would like to try out a slice for yourself (currently starting at only $20/mo.), please don&#8217;t be affraid to use my refferal link:<br />
<a title="slicehost" href="https://manage.slicehost.com/customers/new?referrer=6167bb58471750b3ab3d4ece5277a150">https://manage.slicehost.com/customers/new?referrer=6167bb58471750b3ab3d4ece5277a150</a></p>
<p>Go ahead and login to your server (I use <a title="PuTTY" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY </a>for Windows for my SSH needs). The first thing that you&#8217;ll probably want to do is change your root password and then setup a user for yourself, so that you won&#8217;t be working as root all of the time.</p>
<p>Next we&#8217;ll install Apache 2:</p>
<p style="padding:5px 0 20px 30px; border:1px solid #CCC;"><strong>sudo apt-get install apache2</strong></p>
<p>&#8230; and then MySQL. Be sure to set your root password:</p>
<p style="padding:5px 0 20px 30px; border:1px solid #CCC;"><strong>sudo apt-get install mysql-server</strong></p>
<p>For MySQL management I installed phpMyAdmin (this will also install PHP as a dependency):</p>
<p style="padding:5px 0 20px 30px; border:1px solid #CCC;"><strong>sudo apt-get install phpMyAdmin</strong></p>
<p>As an extra admin tool, you can install Webmin. I just downloaded this into my home directory with wget:</p>
<p style="padding:5px 0 20px 30px; border:1px solid #CCC;"><strong>wget http://link_to_current_webmin.deb</strong></p>
<p>To install Webmin you can use (replace current_webmin.deb with the name of the deb file that you downloaded with wget):</p>
<p style="padding:5px 0 20px 30px; border:1px solid #CCC;"><strong>dpkg -i current_webmin.deb</strong></p>
<p>It will probably fail due to a lack of dependencies, so you can run apt to fix it. This should also continue the Webmin installation:</p>
<p style="padding:5px 0 20px 30px; border:1px solid #CCC;"><strong>sudo apt-get &#8211;fix-broken</strong></p>
<p>You should now be able to access your server at: https://your-ip-address:10000<br />
You&#8217;ll have to add an exception to your browser for the invalid SSL cert. It&#8217;s ok to do so.</p>
<p>Lastly I just installed ProFTPD, for my FTP server, through Webmin. There&#8217;s a one click install under unused modules or you can use:</p>
<p style="padding:5px 0 20px 30px; border:1px solid #CCC;"><strong>sudo apt-get install proftpd</strong></p>
<p>Once this was installed, I used Edit Config Files to uncomment (remove the &#8216;#&#8217;) &#8220;DefaultRoot ~&#8221; (this allows users access to only their home directories) and add the line: &#8220;IdentLookups Off&#8221; (this speeds up the login process).</p>
<p>At this point, Webmin showed my memory usage at less than half (102MB) of the 256MB allotted and my disk usage at around 1.2GB of the 10GB for this plan! I just set my slice up, so I can&#8217;t comment on it&#8217;s performance as of yet.</p>
<p>I hope this is a good start to get you up and running. I can&#8217;t guarantee that this is the most secure setup, but it&#8217;s a start&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2009/04/21/slicehost-ubuntu-quick-setup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery Classes &#8211; An Object Oriented Approach</title>
		<link>http://dansnetwork.com/2009/04/14/jquery-classes-object-oriented-approach/</link>
		<comments>http://dansnetwork.com/2009/04/14/jquery-classes-object-oriented-approach/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 04:40:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://dansnetwork.com/?p=33</guid>
		<description><![CDATA[MooTools has been my framework of choice for the past couple of years. I&#8217;ve worked my way up to using Classes for most of my projects and really liked using the OOP approach. For the past couple of projects, I started using Wordpress as my CMS and every time ended up using jQuery. I was [...]]]></description>
			<content:encoded><![CDATA[<p>MooTools has been my framework of choice for the past couple of years. I&#8217;ve worked my way up to using <a title="MooTools Classes" href="http://mootools.net/docs/Class/Class">Classes</a> for most of my projects and really liked using the OOP approach. For the past couple of projects, I started using Wordpress as my CMS and every time ended up using jQuery. I was disappointed to find out that it didn&#8217;t have the native Class library that MooTools did. Fortunately there are a couple of plugins available to assist with this task:</p>
<p>- A plugin that adds class functionality to jQuery: <a title="jQuery-Klass" href="http://code.google.com/p/jquery-klass/">jQuery-Klass</a></p>
<p>- John Resig himself wrote this library/plugin: <a title="Classy Query" href="http://ejohn.org/blog/classy-query/">Classy Query</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2009/04/14/jquery-classes-object-oriented-approach/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New BBC Radio 1 RTSP Stream Format</title>
		<link>http://dansnetwork.com/2009/02/14/new-bbc-radio-1-rtsp-stream-format/</link>
		<comments>http://dansnetwork.com/2009/02/14/new-bbc-radio-1-rtsp-stream-format/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 16:24:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[radio1]]></category>
		<category><![CDATA[rip]]></category>
		<category><![CDATA[rtsp]]></category>

		<guid isPermaLink="false">http://blog.dansnetwork.com/2009/02/14/new-bbc-radio-1-rtsp-stream-format/</guid>
		<description><![CDATA[Every week or two I rip some new music from Radio 1 for my IPod Nano w/RockBox firmware (had to throw that in). It looks like they&#8217;ve changed the stream URL format. They used to use the DJ&#8217;s name in the URL, but now they are using the day of week and show time. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Every week or two I rip some new music from Radio 1 for my IPod Nano w/RockBox firmware (had to throw that in). It looks like they&#8217;ve changed the stream URL format. They used to use the DJ&#8217;s name in the URL, but now they are using the day of week and show time. Here&#8217;s a couple examples.</p>
<pre class="brush: jscript;">

Pete Tong:
rtsp://rmv8.bbc.net.uk:554/radio1coyopa/radio_1_-_friday_1900.ra

Fabio and Grooverider:
rtsp://rmv8.bbc.net.uk:554/radio1coyopa/radio_1_-_sunday_0100.ra
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2009/02/14/new-bbc-radio-1-rtsp-stream-format/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JavaScript ISO8601/RFC3339 Date Parser</title>
		<link>http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/</link>
		<comments>http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 03:26:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[iso8601]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/</guid>
		<description><![CDATA[Updated (bug fix): 2-11-09
In need of a JavaScript function that would parse an ISO8601 compliant date, I came across an attempt (http://delete.me.uk/2005/03/iso8601.html) and rewrote it (because I&#8217;m all about reinventing the wheel). My function extends the Date object and allows you to pass in an ISO8601 date (2008-11-01T20:39:57.78-06:00). The function will then return the Date. [...]]]></description>
			<content:encoded><![CDATA[<p>Updated (bug fix): 2-11-09</p>
<p>In need of a JavaScript function that would parse an ISO8601 compliant date, I came across an attempt (<a href="http://delete.me.uk/2005/03/iso8601.html" title="iso8601">http://delete.me.uk/2005/03/iso8601.html</a>) and rewrote it (because I&#8217;m all about reinventing the wheel). My function extends the Date object and allows you to pass in an ISO8601 date (<strong>2008-11-01T20:39:57.78-06:00</strong>). The function will then return the Date. In the date string argument the dashes and colons are optional. The decimal point for milliseconds is mandatory (although specifying milliseconds isn&#8217;t). If a timezone offset is specified, the &#8216;+&#8217; or &#8216;-&#8217; sign must be included. This function should also work with iCalendar(RFC2445) formatted dates. If a the date string doesn&#8217;t match the format, there will be a final attempt to parse it with the built in Date.parse() method.</p>
<p>Code:</p>
<pre class="brush: jscript;">

Date.prototype.setISO8601 = function(dString){

var regexp = /(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/;

if (dString.toString().match(new RegExp(regexp))) {
var d = dString.match(new RegExp(regexp));
var offset = 0;

this.setUTCDate(1);
this.setUTCFullYear(parseInt(d[1],10));
this.setUTCMonth(parseInt(d[3],10) - 1);
this.setUTCDate(parseInt(d[5],10));
this.setUTCHours(parseInt(d[7],10));
this.setUTCMinutes(parseInt(d[9],10));
this.setUTCSeconds(parseInt(d[11],10));
if (d[12])
this.setUTCMilliseconds(parseFloat(d[12]) * 1000);
else
this.setUTCMilliseconds(0);
if (d[13] != 'Z') {
offset = (d[15] * 60) + parseInt(d[17],10);
offset *= ((d[14] == '-') ? -1 : 1);
this.setTime(this.getTime() - offset * 60 * 1000);
}
}
else {
this.setTime(Date.parse(dString));
}
return this;
};
</pre>
<p>Usage:</p>
<pre class="brush: jscript;">

var today = new Date();
today.setISO8601('2008-12-19T16:39:57.67Z');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MooTools Events Calendar &#8211; Web Embeddable Javascript Calendar</title>
		<link>http://dansnetwork.com/2008/10/03/mootools-events-calendar-web-embeddable-javascript-calendar/</link>
		<comments>http://dansnetwork.com/2008/10/03/mootools-events-calendar-web-embeddable-javascript-calendar/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 02:06:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/10/03/mootools-events-calendar-web-embeddable-javascript-calendar/</guid>
		<description><![CDATA[This is the official release of the unofficial MooTools Events Calendar. It is an embeddable web calendar that was built using the MooTools JavaScript framework. Currently, it is still under development, but may be sufficient for your needs. Check out the project page here: MooTools Events Calendar
-
v0.3.0 (August 5, 2009)


Accepts events that span across multiple [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dansnetwork.com/mootools/images/mooECal_150.jpg" border="0" alt="Month View" hspace="10" vspace="5" width="150" height="81" align="left" />This is the official release of the unofficial MooTools Events Calendar. It is an embeddable web calendar that was built using the MooTools JavaScript framework. Currently, it is still under development, but may be sufficient for your needs. Check out the project page here: <a title="MooTools Events Calendar" href="http://dansnetwork.com/mootools/events-calendar/">MooTools Events Calendar</a></p>
<p>-</p>
<p><strong><span style="text-decoration: underline;">v0.3.0 (August 5, 2009)<br />
</span></strong></p>
<ul>
<li>Accepts events that span across multiple days</li>
<li>MooTools v1.2.3 required.</li>
</ul>
<p><strong><span style="text-decoration: underline;">v0.2.2 (April 11, 2009)<br />
</span></strong></p>
<ul>
<li>Fixed a rendering problem for people outside of the U.S.</li>
<li>Added the option for weeks to start on Monday</li>
</ul>
<p><strong><span style="text-decoration: underline;">v0.2.1 (Feb 9, 2009)<br />
</span></strong></p>
<ul>
<li>bug fix &#8211; usage error with parseInt(). Events wouldn&#8217;t load on the 8th and 9th of a month.</li>
<li>HTML allowed in events. This allows for events to link elsewhere.</li>
</ul>
<p><strong><span style="text-decoration: underline;">v0.2.0 (Feb 1, 2009) </span></strong></p>
<ul>
<li>uses plug-ins or direct loading through the constructor for events</li>
<li>uses iCal/ISO 8601 dates/times for event input</li>
<li>different style sheets can be used for 3 different sized calendars</li>
</ul>
<p><span style="text-decoration: underline;"><strong>v0.1.0 (Oct 3, 2008) </strong></span></p>
<ul>
<li>month, week, and day views</li>
<li>tool tips for month view events (using Tips)</li>
<li>scrolling day events for month view (using Scroller)</li>
<li>events loaded manually or possibly through a JSON feed</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2008/10/03/mootools-events-calendar-web-embeddable-javascript-calendar/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Javascript Date Object &#8211; Adding and Subtracting Months</title>
		<link>http://dansnetwork.com/2008/09/18/javascript-date-object-adding-and-subtracting-months/</link>
		<comments>http://dansnetwork.com/2008/09/18/javascript-date-object-adding-and-subtracting-months/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 12:05:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[extending the DOM]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/09/18/javascript-date-object-adding-and-subtracting-months/</guid>
		<description><![CDATA[There is a slight problem with the Javascript Date() Object when trying to advance to the next month or go back to the previous month. For example, if your date is set to October 31, 2008 and you add one month, you&#8217;d probably expect the new date to be November 30, 2008 because November 31st [...]]]></description>
			<content:encoded><![CDATA[<p>There is a slight problem with the Javascript Date() Object when trying to advance to the next month or go back to the previous month. For example, if your date is set to October 31, 2008 and you add one month, you&#8217;d probably expect the new date to be November 30, 2008 because November 31st doesn&#8217;t exist. This, however, isn&#8217;t the case. Javascript automatically advances your Date object to December 1st. This functionality is very useful in most situations(i.e. adding days to a date, determining the number of days in a month or if it&#8217;s a leap year), but not for adding/subtracting months. I&#8217;ve put together some functions below that extend the Date() object: <strong>nextMonth()</strong> and <strong>prevMonth()</strong> <em>See the example below for their usage and please feel free to use these in your applications.</em></p>
<p>Extends the Date Object:</p>
<pre class="brush: jscript;">
function prevMonth(){
var thisMonth = this.getMonth();
this.setMonth(thisMonth-1);
if(this.getMonth() != thisMonth-1 &amp;&amp; (this.getMonth() != 11 || (thisMonth == 11 &amp;&amp; this.getDate() == 1)))
this.setDate(0);
}
function nextMonth(){
var thisMonth = this.getMonth();
this.setMonth(thisMonth+1);
if(this.getMonth() != thisMonth+1 &amp;&amp; this.getMonth() != 0)
this.setDate(0);
}

Date.prototype.nextMonth = nextMonth;
Date.prototype.prevMonth = prevMonth;
</pre>
<p>Example of Usage:</p>
<pre class="brush: jscript;">

function getPrevMonth(){
var today = new Date(2008,9,31); //set &quot;today&quot; to October 31, 2008
today.prevMonth(); //show one month earlier -&gt; September 30, 2008 (instead of September 31, 2008 which converts to October 1st, 2008
}
function getNextMonth(){
var today = new Date(2008,9,31); //set &quot;today&quot; to October 31, 2008
today.nextMonth(); //show one month later -&gt; November 30, 2008 (instead of November 31, 2008 which converts to December 1st, 2008
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2008/09/18/javascript-date-object-adding-and-subtracting-months/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SmartLinc &#8211; Unable to Retrieve Device State</title>
		<link>http://dansnetwork.com/2008/09/10/smartlinc-unable-to-retrieve-device-state/</link>
		<comments>http://dansnetwork.com/2008/09/10/smartlinc-unable-to-retrieve-device-state/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 22:42:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[insteon]]></category>
		<category><![CDATA[netlinc]]></category>
		<category><![CDATA[smarthome]]></category>
		<category><![CDATA[smartlinc]]></category>

		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/09/10/smartlinc-unable-to-retrieve-device-state/</guid>
		<description><![CDATA[The Insteon SmartLinc had less functionality than I had expected. Even though you can control your devices from a web page, it still seems pretty locked down. Devices have to be &#8220;linked&#8221; into the controller in order for you to control them. I was hoping that you would only have to know the Insteon ID [...]]]></description>
			<content:encoded><![CDATA[<p>The Insteon SmartLinc had less functionality than I had expected. Even though you can control your devices from a web page, it still seems pretty locked down. Devices have to be &#8220;linked&#8221; into the controller in order for you to control them. I was hoping that you would only have to know the Insteon ID of the device to turn it on or off. The final straw was the fact that I couldn&#8217;t retrieve the state of a device from the SmartLinc. I asked the professional people at SmartHome and they told me that I could:</p>
<blockquote><p> <strong>set up an IP camera to see the status of my lights</strong>&#8230;</p></blockquote>
<p>WOW. Obtaining the status of your devices is one of the main features of the Insteon platform. How could they have left this out? So, sadly enough, I had to request an RMA# and have shipped it back!</p>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2008/09/10/smartlinc-unable-to-retrieve-device-state/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Based Insteon Controller &#8211; SmartLinc/NetLinc</title>
		<link>http://dansnetwork.com/2008/07/27/web-based-insteon-controller-netlinc/</link>
		<comments>http://dansnetwork.com/2008/07/27/web-based-insteon-controller-netlinc/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 00:26:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[insteon]]></category>
		<category><![CDATA[netlinc]]></category>
		<category><![CDATA[smarthome]]></category>
		<category><![CDATA[smartlinc]]></category>

		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/07/27/web-based-insteon-controller-netlinc/</guid>
		<description><![CDATA[There&#8217;s a new Insteon controller out there that uses a built-in web server to control your Insteon devices. It&#8217;s called NetLinc and has a price tag of $119.99 from SmartHome (of coarse). I believe that this is going to be one of SmartHome&#8217;s biggest Insteon products yet. In the past, Insteon controllers have been pretty [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.dansnetwork.com/images/NetLinc.jpg" alt="NetLinc" width="150" align="left" border="0" height="150" />There&#8217;s a new Insteon controller out there that uses a built-in web server to control your Insteon devices. It&#8217;s called <a href="http://smarthome.com/netlinc" title="NetLinc" target="_blank">NetLinc</a> and has a price tag of <a href="http://www.smarthome.com/2412n.html" title="NetLinc" target="_blank">$119.99 from SmartHome</a> (of coarse). I believe that this is going to be one of SmartHome&#8217;s biggest Insteon products yet. In the past, Insteon controllers have been pretty locked down as far as user manipulation is concerned. With an HTTP controlled device such as this one, there isn&#8217;t going to be anything to hide. I can already see the numerous custom interfaces being made for any device that has a web browser. This will also open a new market for custom floor plans that can be developed using common web design techniques (GET or POST requests). For a more complex interface, you might be able send XHR(AJAX) requests to the NetLinc to turn on, off, or check the status/state of a device!</p>
<p>SimpleHomeNet has already manufactured a few products that aimed to achieve the same functionality as the NetLinc. They are all quite a bit more expensive though:<br />
<a href="http://www.simplehomenet.com/prods.asp?page_id=prodServers_EZSrve" title="EZSrve" target="_blank">EZSrve Insteon/X10 Home Automation Gateway </a>($209.99)</p>
<p><img src="http://blog.dansnetwork.com/images/EZSrve_l.gif" alt="EZSrve" width="190" border="0" height="201" /></p>
<p><a href="http://www.simplehomenet.com/prods.asp?page_id=prodServers_EZBridgePLM_Combo" title="EZBridge PLM Combo" target="_blank">EZBridge PLM Combo</a> ($199.99)</p>
<p><img src="http://blog.dansnetwork.com/images/EZBridge_Combo.gif" alt="EZBridge Combo" width="240" border="0" height="248" /></p>
<p>I&#8217;ll be ordering my NetLinc soon and can envision my Insteon USB PowerLinc on EBay shortly after!</p>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2008/07/27/web-based-insteon-controller-netlinc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
