<?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>Hodgin.ca</title>
	<atom:link href="http://www.hodgin.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hodgin.ca</link>
	<description>Personal website of Daniel Hodgin (hodgin.daniel@gmail.com)</description>
	<lastBuildDate>Sun, 29 Apr 2012 17:46:16 +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>Microsoft Dynamics CRM 2011 JavaScript Development Reference</title>
		<link>http://www.hodgin.ca/2012/04/09/microsoft-dynamics-crm-2011-javascript-development-reference/</link>
		<comments>http://www.hodgin.ca/2012/04/09/microsoft-dynamics-crm-2011-javascript-development-reference/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 02:40:33 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[customizations]]></category>
		<category><![CDATA[Dynamics CRM2011]]></category>
		<category><![CDATA[JScript]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=498</guid>
		<description><![CDATA[I&#8217;ve been working on the development of a CRM 2011 deployment for a few months now and I&#8217;ve found myself poking around the web to all kinds of different websites looking for references to different parts of the SDK for JavaScript. Now that I&#8217;ve become more familiar with the MSDN Library I&#8217;ve decided to compile [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on the development of a CRM 2011 deployment for a few months now and I&#8217;ve found myself poking around the web to all kinds of different websites looking for references to different parts of the SDK for JavaScript.</p>
<p>Now that I&#8217;ve become more familiar with the MSDN Library I&#8217;ve decided to compile all the major functions for the JavaScript reference into one easy reference point with links branching out to the MSDN library. The MSDN library is amazing but can be rough to navigate and find what you really want fast.</p>
<p>Hope others find this cheat sheet useful.</p>
<p>If you have anything to add, feel free to leave a comment.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="2" valign="top" width="640">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg334511.aspx">Xrm.Page.context Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getAuthenticationHeader">getAuthenticationHeader</a></td>
<td valign="top" width="479">A deprecated method that returns the encoded SOAP header necessary to use Microsoft Dynamics CRM Web service calls using JScript.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getCurrentTheme">getCurrentTheme</a></td>
<td valign="top" width="479">Returns a string representing the current Microsoft Office Outlook theme chosen by the user.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getOrgLcid">getOrgLcid</a></td>
<td valign="top" width="479">Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the base language for the organization.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getOrgUniqueName">getOrgUniqueName</a></td>
<td valign="top" width="479">Returns the unique text value of the organizations name.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getQueryStringParameters">getQueryStringParameters</a></td>
<td valign="top" width="479">Returns an array of key value pairs representing the query string arguments that were passed to the page.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getServerUrl">getServerUrl</a></td>
<td valign="top" width="479">Returns the base server URL. When a user is working offline with Microsoft Dynamics CRM for Microsoft Office Outlook, the URL is to the local Microsoft Dynamics CRM Web services.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getUserId">getUserId</a></td>
<td valign="top" width="479">Returns the GUID value of the SystemUser.id value for the current user.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getUserLcid">getUserLcid</a></td>
<td valign="top" width="479">Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the user selected as their preferred language.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_getUserRoles">getUserRoles</a></td>
<td valign="top" width="479">Returns an array of strings representing the GUID values of each of the security roles that the user is associated with.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_IsOutlookClient.">isOutlookClient</a></td>
<td valign="top" width="479">Returns a Boolean value indicating if the user is using Microsoft Dynamics CRM for Microsoft Office Outlook.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_IsOutlookOnline">isOutlookOnline</a></td>
<td valign="top" width="479">Returns a Boolean value indicating whether the user is connected to the Microsoft Dynamics CRM server while using Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access. When this function returns false, the user is working offline without a connection to the server. They are interacting with an instance of Microsoft Dynamics CRM running on their local computer.</td>
</tr>
<tr>
<td valign="top" width="161"><a href="http://msdn.microsoft.com/en-us/library/d7d0b052-abca-4f81-9b86-0b9dc5e62a66#BKMK_prependOrgName">prependOrgName</a></td>
<td valign="top" width="479">Prepends the organization name to the specified path.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="3" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg334409.aspx">Xrm.Page.data.entity Attribute Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="151">Method</td>
<td valign="top" width="114">Attribute Types</td>
<td valign="top" width="373">Description</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_addOnChange">addOnChange</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Sets a function to be called when the attribute value is changed.See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_removeOnChange">removeOnChange</a></td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_fireOnChange">fireOnChange</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Causes the OnChange event to occur on the attribute so that any script associated to that event can execute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getAttributeType">getAttributeType</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns a string value that represents the type of attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getFormat">getformat</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns a string value that represents formatting options for the attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getInitialValue">getInitialValue</a></td>
<td valign="top" width="114">boolean, optionset</td>
<td valign="top" width="373">Returns the initial value for Boolean or optionset attributes.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getIsDirty">getIsDirty</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns a Boolean value indicating if there are unsaved changes to the attribute value.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getMax">getMax</a></td>
<td valign="top" width="114">money, decimal, integer, double</td>
<td valign="top" width="373">Returns a number indicating the maximum allowed value for an attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getMaxLength">getMaxLength</a></td>
<td valign="top" width="114">string, memo</td>
<td valign="top" width="373">Returns a number indicating the maximum length of a string or memo attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getMin">getMin</a></td>
<td valign="top" width="114">money, decimal, integer, double</td>
<td valign="top" width="373">Returns a number indicating the minimum allowed value for an attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getName">getName</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns a string representing the logical name of the attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getOption">getOption</a></td>
<td valign="top" width="114">optionset</td>
<td valign="top" width="373">Returns an option object with the name matching the argument passed to the method.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getOptions">getOptions</a></td>
<td valign="top" width="114">optionset</td>
<td valign="top" width="373">Returns an array of option objects representing the valid options for an optionset attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getParent">getParent</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns the entity object that is the parent to the attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getPrecision">getPrecision</a></td>
<td valign="top" width="114">money, decimal, integer, double</td>
<td valign="top" width="373">Returns the number of digits allowed to the right of the decimal point.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getRequiredLevel">getRequiredLevel</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns a string value indicating whether a value for the attribute is required or recommended. See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_setRequiredLevel">setRequiredLevel</a></td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getSelectedOption">getSelectedOption</a></td>
<td valign="top" width="114">optionset</td>
<td valign="top" width="373">Returns the option object that is selected in an optionset attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getSubmitMode" target="_blank">getSubmitMode</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns a string indicating when data from the attribute will be submitted when the record is saved. See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_setSubmitMode">setSubmitMode</a></td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getText" target="_blank">getText</a></td>
<td valign="top" width="114">optionset</td>
<td valign="top" width="373">Returns a string value of the text for the currently selected option for an optionset attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getUserPrivilege" target="_blank">getUserPrivilege</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Returns an array of privileges that contain Boolean values indicating if the user can create, read or update data values for an attribute.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getValue" target="_blank">getValue</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Retrieves the data value for an attribute. See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_setValue">setValue</a>.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_removeOnChange" target="_blank">removeOnChange</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Removes a function from the OnChange event hander for an attribute. See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_addOnChange">addOnChange</a></td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_setRequiredLevel" target="_blank">setRequiredLevel</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Sets whether data is required or recommended for the attribute before the record can be saved. See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getRequiredLevel">getRequiredLevel</a>.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_setSubmitMode" target="_blank">setSubmitMode</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Sets whether data from the attribute will be submitted when the record is saved. See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getSubmitMode">getSubmitMode</a>.</td>
</tr>
<tr>
<td valign="top" width="151"><a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_setValue" target="_blank">setValue</a></td>
<td valign="top" width="114">All</td>
<td valign="top" width="373">Sets the data value for an attribute. See also <a href="http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getValue">getValue</a>.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="2" valign="top" width="640">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg334720.aspx">Xrm.Page.data.entity Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="115">Method</td>
<td valign="top" width="525">Description</td>
</tr>
<tr>
<td valign="top" width="115"><a href="http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_addOnSave">addOnSave</a></td>
<td valign="top" width="525">Sets a function to be called when the record is saved.</td>
</tr>
<tr>
<td valign="top" width="115"><a href="http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_getDataXml">getDataXml</a></td>
<td valign="top" width="525">Returns a string representing the xml that will be sent to the server when the record is saved.</td>
</tr>
<tr>
<td valign="top" width="115"><a href="http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_getEntityName">getEntityName</a></td>
<td valign="top" width="525">Returns a string representing the logical name of the entity for the record.</td>
</tr>
<tr>
<td valign="top" width="115"><a href="http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_getId">getId</a></td>
<td valign="top" width="525">Returns a string representing the GUID id value for the record.</td>
</tr>
<tr>
<td valign="top" width="115"><a href="http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_getIsDirty">getIsDirty</a></td>
<td valign="top" width="525">Returns a Boolean value that indicates if any fields in the form have been modified.</td>
</tr>
<tr>
<td valign="top" width="115"><a href="http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_removeOnSave">removeOnSave</a></td>
<td valign="top" width="525">Removes a function from the OnSave event hander.</td>
</tr>
<tr>
<td valign="top" width="115"><a href="http://msdn.microsoft.com/en-us/library/gg334720.aspx#BKMK_save">save</a></td>
<td valign="top" width="525">Saves the record. This method has three possible parameters.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="2" valign="top" width="640">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg328130.aspx">Form Event Handler Execution Context Reference</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg328130.aspx#BKMK_getContext">getContext</a></td>
<td valign="top" width="500">Returns the <a href="http://msdn.microsoft.com/en-us/library/gg328399.aspx">Xrm.Page.context</a> object.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg328130.aspx#BKMK_getDepth">getDepth</a></td>
<td valign="top" width="500">Returns a value that indicates the order in which this handler is executed.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg328130.aspx#BKMK_GetEventArgs">getEventArgs</a></td>
<td valign="top" width="500">Returns an object with methods to manage the <strong>Save</strong> event.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg328130.aspx#BKMK_getEventSource">getEventSource</a></td>
<td valign="top" width="500">Returns a reference to the object that the event occurred on.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg328130.aspx#BKMK_getSharedVariable">getSharedVariable</a></td>
<td valign="top" width="500">Retrieves a variable set using <a href="http://msdn.microsoft.com/en-us/library/gg328130.aspx#BKMK_SetSharedVariable">setSharedVariable</a>.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg328130.aspx#BKMK_SetSharedVariable">setSharedVariable</a></td>
<td valign="top" width="500">Sets the value of a variable to be used by a handler after the current handler completes.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="2" valign="top" width="640">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg327828.aspx">Xrm.Page.ui Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="140">Method</td>
<td valign="top" width="500">Description</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg327828.aspx#BKMK_close">close</a></td>
<td valign="top" width="500">Closes the form.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg327828.aspx#BKMK_getCurrentControl">getCurrentControl</a></td>
<td valign="top" width="500">Returns the control object that currently has focus on the form.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg327828.aspx#BKMK_getFormType">getFormType</a></td>
<td valign="top" width="500">Indicates the form context for the record.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg327828.aspx#BKMK_getViewPortHeight">getViewPortHeight</a></td>
<td valign="top" width="500">Returns the height of the viewport in pixels.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg327828.aspx#BKMK_getViewPortWidth">getViewPortWidth</a></td>
<td valign="top" width="500">Returns the width of the viewport in pixels.</td>
</tr>
<tr>
<td valign="top" width="140"><a href="http://msdn.microsoft.com/en-us/library/gg327828.aspx#BKMK_refreshRibbon">refreshRibbon</a></td>
<td valign="top" width="500">Causes the ribbon to re-evaluate data that controls what is displayed in it.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="3" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg334266.aspx">Xrm.Page.ui Control Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="122">Method</td>
<td valign="top" width="113">Control Types</td>
<td valign="top" width="403">Description</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_addCustomView">addCustomView</a></td>
<td valign="top" width="113">Lookup</td>
<td valign="top" width="403">Adds a new view for the lookup dialog.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_addOption">addOption</a></td>
<td valign="top" width="113">Option Set</td>
<td valign="top" width="403">Adds an option to an Option set control.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_clearOptions">clearOptions</a></td>
<td valign="top" width="113">Option Set</td>
<td valign="top" width="403">Clears all options from an Option Set control.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getAttribute">getAttribute</a></td>
<td valign="top" width="113">Standard, Lookup, OptionSet</td>
<td valign="top" width="403">Returns the attribute that the control is bound to.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getControlType">getControlType</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Returns a value that categorizes controls.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getData">getData</a></td>
<td valign="top" width="113">Silverlight Web resources.</td>
<td valign="top" width="403">Returns the value of the data query string parameter passed to a Silverlight Web resource. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setData">setData</a>.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getDefaultView">getDefaultView</a></td>
<td valign="top" width="113">Lookup</td>
<td valign="top" width="403">Returns the ID value of the default lookup dialog view. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setDefaultView">setDefaultView</a>.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getDisabled">getDisabled</a></td>
<td valign="top" width="113">All except SubGrid.</td>
<td valign="top" width="403">Returns a value that indicates whether the control is disabled. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setDisabled">setDisabled</a>.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getLabel">getLabel</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Returns the label for the control. See also <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setLabel">setLabel</a></td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getName">getName</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Returns the name assigned to the control.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getParent">getParent</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Returns a reference to the section object that contains the control.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getSrc">getSrc</a></td>
<td valign="top" width="113">IFrame, Web Resource</td>
<td valign="top" width="403">Returns the current URL being displayed in an IFRAME. See also <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setSrc">setSrc</a></td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getUrl">getInitialUrl</a></td>
<td valign="top" width="113">IFrame</td>
<td valign="top" width="403">Returns the default URL that an IFrame control is configured to display.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getObject">getObject</a></td>
<td valign="top" width="113">IFrame, Web resource</td>
<td valign="top" width="403">Returns the object in the form representing an IFrame or Web resource.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getVisible">getVisible</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Returns a value that indicates whether the control is currently visible. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setVisible">setVisible</a>.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_refresh">refresh</a></td>
<td valign="top" width="113">SubGrid</td>
<td valign="top" width="403">Refreshes the data displayed in a Sub-Grid</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_removeOption">removeOption</a></td>
<td valign="top" width="113">Option Sets</td>
<td valign="top" width="403">Removes an option from an Option Set control.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setData">setData</a></td>
<td valign="top" width="113">Silverlight Web resources.</td>
<td valign="top" width="403">Sets the value of the data query string parameter passed to a Silverlight Web resource. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getData">getData</a>.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setDefaultView">setDefaultView</a></td>
<td valign="top" width="113">Lookup</td>
<td valign="top" width="403">Sets the default view for the lookup control dialog. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getDefaultView">getDefaultView</a>.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setDisabled">setDisabled</a></td>
<td valign="top" width="113">All except Web Resources and SubGrid.</td>
<td valign="top" width="403">Sets a value that indicates whether the control is disabled. See also <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getDisabled">getDisabled</a></td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setFocus">setFocus</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Sets the focus on the control.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setLabel">setLabel</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Sets the label for the control. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getLabel">getLabel</a>.</td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setSrc">setSrc</a></td>
<td valign="top" width="113">IFrame and Web Resource</td>
<td valign="top" width="403">Sets the URL to be displayed in an IFrame. See also <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getSrc">getSrc</a></td>
</tr>
<tr>
<td valign="top" width="122"><a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_setVisible">setVisible</a></td>
<td valign="top" width="113">All</td>
<td valign="top" width="403">Sets a value that indicates whether the control is visible. For more information, see <a href="http://msdn.microsoft.com/en-us/library/gg334266.aspx#BKMK_getVisible">getVisible</a>.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="4" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg309324.aspx">Xrm.Page.ui.controls Collection Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg309324.aspx#BKMK_xrmPageUiControlsforEach">forEach</a></td>
<td colspan="3" valign="top" width="517">Applies the action contained within a delegate function</td>
</tr>
<tr>
<td rowspan="4" valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg309324.aspx#BKMK_xrmPageUiControlsGet">get</a></td>
<td colspan="3" valign="top" width="517">Returns one or more controls depending on the arguments passed.</td>
</tr>
<tr style="background-color: #285774; color: #ffffff;">
<td valign="top" width="129">Argument</td>
<td valign="top" width="255">Return Value</td>
<td valign="top" width="133">Type</td>
</tr>
<tr>
<td valign="top" width="129">None</td>
<td valign="top" width="255">All the controls</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="129">String</td>
<td valign="top" width="255">The control that matches the name</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg309324.aspx#BKMK_xrmPageUiControlsGetLength">getLength</a></td>
<td colspan="3" valign="top" width="517">Returns the number of controls in the collection</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="4" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg328481.aspx">Xrm.Page.ui.navigation.items Collection Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg328481.aspx#BKMK_navigationforEach">forEach</a></td>
<td colspan="3" valign="top" width="517">Applies the action contained within a delegate function.</td>
</tr>
<tr>
<td rowspan="6" valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg328481.aspx#BKMK_navigationGet">get</a></td>
<td colspan="3" valign="top" width="517">Returns one or more navigation items depending on the arguments passed.</td>
</tr>
<tr style="background-color: #285774; color: #ffffff;">
<td valign="top" width="129">Argument</td>
<td valign="top" width="255">Return Value</td>
<td valign="top" width="133">Type</td>
</tr>
<tr>
<td valign="top" width="129">None</td>
<td valign="top" width="255">All the navigation items</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="129">String</td>
<td valign="top" width="255">The item that matches the name</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Number</td>
<td valign="top" width="255">The item that matches the index</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Delegate function (attribute, index)</td>
<td valign="top" width="255">Any navigation items causing the delegate function to return true</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg328481.aspx#BKMK_navigationGetLength">getLength</a></td>
<td colspan="3" valign="top" width="517">Returns the number of navigation items in the collection.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="4" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg309392.aspx">Xrm.Page.ui.formSelector.items Collection Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg309392.aspx#BKMK_roleFormsForEach">forEach</a></td>
<td colspan="3" valign="top" width="517">Applies the action contained within a delegate function.</td>
</tr>
<tr>
<td rowspan="6" valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg309392.aspx#BKMK_roleformGet">get</a></td>
<td colspan="3" valign="top" width="517">Returns one or more roleForms.</td>
</tr>
<tr style="background-color: #285774; color: #ffffff;">
<td valign="top" width="129">Argument</td>
<td valign="top" width="255">Return Value</td>
<td valign="top" width="133">Type</td>
</tr>
<tr>
<td valign="top" width="129">None</td>
<td valign="top" width="255">All the items</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="129">String</td>
<td valign="top" width="255">The item that matches the name</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Number</td>
<td valign="top" width="255">The item that matches the index</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Delegate function (attribute, index)</td>
<td valign="top" width="255">Any items that cause the delegate function to return true</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg309392.aspx#BKMK_roleFormsGetLength">getLength</a></td>
<td colspan="3" valign="top" width="517">Returns the number of roleForms in the collection.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="4" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg328253.aspx">Xrm.Page.ui.formSelector members</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="121">Member</td>
<td valign="top" width="102">Type</td>
<td valign="top" width="415">Description</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg309392.aspx">items</a></td>
<td valign="top" width="102">Collection</td>
<td valign="top" width="415">A Collection of all the form items accessible to the current user.</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg328253.aspx#BKMK_getCurrentItem">getCurrentItem</a></td>
<td valign="top" width="102">Method</td>
<td valign="top" width="415">Returns a reference to the form currently being shown.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="4" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg334347.aspx">Xrm.Page.ui.tabs Collection</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg334347.aspx#BKMK_tabsForEach">forEach</a></td>
<td colspan="3" valign="top" width="517">Applies the action contained within a delegate function.</td>
</tr>
<tr>
<td rowspan="6" valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg334347.aspx#BKMK_tabsGet">get</a></td>
<td colspan="3" valign="top" width="517">Returns one or more tabs.</td>
</tr>
<tr style="background-color: #285774; color: #ffffff;">
<td valign="top" width="129">Argument</td>
<td valign="top" width="255">Return Value</td>
<td valign="top" width="133">Type</td>
</tr>
<tr>
<td valign="top" width="129">None</td>
<td valign="top" width="255">All the tabs</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="129">String</td>
<td valign="top" width="255">The tab that matches the name</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Number</td>
<td valign="top" width="255">The tab that matches the index</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Delegate function (attribute, index)</td>
<td valign="top" width="255">Any tabs that cause the delegate function to return true</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg334347.aspx#BKMK_tabsGetLength">getLength</a></td>
<td colspan="3" valign="top" width="517">Returns the number of tabs in the collection.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background-image: url('http://www.hodgin.ca/blog/wp-content/themes/black-hat/images/stripes.png');" colspan="4" valign="top" width="638">
<h3 style="margin: 2px; background-color: transparent;"><a style="color: #5eb9f3;" href="http://msdn.microsoft.com/en-us/library/gg328184.aspx">Xrm.Page.data.entity.attributes Collection Methods</a></h3>
</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg328184.aspx#BKMK_forEach">forEach</a></td>
<td colspan="3" valign="top" width="517">Applies the action contained within a delegate function.</td>
</tr>
<tr>
<td rowspan="6" valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg328184.aspx#BKMK_get">get</a></td>
<td colspan="3" valign="top" width="517">Returns one or more attributes.</td>
</tr>
<tr style="background-color: #285774; color: #ffffff;">
<td valign="top" width="129">Argument</td>
<td valign="top" width="255">Return Value</td>
<td valign="top" width="133">Type</td>
</tr>
<tr>
<td valign="top" width="129">None</td>
<td valign="top" width="255">All the attributes</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="129">String</td>
<td valign="top" width="255">The attribute that matches the name</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Number</td>
<td valign="top" width="255">The attribute that matches the index</td>
<td valign="top" width="133">Object</td>
</tr>
<tr>
<td valign="top" width="129">Delegate function (attribute, index)</td>
<td valign="top" width="255">Any attributes that cause the delegate function to return true</td>
<td valign="top" width="133">Array</td>
</tr>
<tr>
<td valign="top" width="121"><a href="http://msdn.microsoft.com/en-us/library/gg328184.aspx#BKMK_getLength">getLength</a></td>
<td colspan="3" valign="top" width="517">Returns the number of items in the collection.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2012/04/09/microsoft-dynamics-crm-2011-javascript-development-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Processing.js fast yet?</title>
		<link>http://www.hodgin.ca/2012/01/20/is-processing-js-fast-yet/</link>
		<comments>http://www.hodgin.ca/2012/01/20/is-processing-js-fast-yet/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 21:23:32 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Processing.js]]></category>
		<category><![CDATA[Seneca College]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=484</guid>
		<description><![CDATA[YES One of my current projects I am working on is an educational game aimed at teaching the concepts of Mendelian Genetics to students. What I&#8217;ve been working on for the last few days is optimizing the game for the web and iPad deployment. My first shot at optimizations is making the game load up [...]]]></description>
			<content:encoded><![CDATA[<h1 style="text-align: center; font-size: 100px;">YES</h1>
<p>One of my current projects I am working on is an educational game aimed at teaching the concepts of Mendelian Genetics to students.</p>
<p>What I&#8217;ve been working on for the last few days is optimizing the game for the web and iPad deployment.</p>
<p>My first shot at optimizations is making the game load up faster.</p>
<p>Comparing <a href="http://www.processingjs.org">Processing.js</a> to Native JAVA Processing on my PC I found the following results and they were surprising!</p>
<p>While the speed results for different pieces of code were different between browsers one thing was clear that the overall total time to complete running the setup() function was fastest in the browser in all cases except for IE9 and Safari on Windows 7. For individual test results only once was one piece of code faster in the JAVA environment compared to the browser.</p>
<p>Test System: Intel core i7, 12gb ram, Windows 7.</p>
<p>The green boxes show the fastest time for that section, when a time was within 1ms I have called it close enough to be a tie. I ran each test 5 times per browser and averaged the results to make sure there were no one offs.</p>
<div id="attachment_492" class="wp-caption aligncenter" style="width: 653px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/PJSspeedTest2.png"><img class="size-full wp-image-492" title="PJSspeedTest" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/PJSspeedTest2.png" alt="" width="643" height="349" /></a><p class="wp-caption-text">Running the setup() loop to initialize the game</p></div>
<p>I&#8217;m sure I will be able to further optimize it in the next few days to be even faster this is just an initial observation. Now that I know whats slow I can work on some async loading or deferred loading. Or just better code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2012/01/20/is-processing-js-fast-yet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to install Windows Server 2008 R2 on Macbook Pro 2011</title>
		<link>http://www.hodgin.ca/2012/01/18/how-to-install-windows-server-2008-r2-on-macbook-pro-2011/</link>
		<comments>http://www.hodgin.ca/2012/01/18/how-to-install-windows-server-2008-r2-on-macbook-pro-2011/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 02:20:34 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Seneca College]]></category>
		<category><![CDATA[WIN210]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=456</guid>
		<description><![CDATA[I recently took on the challenge of teaching a Windows Server 2008 administration course at Seneca College and I spent the weekend working on installing server on a laptop so I can demo it in class. Sounds simple enough right? The thing is my only laptop is from 2007 and has no video driver for [...]]]></description>
			<content:encoded><![CDATA[<p>I recently took on the challenge of teaching a <a href="https://scs.senecac.on.ca/course/win210">Windows Server 2008 administration course at Seneca College</a> and I spent the weekend working on installing server on a laptop so I can demo it in class.</p>
<div id="attachment_482" class="wp-caption aligncenter" style="width: 650px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/IMG_1620.jpg"><img class="size-full wp-image-482" title="IMG_1620" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/IMG_1620.jpg" alt="" width="640" height="480" /></a><p class="wp-caption-text">Windows Server 2008 R2 on Macbook Pro 2011</p></div>
<p>Sounds simple enough right? The thing is my only laptop is from 2007 and has no video driver for 64bit server so I cant attach it to a projector. Otherwise I could use my old dell laptop. So what I am working on is installing Windows Server 2008 on a core i7 Macbook Pro with 8gb of ram <img src='http://www.hodgin.ca/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I started off thinking I could just use <a href="http://www.apple.com/support/bootcamp/">boot camp assistant</a> to install Windows 7 and then put Server 2008 inside a VM on Windows 7 with <a href="https://www.virtualbox.org/">Virtual Box</a> but the problem with that is I have to cover a lecture in one of the weeks on Hyper-V. <a href="http://www.microsoft.com/en-us/server-cloud/windows-server/hyper-v.aspx">Hyper-V</a> is Windows Server&#8217;s virtualization <a href="http://en.wikipedia.org/wiki/Hypervisor">hypervisor</a> technology. You cannot install Hyper-V inside a VM environment and have a scenario where you have a VM inside a VM inside a host.</p>
<p>So my only option is to install Windows Server 2008 R2 as the main host and dual boot OSX Lion with it.</p>
<p>So to begin you&#8217;ll need to have a few things up front.</p>
<ul>
<li>Windows Server 2008 R2 DVD</li>
<li>A USB with about 2GB of free space formatted as FAT32 not NTFS for storing boot camp support files</li>
<li>At least 60GB or more of free space on the HDD, I set aside 200GB (of 500GB total) because I may install Win 7 VM&#8217;s that can take 30GB+ each.</li>
</ul>
<p>Steps involved:</p>
<ol>
<li>I started out by running the boot camp assistant in OSX. The boot camp assistant lets you download the Windows drivers for the Mac and stick them on a USB for later. It also helps you partition the HDD for Win7.</li>
<li>Once you have a partition ready you&#8217;ll reboot and do a normal install of server by booting from the DVD. you&#8217;ll have to format the BOOTCAMP partition as NTFS for server. Make sure you dont format the wrong partition or you&#8217;ll could wipe out your OSX partition.</li>
<li>Once the install finishes you&#8217;ll notice that there is a lot of devices that wont work. You can start by installing all the boot camp drivers on that USB from earlier that boot camp assistant created for you. WARNING: if you do not install boot camp drivers before rebooting you will not be able to press ctrl+alt+del to login to server because the option key is not remapped to alt until you install the bootcamp drivers. You can get around this problem by plugging in a USB keyboard to be able to press ctrl+alt+del.</li>
<li>This will leave you with about 3-4 things still not working. Wireless, Video, Bluetooth, and sound will all not be working.</li>
<li>Windows 7 and Windows Server 2008 R2 were developed in parallel and most windows 7 drivers will work ok in server 2008 R2 just fine. This is mostly the case for everything but video and bluetooth.</li>
<li>The Macbook Pro I have has an Intel HD Graphics 3000 video adapter, and an AMD Radeon HD 6490M graphics card, bootcamp tried to install Nvidia drivers for my video from the USB.</li>
<li>Windows Server 2008 R2 installs as a bare-bones OS with almost everything turned off. This includes wireless and sound. You will need to add the &#8216;Wireless LAN Service&#8217; feature in Server Manager to enable wireless networking.
<p><div id="attachment_480" class="wp-caption aligncenter" style="width: 610px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/enablewireless.png"><img class="size-full wp-image-480" title="enablewireless" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/enablewireless.png" alt="" width="600" height="442" /></a><p class="wp-caption-text">Enable &#39;Wireless LAN Service&#39;</p></div></li>
<li>Sound can be enabled by trying to go into sound properties in control panel. You will get a popup saying the windows audio service is not enabled, do you want to enable it? click yes and your sound should start working and be adjustable by the mac volume keys.
<p><div id="attachment_481" class="wp-caption aligncenter" style="width: 405px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/enablesound.png"><img class="size-full wp-image-481" title="enablesound" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/enablesound.png" alt="" width="395" height="165" /></a><p class="wp-caption-text">Enable Windows Audio Service</p></div></li>
<li>I started searching the web for discussions about getting the audio working and came across a <a href="https://discussions.apple.com/thread/3252675">good post about catalyst not detecting the hardware</a> but the drivers still being able to be installed manually.</li>
<li>I was able to find two different versions of drivers <a href="http://www2.ati.com/DRIVERS/mobile/11-9_mobility_vista_win7_64_dd_ccc_ocl.exe">one from ati.com</a> and <a href="http://downloads.guru3d.com/AMD-Cat-11.10-Preview-3-(8.901.2-October-16)-download-2801.html">one from guru3d.com</a>. I installed the one from Guru3D as it was 11.10 instead of 11.9 and it worked but once i enabled Hyper-V I started getting tons of <a href="http://www.google.ca/search?q=atikmpag+blue+screen&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a">blue screen errors revolving around atikmpag.sys</a>.  When I did some searching I found out that <a href="http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/0f982668-00f2-45fa-95f4-f71cd91cd9c2/">when installing Hyper-V before SP1 on 2008 with Sandy Bridge chipset it can cause BSOD on video errors</a>. And more specifically the AVX feature on Sandy Bridge chips was the cause. A <a href="http://support.microsoft.com/kb/2517374">hotfix is available here</a> but I just <a href="http://www.microsoft.com/download/en/details.aspx?id=5842">installed SP1</a> instead. I ended up uninstalling the video drivers temporarily. If you find yourself getting blue screens boot into safe mode menu with f5 then press f8 for more options and choose last known good configuration and you should be able to boot up and uninstall the video drivers.</li>
<li>If the video drivers are not installed you can probably safely installed the Hyper-V role now.</li>
<li>Do all the Windows Updates now there will be probably about 120 of them in waves because some require others to be installed first. SP1 will show up in Windows Update after about 4 sets of updates. If Hyper-V throws an error saying can&#8217;t initialize a VM when trying to start it and the event log shows error 3040 its related to the SP1 fix and Sandy Bridge chipset most likely.</li>
</ol>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2012/01/18/how-to-install-windows-server-2008-r2-on-macbook-pro-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup Fedora Live 15 on Oracle VirtualBox</title>
		<link>http://www.hodgin.ca/2012/01/07/how-to-setup-fedora-live-15-on-oracle-virtualbox/</link>
		<comments>http://www.hodgin.ca/2012/01/07/how-to-setup-fedora-live-15-on-oracle-virtualbox/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 03:30:33 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Seneca College]]></category>
		<category><![CDATA[ULI101]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=430</guid>
		<description><![CDATA[For the fall semester 2011 I was lucky enough to pickup a contract at Seneca to teach the ULI101 (UNIX/LINUX, Internet) course in the Diploma programs at the college. One of the weeks included a lecture on using Fedora Live. I decided to show my students how to use virtual box in the labs to [...]]]></description>
			<content:encoded><![CDATA[<p>For the fall semester 2011 I was lucky enough to pickup a contract at Seneca to teach the <a href="https://scs.senecac.on.ca/course/uli101/">ULI101 (UNIX/LINUX, Internet) course</a> in the Diploma programs at the college. One of the weeks included a lecture on using <a href="http://fedoraproject.org/">Fedora Live</a>. I decided to show my students how to use virtual box in the labs to use Fedora within a Virtual Machine environment. The infrastructure of Seneca&#8217;s computer labs is setup favorably for this way of using Fedora easily. VM&#8217;s have also become a standard in large corporate environments to help reduce the total cost of ownership on server hardware and to better utilize CPU cycles, power, and floor space in server rooms.</p>
<p>Below is a step by step guide to setup VirtualBox with the Fedora Live ISO on Windows 7.</p>
<p>Step 1: Download Fedora live cd ISO at:<br />
<a href="http://fedoraproject.org/en/download-splash?file=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Live/x86_64/Fedora-16-x86_64-Live-Desktop.iso">http://fedoraproject.org/en/download-splash?file=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Live/x86_64/Fedora-16-x86_64-Live-Desktop.iso</a></p>
<p>Step 2: <a href="http://download.virtualbox.org/virtualbox/4.1.8/VirtualBox-4.1.8-75467-Win.exe">Install virtual box</a>. (Seneca lab computers already have it included in the image).</p>
<p>Step 3: Run Oracle VM VirtualBox Manager.</p>
<div id="attachment_433" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen1.png"><img class="size-full wp-image-433" title="VirtualBox Manager" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen1.png" alt="" width="512" height="383" /></a><p class="wp-caption-text">VirtualBox Manager</p></div>
<p>Step 4: Click New to create a new Virtual Machine using the Fedora ISO you downloaded.</p>
<p>Step 5: Click Next on the Create New Virtual Machine wizard window</p>
<div id="attachment_434" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen2.png"><img class="size-full wp-image-434 " title="Step 6: Setup OS" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen2.png" alt="" width="512" height="333" /></a><p class="wp-caption-text">Step 6: Setup OS</p></div>
<p>Step 6: Give the VM a Name you can recognize easily like &#8220;Fedora Live&#8221;, Choose &#8220;Linux&#8221; from the Operating System list and &#8220;Fedora (64 bit)&#8221; from the Version list.</p>
<div id="attachment_442" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen51.png"><img class="size-full wp-image-442" title="Step 7: Allocate RAM for VM" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen51.png" alt="" width="512" height="333" /></a><p class="wp-caption-text">Step 7: Allocate RAM for VM</p></div>
<p>Step 7: Set the memory to the amount of RAM you want to allocate to the VM. The default of 768mb is fine for most needs. Make sure this amount is less than the host machines total ram  minus 2GB to leave 2GB for windows 7 minimum.</p>
<div id="attachment_435" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen3.png"><img class="size-full wp-image-435 " title="Step 8: Create new hard disk" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen3.png" alt="" width="512" height="333" /></a><p class="wp-caption-text">Step 8: Create new hard disk</p></div>
<p>Step 8: Use defaults for Virtual Hard Disk at 8GB space and &#8220;create a new hard disk&#8221; options, click next.</p>
<div id="attachment_443" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen6.png"><img class="size-full wp-image-443" title="Step 9: Select VDI option" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen6.png" alt="" width="512" height="338" /></a><p class="wp-caption-text">Step 9: Select VDI option</p></div>
<p>Step 9: Use defaults for File type of the &#8220;virtual disk with VDI&#8221;, click next.</p>
<div id="attachment_444" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen7.png"><img class="size-full wp-image-444" title="Step 10: Dynamically allocated HDD size" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen7.png" alt="" width="512" height="338" /></a><p class="wp-caption-text">Step 10: Dynamically allocated HDD size</p></div>
<p>Step 10: Use defaults for &#8220;Dynamically allocated disk size&#8221;, click next.</p>
<div id="attachment_445" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen8.png"><img class="size-full wp-image-445" title="Step 11: VM file size and location" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen8.png" alt="" width="512" height="338" /></a><p class="wp-caption-text">Step 11: VM file size and location</p></div>
<p>Step 11: For Virtual disk file location and size you might want to have students put their VDI file on a USB so they can save it and reuse it in other sessions by remounting it. If they are just using it for one session and throwing away the VM each class session and recreating it then the default settings are fine.</p>
<p>Step 12: Press create to create the VM.</p>
<div id="attachment_446" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen9.png"><img class="size-full wp-image-446" title="Step 13: Start up the VM for the first time" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen9.png" alt="" width="512" height="383" /></a><p class="wp-caption-text">Step 13: Start up the VM for the first time</p></div>
<p>Step 13: Click on the new VM and press start to start it up the first time.</p>
<p>Step 14: Press next to begin, then select the ISO file for Fedora that you downloaded earlier. Press next.</p>
<p>Step 15: Click start to start up the VM.</p>
<div id="attachment_436" class="wp-caption aligncenter" style="width: 522px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen4.png"><img class="size-full wp-image-436" title="Running the VM" src="http://www.hodgin.ca/blog/wp-content/uploads/2012/01/screen4.png" alt="" width="512" height="417" /></a><p class="wp-caption-text">Running the VM</p></div>
<p><em><span style="text-decoration: underline;">Notes about using the VM:</span></em></p>
<p>When you click inside the VM sometimes the VM hijacks the mouse cursor to the window and wont let it move outside the window. To release it the default key is RIGHT CTRL.</p>
<p>you can map a CD or USB drive from the host machine to the fedora VM so you can access files from the local hosts CD, USB, DVD, or HDD even.</p>
<p>The VM will use whatever amount of RAM you allocated it in the setup from the host. If you set it to use 3GB and the host only has 4GB only 1gb would remain for windows which may cause slow downs or virtual box may not let you start the VM at all if the memory amount is to high that it would starve the host machine.</p>
<p>To close the VM you exit it the same way you would if the OS was running normally with Shutdown from the top right menu. the VM will shutdown and close its window automatically.</p>
<p>You can run the VM in fullscreen mode and it will operate similar to how a remote desktop session would work in windows with a small popup tab at the bottom center of the screen to switch back to windowed mode or close the VM window.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2012/01/07/how-to-setup-fedora-live-15-on-oracle-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating custom JScript for Microsoft Dynamics CRM2011</title>
		<link>http://www.hodgin.ca/2011/12/05/creating-custom-jscript-for-microsoft-dynamics-crm2011/</link>
		<comments>http://www.hodgin.ca/2011/12/05/creating-custom-jscript-for-microsoft-dynamics-crm2011/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 05:03:00 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[customizations]]></category>
		<category><![CDATA[Dynamics CRM2011]]></category>
		<category><![CDATA[JScript]]></category>
		<category><![CDATA[CRM2011]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[entities]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[fields]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[wrong quote characters]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=423</guid>
		<description><![CDATA[I&#8217;m in the process of creating some custom JScript code to have some fields on an expense report form auto calculate and to enable one textbox if a certain expense type is selected. I&#8217;ve been at this all day and I have been getting errors along the lines of &#8220;Error: Object expected&#8221; thrown at me [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of creating some custom JScript code to have some fields on an expense report form auto calculate and to enable one textbox if a certain expense type is selected.</p>
<p>I&#8217;ve been at this all day and I have been getting errors along the lines of &#8220;Error: Object expected&#8221; thrown at me from Dynamics when testing on the form.</p>
<p>It turns out the website I was using an example from used the quote characters <strong>“ ”</strong> instead of <strong>&#8221; &#8220;</strong>.</p>
<p>It took me close to <strong>4</strong> hours to figure out why my ENTIRE SCRIPT LIBRARY was broken because of this when I was following some online examples exactly.</p>
<p>Yes that&#8217;s right my entire script library broke because one function had improper quotes and therefor a field object wasn&#8217;t being returned even though the function wasn&#8217;t being called it broke every other function in the library.</p>
<p>So word to the wise if you get an Error: Object expected in Dynamics CRM2011 check the following things:</p>
<ol>
<li>Is your field name spelled EXACTLY right including case? my_fieldname is not the same as my_FieldName</li>
<li>Are there any spaces added by mistake in the name?</li>
<li>Are you using the entity field name or the display name? entity name is correct EX: new_mycustomfield not &#8220;My Custom Field Label&#8221;</li>
<li>Reduce down your JScript library and check for missing semi colons or other functions that may be broken to isolate the proper broken function it may not be where you think it is.</li>
<li>Finally did you copy paste an example from another website? if so check the quotes to make sure they are the proper double quote character it should be <strong>&#8221; &#8220;</strong> not <strong>“ ”</strong></li>
</ol>
<pre>EX: Xrm.Page.getAttribute(<strong>"</strong>new_mycustomfield<strong>"</strong>); not Xrm.Page.getAttribute(<strong>“</strong>new_mycustomfield<strong>”</strong>);</pre>
<p>As a side note always remember to add code to the onSave event handler for the form as well as the onChange handler for a field if you are using read only fields you need to forceSubmit those values to save them.</p>
<pre>EX: Xrm.Page.getAttribute("new_mycustomfield").setSubmitMode("always");</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2011/12/05/creating-custom-jscript-for-microsoft-dynamics-crm2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a commercial game using Processing.js</title>
		<link>http://www.hodgin.ca/2011/10/28/building-a-commercial-game-using-processing-js/</link>
		<comments>http://www.hodgin.ca/2011/10/28/building-a-commercial-game-using-processing-js/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 18:25:43 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Processing.js]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=420</guid>
		<description><![CDATA[Today I gave a presentation at FSOSS 2011 here at Seneca College on how we went about building a commercial game using Processing.js. The presentation covered our development story. It covered what our industry partner does and why they wanted to change from Flash to Processing.js, our development story, and a demo of the game [...]]]></description>
			<content:encoded><![CDATA[<p>Today I gave a presentation at FSOSS 2011 here at Seneca College on how we went about building a commercial game using Processing.js.</p>
<p>The presentation covered our development story. It covered what our industry partner does and why they wanted to change from Flash to Processing.js, our development story, and a demo of the game in its beta state.</p>
<p>I created the presentation using the deck.js library which allows you to create slide show presentations in a web browser using HTML and JavaScript. What&#8217;s cool about this is that it allows you to do things like put a HTML 5 canvas, audio, or video element in your slide.</p>
<p>With this library I was able to have a live demo of the game in a slide or embed other HTML 5 content.</p>
<p>Here is the video of our talk.</p>
<p>
<object style="width:662px; height:440px;">
<param name="movie" value="http://www.youtube.com/v/-i5xSVJEbS8?version=3" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="window" />
<embed src="http://www.youtube.com/v/-i5xSVJEbS8?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" wmode="window" width="662" height="440"></object>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2011/10/28/building-a-commercial-game-using-processing-js/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Building a 680 Megapixel image with Processing</title>
		<link>http://www.hodgin.ca/2011/09/15/building-a-680-megapixel-image-with-processing/</link>
		<comments>http://www.hodgin.ca/2011/09/15/building-a-680-megapixel-image-with-processing/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 19:42:56 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Processing.js]]></category>
		<category><![CDATA[Seneca College]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=409</guid>
		<description><![CDATA[For the last 4 months I have been working on a Game project with Processing and Processing.js at the Centre for Development of open Technology here at Seneca College. This game is designed to help teach the basics of Mendelian Genetics to high school aged students and above.  The concept is to collect and breed [...]]]></description>
			<content:encoded><![CDATA[<p>For the last 4 months I have been working on a Game project with <a href="http://processing.org/">Processing</a> and <a href="http://processingjs.org/">Processing.js</a> at the <a href="http://cdot.senecac.on.ca">Centre for Development of open Technology</a> here at Seneca College.</p>
<p>This game is designed to help teach the basics of <a href="http://en.wikipedia.org/wiki/Mendelian_inheritance">Mendelian Genetics</a> to high school aged students and above.  The concept is to collect and breed different dragons and learn how the genetics of it all works because the offspring are created based on the genetics of the parents.</p>
<p>One of the challenges I ran into when building this game was figuring out a way to handle all the different combinations of dragons.  The dragons have 9 genetic traits that differentiate them from one another and each trait has two or three different phenotypes associated with it.  The end result is there are 2592 different dragons that can be created and collected in the game.</p>
<p>These dragons were being dynamically built from a combination of 27 smaller images and then blended together, colorized, and then had patterns applied to them.  In the native Processing JAVA environment this process took only about 100 milliseconds to build each dragon.  But in the Processing.js environment this process took 700ms on Chrome, 1000ms on Firefox, 2500ms on IE9, and a whopping 4500ms on Safari.</p>
<p>This created a lot of problems, such as slow script warnings, when there were more than 4-5 dragons to build on game load.</p>
<p>To solve this problem I created a sketch in Processing to dynamically build every combination of dragon and call save() on it from a PGraphic to save out an image for every dragon in the game.  Now with an automated build process I can quickly (roughly 5 minutes) generate all 2600 dragons into images and load them up with loadImage() or requestImage() in Processing.js significantly improving the load times when starting the game.</p>
<p>As a side challenge to this sketch to generate all the images I added some code to build a massive collage to stick in a copy of every dragon in the game in a giant PGraphics image.</p>
<blockquote><p>PGraphics massiveImage = createGraphics(27648,24576,JAVA2D);</p></blockquote>
<p>Immediately I had problems with this with not enough memory being able to be allocated to the JRE. Because java runs in a 32 bit environment for the PDE I could only allocate about 1600mb of ram to the environment. This meant I would have to create eight separate images and then composite them later in Photoshop unfortunately.  I was still able to do it though and through some crafty code I was able to make eight images that were 6144&#215;13824 in size and then patch them together into a giant 680 megapixel composite image showing all 2592 dragons at 512&#215;512 resolution.</p>
<div id="attachment_415" class="wp-caption aligncenter" style="width: 650px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/09/smalldragons.png"><img class="size-large wp-image-415" title="smalldragons" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/09/smalldragons-910x1024.png" alt="" width="640" height="720" /></a><p class="wp-caption-text">reduced size collage of all 2592 dragons Generated with Processing</p></div>
<p>Compositing the image in Photoshop took 11 GB of ram, 679477248 pixels, and created a 60MB PNG image file in the end.</p>
<p>If I had been able to allocate 4-5GB of RAM to the PDE I think I could have generated the entire image in one shot and I would have liked to have been able to add a sitting and flying image of each dragon bumping up the resolution to 1.35Gigapixels in total.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2011/09/15/building-a-680-megapixel-image-with-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using IIS7.5 with Dropbox to host websites</title>
		<link>http://www.hodgin.ca/2011/08/16/permission-problems-using-iis7-5-with-dropbox-to-host-websites/</link>
		<comments>http://www.hodgin.ca/2011/08/16/permission-problems-using-iis7-5-with-dropbox-to-host-websites/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 17:56:03 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hodgin.ca/?p=405</guid>
		<description><![CDATA[Up until recently I have been developing a web project using Processing.js and hosting it locally using IIS for development and testing. For those who aren&#8217;t familiar with Dropbox it is a service that allows you to store 2GB of files in the cloud on Amazon&#8217;s S3 service for free. It also has Windows and [...]]]></description>
			<content:encoded><![CDATA[<p>Up until recently I have been developing a web project using <a href="http://www.processingjs.org">Processing.js</a> and hosting it locally using <a href="http://www.iis.net/">IIS </a>for development and testing.</p>
<p>For those who aren&#8217;t familiar with <a href="http://www.dropbox.com">Dropbox </a>it is a service that allows you to store 2GB of files in the cloud on Amazon&#8217;s S3 service for free. It also has Windows and Mac clients that sync files from a special folder on your hard drive to the cloud. The service is super simple to use and the integration with a local folder on your PC makes it extremely easy to work from multiple locations or computers with the same set of files because you can sync your files to multiple computers or with multiple Dropbox users by sharing folders.</p>
<p>When you combine this with the power of <a href="http://www.github.com">GitHub </a>and a web server you can create a system that allows you to develop a web project, have it hosted from that folder on the web, and sync all the files between multiple machines as well as check in files to a managed repository cloud for others to work as well.</p>
<p>I can work from home and all my files are automatically synced from work, when I change a file at home it automatically syncs the file to the web server for me and because IIS points to the synced folder to serve to the web it means as I develop remotely my web server is always up to date within a few seconds of saving a file and the website is updated as well.</p>
<p>Recently though we had a power failure at <a href="http://www.senecac.on.ca/">Seneca </a>and something caused IIS to throw permission errors when linking a virtual directory to the Dropbox folder containing my website.</p>
<p>It turned out I had to add the &#8216;Authenticated Users&#8217; to the list of authorized accounts that can access the folder. I am also using Basic Authentication for password protection on the website for a quick and easy way to block anonymous access to the website.</p>
<p>The basic steps for creating a password protected development website that you can sync all your files between machines goes like this:</p>
<ol>
<li>Install Dropbox on all computers you will be working from including your host web server.</li>
<li>Setup your website folder but do not share this folder with other people to modify. This is bad practice you don&#8217;t want others changing files on your website from a folder on their computer. Use a source control repository like <a href="http://www.github.com">Github </a>to manage code.</li>
<li>Install IIS on your host machine.</li>
<li>Verify the port your using to host websites is open (usually port 80) on your network.</li>
<li>Create a user for people who will be accessing the website remotely on the host web server.</li>
<li>Create a virtual directory in the default website and set the alias to whatever name you want your users to access like mydevsite which will be accessed by myserveripordomainurl/mydevsite.</li>
<li>Set the physical path to point to your Dropbox folder.</li>
<li>Click on &#8216;Connect As&#8230;&#8217; and check &#8216;specific User&#8217;, then enter a user that has permissions to access this folder and their password.</li>
<li>Click &#8216;Test Settings&#8230;&#8217; and verify both checks pass ok.</li>
<li>If you have a domain name point it to your server ip or create a CNAME record that points to your IIS server ip to make a friendly url for those accessing your website.</li>
<li>In IIS manager, select your virtual directory and pick &#8216;Authentication&#8217;. Disable Anonymous Authentication and enable Basic Authentication.</li>
<li>Ideally you should Enable SSL and use HTTPS and also use a better authentication method than Basic Authentication but that is beyond the scope of this checklist.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2011/08/16/permission-problems-using-iis7-5-with-dropbox-to-host-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Continuation with Seneca</title>
		<link>http://www.hodgin.ca/2011/05/09/continuation-with-seneca/</link>
		<comments>http://www.hodgin.ca/2011/05/09/continuation-with-seneca/#comments</comments>
		<pubDate>Mon, 09 May 2011 17:09:29 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Processing.js]]></category>
		<category><![CDATA[Seneca College]]></category>

		<guid isPermaLink="false">http://hodgin.ca/?p=390</guid>
		<description><![CDATA[It&#8217;s been a busy first four months of 2011 for me finishing up my last semester for my Bachelors degree in Software Development at Seneca but it appears to be worth it. Now that I&#8217;ve graduated I&#8217;ve taken a position with the Office of Research and Innovation at Seneca in the Center for Development of [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a busy first four months of 2011 for me finishing up my last semester for my Bachelors degree in Software Development at Seneca but it appears to be worth it.</p>
<p>Now that I&#8217;ve graduated I&#8217;ve taken a position with the <a href="http://www.senecac.on.ca/ori/">Office of Research and Innovation</a> at Seneca in the <a href="http://zenit.senecac.on.ca/wiki/index.php/Main_Page">Center for Development of Open Source Technology</a> for the next year working on some projects with industry partners.</p>
<p>Some of them will use <a href="http://www.processingjs.org">Processing.js</a> in part and others will be other technologies. At this point that&#8217;s about all I can say though.</p>
<p>One of the things thats been holding me back from blogging besides limited time availability has been the fact that I&#8217;m waiting on one last grade to officially _officially_ be able to state that I am graduating.</p>
<p>Part of the reason for this was a final project I have been working on for a professor that includes two processing sketches for use with his course website to help teach game programming students the basics of vectors and matricies. Specifically how vector notation works and what the notation means visually.  <a href="http://hodgin.ca/projects/dps901/vector.html">The sketch</a> shows how a vectors coordinates change. As you move the head of the vector around it updates the vector notation in realtime and shows the angle of theta. The second sketch is a <a href="http://hodgin.ca/projects/dps901/matrix.html">matrix multiplication calculator</a> that lets the user type in values for two 4&#215;4 matricies and then press the calculate button to see the result of multiplying them together.</p>
<p>I used standard HTML input boxes and then with JavaScript and Processing.js I take the numbers and multiply them out and show the result in a matrix on a canvas.  Sure I could have done it in pure JS and made it simple but I wanted to make use of Processing.js and the canvas element so that I can add more functionality in the future that shows an animation of how the math works to get the result for each piece of the matrix.</p>
<p>This week I continue work on a few projects here at CDOT. One being a game using Processing.js and another being a dashboard app that will show status of the projects going on at CDOT.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2011/05/09/continuation-with-seneca/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefly + NAS + iPhone + iTunes = awesome</title>
		<link>http://www.hodgin.ca/2011/01/09/firefly-nas-iphone-itunes-awesome/</link>
		<comments>http://www.hodgin.ca/2011/01/09/firefly-nas-iphone-itunes-awesome/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 04:33:47 +0000</pubDate>
		<dc:creator>Daniel H</dc:creator>
				<category><![CDATA[Firefly]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[8Player]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[MLPlayer]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[streaming media]]></category>
		<category><![CDATA[streaming media on iPhone]]></category>

		<guid isPermaLink="false">http://www.hodgin.ca/?p=370</guid>
		<description><![CDATA[I recently purchased a network attached storage server for home for a bunch of different reasons. Mainly so I would be able to backup my important files redundantly, store all my media for the entire network to have access to 24/7 without leaving my PC on, and to eventually allow me to switch my PC [...]]]></description>
			<content:encoded><![CDATA[<p>I recently purchased a network attached storage server for home for a bunch of different reasons. Mainly so I would be able to backup my important files redundantly, store all my media for the entire network to have access to 24/7 without leaving my PC on, and to eventually allow me to switch my PC over to a SSD and just have applications on my pc.</p>
<p>So I pickup a Netgear ReadyNAS NV+ from Canada Computers on boxing day and it was the best purchase I&#8217;ve made in a long time.</p>
<p>It is so much more than a file server with RAID.</p>
<ul>
<li>iTunes streaming media server</li>
<li>DLNA streaming media server</li>
<li>Squeezebox streaming service</li>
<li>Bit Torrent web client</li>
<li>FTP server</li>
<li>CIFS/SMB/NFS/AFP file sharing (WIN/MAC/XNIX)</li>
<li>HTTPS web admin like a router</li>
<li>Remote access from the internet</li>
<li>SSH remote access capabilities</li>
</ul>
<p>And most of this can also be port forwarded from your router so you can access it anywhere on the internet. Add a subdomain DNS record and you have a friendly URL to connect to it all too!</p>
<p>So tonight I spent a few hours setting up the Firefly open source media server that it comes with which allows you to stream music from the NAS to iTunes as a share and selectively play any songs you want as if the music was stored locally.</p>
<p>Sure you can say oh I could just connect iTunes to a shared folder on another computer and do the same and yes you could but can you build a computer with RAID5 and 4TB of space for under $500? You&#8217;ll spend $300 on the HDD&#8217;s alone.</p>
<p>So after I got the iTunes server up and running I started thinking how can I stream to my iPhone now and also I wonder if the apple remote app will work to control my iTunes server now.</p>
<p>The answer was yes to both!</p>
<p>You can grab the Apple Remote app from the app store and connect to your wifi network and authorize your iPhone/iPad/iPod to control iTunes on your PC.  You can then access the iTunes streaming server and have full control over iTunes. You could build a HTPC and connect it up to a home theater and then have wireless control of your music from iPhone with all your media redundantly stored or just store it on the HTPC as well.</p>
<div id="attachment_371" class="wp-caption alignleft" style="width: 170px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0505.png"><img class="size-full wp-image-371" title="IMG_0505" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0505.png" alt="" width="160" height="240" /></a><p class="wp-caption-text">Apps</p></div>
<div id="attachment_373" class="wp-caption alignleft" style="width: 170px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_05071.png"><img class="size-full wp-image-373" title="IMG_0507" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_05071.png" alt="" width="160" height="240" /></a><p class="wp-caption-text">iTunes Server</p></div>
<div id="attachment_374" class="wp-caption alignleft" style="width: 170px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0508.png"><img class="size-full wp-image-374" title="IMG_0508" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0508.png" alt="" width="160" height="240" /></a><p class="wp-caption-text">iTunes Server Playlist</p></div>
<div style="clear: both;">Now if you want to actually stream your media to your iPhone instead of just control your PC with the iPhone you can do that too.  A couple apps I found that can connect to DLNA streaming devices are MLPLayer and 8Player.  Both have lite versions for free to test out.  8Player works over 3G as well so you could port forward your DLNA service out on the web through your router and have streaming music access anywhere in the world with a 3G connection on your iPhone. Not just your music but also movies and photos can be played with these apps.  I streamed a 2.3GB movie over my wifi to my iPhone seamlessly and it worked perfectly.</div>
<div id="attachment_377" class="wp-caption alignleft" style="width: 170px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0510.png"><img class="size-full wp-image-377" title="IMG_0510" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0510.png" alt="" width="160" height="240" /></a><p class="wp-caption-text">8Player browser</p></div>
<div id="attachment_375" class="wp-caption alignleft" style="width: 170px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0511.png"><img class="size-full wp-image-375" title="IMG_0511" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0511.png" alt="" width="160" height="240" /></a><p class="wp-caption-text">8Player movie selection</p></div>
<div id="attachment_376" class="wp-caption alignleft" style="width: 170px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0512.png"><img class="size-full wp-image-376" title="IMG_0512" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0512.png" alt="" width="160" height="240" /></a><p class="wp-caption-text">MLPlayer lite browser</p></div>
<div id="attachment_380" class="wp-caption alignnone" style="width: 490px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_05151.png"><img class="size-full wp-image-380" title="IMG_0515" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_05151.png" alt="" width="480" height="320" /></a><p class="wp-caption-text">District9 in HD streaming (MLPlayer)</p></div>
<div id="attachment_379" class="wp-caption alignnone" style="width: 490px"><a href="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0514.png"><img class="size-full wp-image-379" title="IMG_0514" src="http://www.hodgin.ca/blog/wp-content/uploads/2011/01/IMG_0514.png" alt="" width="480" height="320" /></a><p class="wp-caption-text">Subtitles supported while streaming from DLNA</p></div>
<p>Update Jan 7 2012: I&#8217;m now using 8Player on iPhone and iPad. Best app purchase I&#8217;ve ever made on the app store. In 8Player the server URL you will want to specify is http://youripordnsname:8200/rootDesc.xml. Default port for the service is 8200, but you could map it with your router to any external port to 8200 internal if your router is more sophisticated.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgin.ca/2011/01/09/firefly-nas-iphone-itunes-awesome/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

