<?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>Gaia Environmental Sciences &#187; Computer Programming</title>
	<atom:link href="http://gaiaes.com/category/computer-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://gaiaes.com</link>
	<description>Energy and Computer Consulting</description>
	<lastBuildDate>Sat, 30 Jan 2010 02:31:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Setting up Subversion in Xcode 3.0</title>
		<link>http://gaiaes.com/2010/01/setting-up-subversion-in-xcode-3-0/</link>
		<comments>http://gaiaes.com/2010/01/setting-up-subversion-in-xcode-3-0/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 16:15:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computer Programming]]></category>

		<guid isPermaLink="false">http://gaiaes.com/?p=56</guid>
		<description><![CDATA[Using version control during software development allows experimentation without worrying about removing the experimental work when it does not pan out. Apple has gone a long way to integrating Subversion into Xcode but their instructions are oriented more towards groups of developers rather than a stand-alone version control for a single developer. There is a [...]]]></description>
			<content:encoded><![CDATA[<p>Using version control during software development allows experimentation without worrying about removing the experimental work when it does not pan out.  Apple has gone a long way to integrating Subversion into Xcode but their <a href="http://developer.apple.com/mac/articles/server/subversionwithxcode3.html">instructions</a> are oriented more towards groups of developers rather than a stand-alone version control for a single developer.  There is a much easier and more secure way to use Subversion.</p>
<p>The Apple instructions show how to use both svnserve and the Apache plugin as approaches to setting up Subversion.  Both allow outside access.  The Apache approach is useful for large groups of developers while the svnserve approach is appropriate for smaller groups.  But neither address a single developer working on one computer.  Svnserve can be used in a local fashion that does not require turning on remote access.  Since everything is local, ssh is not necessary and connections are more reliable and do not require internet access.</p>
<p><strong>Setting up the repository</strong></p>
<p>Start by following the instructions to set up a repository.  For this article it will be located at /Library/Subversion/Repository but can be located elsewhere.</p>
<p><code>mkdir -p /Library/Subversion/Repository<br />
svnadmin create /Library/Subversion/Repository/Project1</code></p>
<p>Import an empty directory structure using a temporary directories.</p>
<p><code>mkdir -p /tmp/Project1/trunk /tmp/Project1/branches /tmp/Project1/tags<br />
svn import /tmp/Project1/ file:///Library/Subversion/Repository/Project1 -m "Initial import"<br />
rm -rf /tmp/Project1</code></p>
<p>Restrict the permissions.</p>
<p><code>sudo chown -R root:admin /Library/Subversion/Repository<br />
sudo chmod -R ug+rwX,o= /Library/Subversion/Repository</code></p>
<p><strong>Setting up Xcode</strong></p>
<p>Open Xcode and create Project1.  It can just be placed on the Desktop since it will be removed once it has been imported into Subversion.  Since the build directory does not need to be stored in Subversion, go to Project->Edit Project Settings and specify a Custom location and Build products location.  Click on the Configure Roots &#038; SCM button.  If there already is an entry, delete it (-).  Click the add repositories (+).  For the Root, put the path to the Xcode project directory.  Under Repository select Configure SCM Repositories.</p>
<p>Now we will diverge from the Apple instructions.  Instead of using ssh enter the local repository form of the URL.</p>
<p><code>file:///Library/Subversion/Repository/Project1</code></p>
<p>The remaining fields should automatically fill once you leave the URL field and the status indicator should quickly show &#8220;Authenticated.&#8221;  The advantage of this approach is remote login does not have to be enabled, the computer does not have to be hooked up to the internet, and the response is much faster.</p>
<p>Continuing with the instructions from Apple, go to SCM->Repositories and using the Repository browser select the trunk directory of the Project1 repository.  Click on Import.  Select the Xcode Project1 directory, add a comment and click on import.  Click OK to confirm.  Once the files are imported they can be deleted from the desktop.</p>
<p><strong>Checking out and turn on SCM</strong></p>
<p>Start Xcode but cancel at the first menu.  Go to SCM->Repositories.  Select the repository and then the trunk and Project1.  Click on Checkout.  Edit the name of the directory and select the location for it.  When the checkout is completed you will be prompted to open it.</p>
<p>Go to Project->Edit Project Settings.  Click on the Configure Roots &#038; SCM.  Under Root, enter the project directory.  For the Repository, choose the repository just set up for this project.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaiaes.com/2010/01/setting-up-subversion-in-xcode-3-0/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Javascript/jQuery with Drupal</title>
		<link>http://gaiaes.com/2009/07/using-javascriptjquery-with-drupal/</link>
		<comments>http://gaiaes.com/2009/07/using-javascriptjquery-with-drupal/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 21:28:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computer Programming]]></category>

		<guid isPermaLink="false">http://gaiaes.com/?p=42</guid>
		<description><![CDATA[Drupal has functionality using AHAH and AJAX and Javascript and jQuery with the level of sophistication generally increasing in that order. AHAH is a simple AJAX approach where the data retrieved does not have to be parsed on the client side before being placed in a form. jQuery is a Javascript library built around a [...]]]></description>
			<content:encoded><![CDATA[<p>Drupal has functionality using AHAH and AJAX and Javascript and jQuery with the level of sophistication generally increasing in that order.  AHAH is a simple AJAX approach where the data retrieved does not have to be parsed on the client side before being placed in a form.  jQuery is a Javascript library built around a concise approach for selecting elements from the Document Object Model (DOM).</p>
<p>The jQuery documentation suggests using the following code</p>
<p><code>$(document).ready(function(){<br />
// do some fancy stuff<br />
}); </code></p>
<p>This runs the code when the document is ready but before the page is completely loaded (images and media may still be loading).  Drupal calls this function and suggests the following code be used instead</p>
<p><code>Drupal.behaviors.myModule = function (context) {<br />
//do some fancy stuff<br />
}; </code></p>
<p>While this is true it is like reading the middle of the book without the start or end.  Surely there is some more information such as where to put this magical snippet of code that might be useful.</p>
<p><strong>Javascript</strong></p>
<p>Let&#8217;s go back and start at the beginning.  The code above is Javascript so first we need to know how Drupal handles Javascript. There are three ways to add Javascript code in Drupal 6.x.  First, there is the Drupal core which puts Javascript code in the js directory.  This is typically not of interest unless looking at the version of jQuery or adding jQuery plugins.  As with most other Drupal approaches, the other two methods are themes and modules.  The same result can be achieved either way but the application may suggest one way or the other as better.</p>
<p><strong>Module development</strong></p>
<p>For a module, the code would likely go in the myModule.module file where myModule is the name of your module.  It could go in the hook_form function but in this case I will show it in the page callback function which calls the hook_form function.  In the myModule_menu function you should have code like this</p>
<p><code>$items['myPage'] = array(<br />
    'title' => 'My Module',<br />
    'page callback' => 'myModule_page',<br />
    'access arguments' => array('access myModule content'),<br />
    'type' => MENU_CALLBACK<br />
  );</code></p>
<p>Then in myModule_page function</p>
<p><code>function myModule_page() {<br />
  //echo drupal_get_path('module','myModule') . '/myModule.js';<br />
  drupal_add_js(drupal_get_path('module','myModule') . '/myModule.js');</code></p>
<p>where code for dumping the path to the Javascript file is commented out.</p>
<p>Then in myModule.js the following code should produce the &#8220;Hello, World&#8221;.</p>
<p>Drupal.behaviors.myModule = function(context) {<br />
  alert(&#8220;Hello, World&#8221;);<br />
}</p>
<p>The context could be the entire page or a snippet added by other Javascript code.</p>
<p><strong>Themes</strong></p>
<p>I have not used Javascript/jQuery using the theme approach but it should follow the same pattern as for the style.css file.  Drupal 6.x is supposed to look for a script.js file in your theme directory and automatically load the code.  The same code in the myModule.js above should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaiaes.com/2009/07/using-javascriptjquery-with-drupal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sparse QR Decomposition</title>
		<link>http://gaiaes.com/2008/09/sparse-qr-decomposition/</link>
		<comments>http://gaiaes.com/2008/09/sparse-qr-decomposition/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 03:26:36 +0000</pubDate>
		<dc:creator>trobey</dc:creator>
				<category><![CDATA[Computer Programming]]></category>
		<category><![CDATA[Numerical Analysis]]></category>
		<category><![CDATA[Sparse QR]]></category>

		<guid isPermaLink="false">http://gaiaes.com/?p=5</guid>
		<description><![CDATA[This serial routine computes the QR decomposition of a matrix A in Remxn, m &#62; = n, such that P_r*QT*A*P_cT = &#124; R &#124; &#124; 0 &#124; where QT*Q = I in Remxm, R in Renxn upper triangular, and P_r in Remxm as well as P_c in Renxn are permutation matrices. Note that this is [...]]]></description>
			<content:encoded><![CDATA[<p>This serial routine computes the QR decomposition of a matrix <strong>A</strong> in Re<sup><em>mxn</em></sup>, <em>m</em> &gt; = <em>n</em>, such that</p>
<p style="text-align: center;"><strong>P_r</strong>*<strong>Q</strong><sup>T</sup>*<strong>A</strong>*<strong>P_c</strong><sup>T</sup> =<br />
| <strong>R</strong> |<br />
| <strong>0</strong> |</p>
<p><span id="more-5"></span>where <strong>Q</strong><sup>T</sup>*<strong>Q</strong> = <strong>I</strong> in Re<sup><em>mxm</em></sup>, <strong>R</strong> in Re<sup><em>nxn</em></sup> upper triangular, and <strong>P_r</strong> in Re<sup><em>mxm</em></sup> as well as <strong>P_c</strong> in Re<sup><em>nxn</em></sup> are permutation matrices.  Note that this is a research code developed for the following paper.</p>
<p>Thomas H. Robey and Deborah L. Sulsky, <em>Row Ordering for Sparse QR Decomposition</em>, SIAM J. Matrix Anal. and Appl., Vol. 15, No. 4, pp. 1208-1225, October 1994.</p>
<p>The software is available in C and C++ under the GNU Library General Public License.  To obtain the source code click on the desired version listed below.</p>
<ul>
<li><a href="/sparseqr/sparseqr-2.1.tar.gz">C version</a></li>
<li><a href="/sparseqr/sparseqr++3.1.tar.gz">C++ version</a></li>
</ul>
<p>Version 2.* has improved code for calculating fill that results in less memory and faster execution.  Version 3.* reduces work in the minimum degree calculation resulting in faster execution.</p>
]]></content:encoded>
			<wfw:commentRss>http://gaiaes.com/2008/09/sparse-qr-decomposition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
