<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CUUDRXo8fCp7ImA9WhRUFko.&quot;"><id>tag:blogger.com,1999:blog-10753561</id><updated>2012-01-27T09:07:54.474-05:00</updated><category term="logging" /><category term="flash" /><category term="bug" /><category term="selenium" /><category term="memento" /><category term="algorithms" /><category term="duck-typing" /><category term="daos" /><category term="cfcunit" /><category term="query" /><category term="getfullyear" /><category term="iteration" /><category term="software development" /><category term="t-sql" /><category term="picasa" /><category term="breadcrumbs" /><category term="distance" /><category term="email" /><category term="pets" /><category term="taskswitchxp" /><category term="c++" /><category term="plsql" /><category term="baseball" /><category term="virtual-machine" /><category term="facebook" /><category term="scripting" /><category term="whiteboard" /><category term="semantic" /><category term="java" /><category term="site-feature" /><category term="webservices" /><category term="friendfeed" /><category term="ical" /><category term="graphics" /><category term="sci-fi" /><category term="unittesting" /><category term="google-chrome" /><category term="int" /><category term="rownum" /><category term="citrix" /><category term="filestream" /><category term="google-adsense" /><category term="delicious" /><category term="mac" /><category term="unit testing" /><category term="ubuntu" /><category term="blogging" /><category term="svn" /><category term="google" /><category term="ruby" /><category term="virtualization" /><category term="smtp" /><category term="gparted" /><category term="visual-studio" /><category term="grandcentral" /><category term="fitpro" /><category term="groupthink" /><category term="percent" /><category term="nUnit" /><category term="geeks" /><category term="cf9" /><category term="lua" /><category term="openoffice" /><category term="web-browsers" /><category term="project planning" /><category term="video-conferencing" /><category term="frameworks" /><category term="opensource" /><category term="editplus" /><category term="computer" /><category term="sql-server-2005" /><category term="docking" /><category term="huntington-wv" /><category term="doubleclick" /><category term="tdd" /><category term="cf8" /><category term="nokogiri::xml::nodeset" /><category term="classifieds" /><category term="automator" /><category term="tricks" /><category term="p2p" /><category term="picasaweb" /><category term="newspaper" /><category term="music" /><category term="yslow" /><category term="freeware" /><category term="dependency-injection" /><category term="sizer" /><category term="webhooks" /><category term="regex" /><category term="meta" /><category term="turing" /><category term="data structures" /><category term="fit" /><category term="sql" /><category term="unix" /><category term="twitter" /><category term="virus" /><category term="icalendar" /><category term="samba" /><category term="standards" /><category term="comma" /><category term="decimal" /><category term="gmail" /><category term="calendar" /><category term="installation" /><category term="firebug" /><category term="junit" /><category term="clob" /><category term="unit-testing" /><category term="slickedit" /><category term="tails" /><category term="dpc" /><category term="at+t" /><category term="phone" /><category term="library" /><category term="dell" /><category term="source-code" /><category term="windows xp" /><category term="continuous-integration" /><category term="css" /><category term="googleFiberHTG" /><category term="fantasy" /><category term="row_number" /><category term="access-denied" /><category term="pl/sql developer" /><category term="repair" /><category term="wordwrap" /><category term=".net" /><category term="float" /><category term="palin" /><category term="utility" /><category term="xml" /><category term="mysql" /><category term="lightning" /><category term="table-of-contents" /><category term="web3.0" /><category term="regular expression" /><category term="offtopic" /><category term="image-manipulation" /><category term="elevation-api" /><category term="extended-ascii" /><category term="oracleclob" /><category term="seleniumMX" /><category term="webdevelopment" /><category term="android" /><category term="integration" /><category term="sql-server" /><category term="applications devleopment" /><category term="priorities" /><category term="modeling" /><category term="ping.fm" /><category term="prototype" /><category term="enums" /><category term="recursion" /><category term="structured blogging" /><category term="dragdrop" /><category term="yahoo" /><category term="customtags" /><category term="design patterns" /><category term="google-calendar" /><category term="songs" /><category term="javascript" /><category term="fitrunner" /><category term="coldfusion" /><category term="critical trip point" /><category term="binary-search" /><category term="daydreaming" /><category term="sports-songs" /><category term="string.spllit" /><category term="http" /><category term="yahoo-pipes" /><category term="console" /><category term="doxies" /><category term="social networking" /><category term="scientific-notation" /><category term="amazon" /><category term="browser" /><category term="peer review" /><category term="refurbished" /><category term="windows" /><category term="football" /><category term="pipes" /><category term="video-chat" /><category term="pixelspace" /><category term="ant" /><category term="quicksort" /><category term="php" /><category term="patterns" /><category term="stream" /><category term="views" /><category term="random" /><category term="oop" /><category term="weighted arrays" /><category term="null" /><category term="binarysearch" /><category term="beans" /><category term="moveabletype" /><category term="blogger" /><category term="web2.0" /><category term="generics" /><category term="cfeclipse" /><category term="pattern" /><category term="poi" /><category term="windows7" /><category term="coldspring" /><category term="aggregation" /><category term="windows-vista" /><category term="git coldbreadcrumbs" /><category term="inkspace" /><category term="functional-programming" /><category term="resize" /><category term="google+" /><category term="tools" /><category term="books" /><category term="cfunit" /><category term="development" /><category term="vm" /><category term="offline" /><category term="last.fm" /><category term="gateways" /><category term="parsing" /><category term="api" /><category term="url parsing" /><category term="cf" /><category term="chrome" /><category term="win32" /><category term="classification" /><category term="custom-mappings" /><category term="form-processing" /><category term="buzz" /><category term="virii" /><category term="jrun" /><category term="git" /><category term="bug-tracking" /><category term="latitude" /><category term="bookmarklet" /><category term="rss" /><category term="spam" /><category term="mediamonkey" /><category term="resource" /><category term="mashup" /><category term="xmlHttpRequest" /><category term="computation" /><category term="contribution" /><category term="sql server ce" /><category term="iis" /><category term="ics" /><category term="information" /><category term="synchronization" /><category term="memory" /><category term="wordpress" /><category term="genealogy" /><category term="lotus notes" /><category term="ui" /><category term="phone number" /><category term="nokogiri" /><category term="nokogiri::xml::node" /><category term="datetime" /><category term="longitude" /><category term="lootly" /><category term="compact-edition" /><category term="gotcha" /><category term="form-validation" /><category term="subversion" /><category term="ink" /><category term="ioc" /><category term="passport" /><category term="amazon web services" /><category term="support" /><category term="dom" /><category term="nokogiri::xml::reader" /><category term="perl" /><category term="acpi" /><category term="cac-cards" /><category term="executor" /><category term="irb" /><category term="prioritization." /><category term="flock" /><category term="wsdl" /><category term="agilifier" /><category term="tortoisesvn" /><category term="excel" /><category term="data processing" /><category term="linewrap" /><category term="stupid mistakes" /><category term="calendar-aggregation" /><category term="cruisecontrol" /><category term="test driven development" /><category term="uml" /><category term="textarea" /><category term="london" /><category term="anchor" /><category term="share" /><category term="embedded" /><category term="math" /><category term="drawing" /><category term="antfit" /><category term="pivotal-tracker" /><category term="sqlite" /><category term="url-parsing" /><category term="interoperability" /><category term="bookmarks" /><category term="ie" /><category term="tip" /><category term="blackberry" /><category term="computer-science" /><category term="adsense" /><category term="att" /><category term="getyear" /><category term="google-maps" /><category term="numbers" /><category term="cfqueryparam" /><category term="calculator" /><category term="socialthing" /><category term="hardy-heron" /><category term="openid" /><category term="column renaming" /><category term="browser-share" /><category term="plsql_split" /><category term="lottery" /><category term="singleton" /><category term="printing" /><category term="functions" /><category term="hreview" /><category term="validation" /><category term="mapreduce" /><category term="c#" /><category term="urchin" /><category term="firefox" /><category term="maxlength" /><category term="user-defined-function" /><category term="travel" /><category term="iphone" /><category term="cast" /><category term="tips" /><category term="sports" /><category term="shortcuts" /><category term="diagrams" /><category term="eclipse" /><category term="surface" /><category term="model-glue" /><category term="file-sharing" /><category term="aws" /><category term="blogs" /><category term="vb.net" /><category term="partition manager" /><category term="reporting" /><category term="windows-xp" /><category term="reviews" /><category term="heap" /><category term="rpc" /><category term="security" /><category term="dogs" /><category term="curation" /><category term="subeclipse" /><category term="customer service" /><category term="pearl" /><category term="notre dame" /><category term="bash" /><category term="unsafe temperature" /><category term="oracle" /><category term="cardinal-points" /><category term="microformats" /><category term="xUnit" /><category term="caldav" /><category term="social-computing" /><category term="open-standards" /><category term="html" /><category term="factories" /><category term="smarttab" /><category term="plotting" /><category term="screen-resizer" /><category term="testing" /><category term="plugins" /><category term="stubs" /><category term="uri" /><category term="cpu-usage" /><category term="singletons" /><category term="debugging" /><category term="alttab" /><category term="udf" /><category term="im" /><category term="enumerations" /><category term="whine" /><category term="read-write-web" /><category term="string" /><category term="blatant self promotion" /><category term="ryanparker" /><category term="herald-dispatch" /><category term="python" /><category term="issues" /><category term="graphing" /><category term="chat" /><category term="thunderbird" /><category term="blackberry bold" /><category term="apache" /><category term="linux" /><category term="google-voice" /><category term="ajax" /><category term="objectmother" /><category term="chrome-os" /><category term="sorting" /><category term="draft" /><category term="blog" /><category term="ascii" /><category term="period" /><category term="cruisecontrol.rb" /><category term="bold" /><category term="outlook" /><category term="microsoft" /><category term="cfc" /><category term="seamcarving" /><category term="mxunit" /><category term="utilities" /><category term="google-analytics" /><title>In the Trenches</title><subtitle type="html">Covering Software Engineering, ColdFusion, Java, Design Patterns, .Net, and a smattering of other languages from deep in the trenches.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://code.rawlinson.us/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://code.rawlinson.us/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>330</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/InTheTrenches" /><feedburner:info uri="inthetrenches" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CUUDRXs6fSp7ImA9WhRUFko.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-7966658252184910798</id><published>2012-01-27T09:07:00.002-05:00</published><updated>2012-01-27T09:07:54.515-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-27T09:07:54.515-05:00</app:edited><title>Enable/Disable an Enrollment in Blackboard Learn using IMS XML</title><content type="html">Honestly, this seemed like it would be a straight forward process. &amp;nbsp;Blackboard certainly hints at it being simple and straightforward. &amp;nbsp;But it turns out disabling (and re-enabling) an enrollment isn't as obvious as you might hope.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;XML&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There is a bit of conflicting documentation but this is how we ended up getting it to work using Blackboard Learn 9.1 SP 8.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;login to blackboard learn&lt;/li&gt;
&lt;li&gt;go to the system admin tab&lt;/li&gt;
&lt;li&gt;go to data integration&lt;/li&gt;
&lt;li&gt;select student information system integrations&lt;/li&gt;
&lt;li&gt;select your xml integration option (I'm not going into how to create one)&lt;/li&gt;
&lt;li&gt;in the little arrow drop down pick "Edit"&lt;/li&gt;
&lt;li&gt;make sure on the Enrollments row that "deletes" is set to "Disable"&lt;/li&gt;
&lt;li&gt;go back to the Student information system integrations page&lt;/li&gt;
&lt;li&gt;using the arrow drop down pick "Advanced Configuration"&lt;/li&gt;
&lt;li&gt;use the arrow drop down on enrollment and pick "Field Mapping"&lt;/li&gt;
&lt;li&gt;CHECK the "change or update?" box for "Row Status"&lt;/li&gt;
&lt;li&gt;Tell it to use a "Custom Script" and paste in this script:&lt;br /&gt;
&lt;pre class="javascript" name="code"&gt;var rs = true;
if ( data.rolesToAddOrUpdate.get(0).status = 0 ) {
rs = false;
}
rs;
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;WARNING&lt;/b&gt;&lt;/span&gt;: &amp;nbsp;If you don't setup blackboard as indicated then including recstatus=3 as an attribute on the ROLE node will cause the enrollment to be DELETED from blackboard. &amp;nbsp;This will cause all artifacts created by that user within that class to be&amp;nbsp;disassociated&amp;nbsp;from them; thus if they are re-enrolled in the class they won't be tied to any of those artifacts. &amp;nbsp;Many of the artifacts will still be there; they'll just be associated with Anonymous.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
By disabling the enrollment the artifacts remain&amp;nbsp;associated&amp;nbsp;with the user so that when they are reenrolled in the class they don't have to re-upload all of their assignments etc.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This process is useful for dealing with drops/holds on students as well so that their enrollment in the class isn't deleted (though it does disappear from the students interface) until their enrollment is reinstated.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;Flat Files&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
If you are using the flat file (pipe delimited) process between banner and blackboard things are more straightforward. &amp;nbsp;You just have to include the column "ROW_STATUS" with a value of "disabled" in order to disable an enrollment and "enabled" to enable the enrollment.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A disabled enrollment using either of these methods will appear in to an administrator (and perhaps in some other scenarios) with a small red circle to the left of the enrollment record.&lt;br /&gt;
&lt;br /&gt;
You can learn about more of the process and the difficulties that were experienced in our transition from Vista to Learn over at &lt;a href="http://www.jcummings.net/ims-enterprise-1-1-vista-xml-integration-blackboard-learn-9-and-processing-enrollment-changes/"&gt;John Cummings blog&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-7966658252184910798?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sy1_JaCOFdLmvaqfomaREcaQnBc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/LDSwfvAdu_4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/7966658252184910798/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=7966658252184910798" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/7966658252184910798?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/7966658252184910798?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/LDSwfvAdu_4/enabledisable-enrollment-in-blackboard.html" title="Enable/Disable an Enrollment in Blackboard Learn using IMS XML" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/enabledisable-enrollment-in-blackboard.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMESXs4eCp7ImA9WhRUFko.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2270655549084872409</id><published>2012-01-27T08:46:00.001-05:00</published><updated>2012-01-27T08:53:28.530-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-27T08:53:28.530-05:00</app:edited><title>Force Wordpress to be Case-Insensitive</title><content type="html">We recently had a minor annoyance happen when some marketing material was sent out that had a url with a capital "B" in it; such as http://www.mysite.com/Bill instead of http://www.mysite.com/bill. &amp;nbsp;Our webserver runs IIS so it is case-insensitive but wordpress, which is being used to host the hypothetical "bill" website is written in PHP which is case sensitive. &lt;br /&gt;
&lt;br /&gt;
Fortunately it is fairly easy to change this default behavior without using URL rewrite rules (which are limited to suckness on IIS 6 anyway). &amp;nbsp;Wordpress Plugins to the rescue!&lt;br /&gt;
&lt;br /&gt;
Our wordpress install uses a multi-site setup with over 150 sites so clearly this is a plugin you'd want to network activate. &amp;nbsp;Sadly, for some reason, network activate didn't do the trick. Instead the plugin had to go in the mu-plugins directory (mu-plugins = must use plugins; they are forced onto every site and loaded before anything else basically).&lt;br /&gt;
&lt;br /&gt;
I found the prefect plugin code over at &lt;a href="http://www.unfocus.com/2007/08/31/case-insensitive-permalinks-plugin-for-wordpress/"&gt;unfocus.com's website&lt;/a&gt;&amp;nbsp;but I renamed it to something that made a little more sense for us (from a maintenance perspective) in the future. Here is the code of the plugin in case that site goes away someday.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="php" name="code"&gt;
 &amp;lt;?php
  /*
  Plugin Name: case-insensitive-url
  Plugin URI: http://www.unfocus.com/projects/
  Description: A plugin to make wordpress case insensitive in regards to urls.
  Version: 1.0a
  Author: Kevin Newman
  Author URI: http://www.unfocus.com/projects/
  */
  function case_insensitive_url() {
   if (preg_match('/[A-Z]/', $_SERVER['REQUEST_URI'])) {
    $_SERVER['REQUEST_URI'] = strtolower($_SERVER['REQUEST_URI']);
    $_SERVER['PATH_INFO']   = strtolower($_SERVER['PATH_INFO']);
   }
  }
  add_action('init', 'case_insensitive_url');
 ?&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
That's it.  This now runs automatically at the beginning of every page load and insures that each request is handled in a case-insensitive manner.  I'm not sure what, if any real, performance impact this has, but it is worth the cost for the reliability of knowing all incoming urls are treated the same regardless of case.  It's too expensive in terms of reputation and marketing dollars to have&amp;nbsp;pamphlets, postcards, and flyers printed that point to a 404 error if we don't do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2270655549084872409?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M1oqkA8OKtagyTeBMpdmcwJF49Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/I2CQhkLjIFo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2270655549084872409/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2270655549084872409" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2270655549084872409?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2270655549084872409?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/I2CQhkLjIFo/force-wordpress-to-be-case-insensitive.html" title="Force Wordpress to be Case-Insensitive" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/force-wordpress-to-be-case-insensitive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQBQXw9eip7ImA9WhRUEEQ.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3345405321054684234</id><published>2012-01-20T16:52:00.001-05:00</published><updated>2012-01-20T16:52:30.262-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-20T16:52:30.262-05:00</app:edited><title>Create App Shortcut on Mac for MacPorts installed program</title><content type="html">This is here just so I remember how to do this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;create a new automator task&lt;/li&gt;
&lt;li&gt;type = application&lt;/li&gt;
&lt;li&gt;add a node: "Run Applescript"&lt;/li&gt;
&lt;li&gt;in the body of the method add&lt;br /&gt;&lt;pre style="background-attachment: initial; background-clip: initial; background-color: #f5fdff; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(16, 135, 164); border-left-style: solid; border-left-width: 5px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 10px; padding-right: 5px; padding-top: 5px; text-align: left; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;do shell script "/opt/local/bin/{executable_name} &amp;amp;"&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;change {executable_name} to the right value; for example if launching pidgin change it to pidgin&lt;/li&gt;
&lt;li&gt;save the task to your Applications directory&lt;/li&gt;
&lt;li&gt;profit?&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Thanks go to this StackOverflow/&lt;a href="http://superuser.com/questions/179842/create-alias-desktop-shortcut-of-an-application-installed-by-macports"&gt;SuperUser post&lt;/a&gt; that answered this for me.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I was a failure at using Platypus which was the other suggestion.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3345405321054684234?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sDcGptNeTbFhW_J5N1DEXRUFlfk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/8tdVA8mr7lk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3345405321054684234/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3345405321054684234" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3345405321054684234?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3345405321054684234?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/8tdVA8mr7lk/create-app-shortcut-on-mac-for-macports.html" title="Create App Shortcut on Mac for MacPorts installed program" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/create-app-shortcut-on-mac-for-macports.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkECRnozcSp7ImA9WhRUEEU.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-563579441995335424</id><published>2012-01-20T14:44:00.000-05:00</published><updated>2012-01-20T14:44:27.489-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-20T14:44:27.489-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri::xml::reader" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri::xml::node" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri" /><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="nokogiri::xml::nodeset" /><title>Parsing Large XML Documents in Ruby</title><content type="html">Today I was given a fairly large XML file (roughly 32 Mb) that I needed to parse in order to see if there was a match between a concatenation between two node values and the contents of a separate file that had comma separated values in it. &amp;nbsp;Always looking for an excuse to use a different language than I normally do I decided to attack this in Ruby because I remember it being particularly good at handling File IO.&lt;br /&gt;
&lt;br /&gt;
I'm going to present two solutions to this problem here. &amp;nbsp;I'm sure they can both be improved. &amp;nbsp;However, the second solution was the one I settled on because it is substantially more performant.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Example 1 - Using SimpleXML&lt;/span&gt;&lt;br /&gt;
Look, I don't know Ruby well at all so when I saw a library called SimpleXML I thought - "sweet that's right up my alley!" &amp;nbsp;It really was easy to use but, as you'll see, it wasn't the right tool for this particular job.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="ruby" name="code"&gt;require 'rubygems'
 require 'xmlsimple'

 duplicates = Array.new()
 enrollments = Array.new()


 # read in the xml of enrollments
 puts "reading in enrollment file; this could take a while."
 data = XmlSimple.xml_in('students.xml')

 puts "enrollment file loaded; now to parse it!"
 cnt = 0
 data['membership'].each do |course|
  courseId = course["sourcedid"][0]["id"][0].strip
  course["member"].each do |student|
   studentId = student["sourcedid"][0]["id"][0].strip
   enrollmentId = studentId &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; courseId
   enrollments.push(enrollmentId)
  end
  cnt++
  if cnt &amp;gt; 9 then
   p "."
   cnt = 0
  end
 end


 #read in the comma delimited list..
 puts "reading in the drop file"
 drops = File.readlines("term_drops.lis");
 drops.delete_at(drops.length-1)


 drops = drops.collect{|x| x.strip}

 puts "comparing..."

 duplicates = enrollments &amp;amp; drops

 if duplicates.size &amp;gt; 0 then
  puts "found the following duplicate enrollments"
  puts duplicates
 else
  puts "YES! no duplicates found"
 end
&lt;/pre&gt;
&lt;br /&gt;
By far the slowest part of this process was the line data = XmlSimple.xml_in('students.xml') - in fact with my large XML file I got bored and gave up waiting for it to load.  What I needed was a parser that would pull in one node of the document at a time.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Nokogiri&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It turns out there are a few solutions but I settled on Nokogiri and I'm glad I did. Honestly, the documentation is a little confusing but the library itself works great.

&lt;br /&gt;
&lt;pre class="ruby" name="code"&gt;require 'rubygems'
 require 'nokogiri'

 duplicates = Array.new()
 enrollments = Array.new()


 puts "reading in drops file"
 drops = File.readlines("term_drops.lis");
 drops.delete_at(drops.length-1)
 drops = drops.collect{|x| x.strip}


 puts "reading in enrollment file; this could take a while."
 data = Nokogiri::XML::Reader(File.open("students.xml"))

 data.each do |node|
  if(node.name == "membership" &amp;amp;&amp;amp; node.node_type == Nokogiri::XML::Reader::TYPE_ELEMENT)
   doc = Nokogiri::XML(node.outer_xml)
   classId = doc.xpath("//sourcedid/id")[0].inner_text.strip
   studentId = doc.xpath("//member/sourcedid/id")[0].inner_text.strip
   enrollmentId = studentId &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; classId

   if drops.include?(enrollmentId) then
    puts  enrollmentId
   end
  end
 end
&lt;/pre&gt;
&lt;br /&gt;
As you can see both scripts are pretty short - ruby really is nice for this kind of stuff. &amp;nbsp;I also do a few weird things in both concerning the way I pull in my comma delimited flat file (I drop off the last line for instance but I don't really have to).&lt;br /&gt;
&lt;br /&gt;
Their were a couple little gotcha's I ran into using Nokogiri. &amp;nbsp;First is that when I do the data.each do |node| block it literally will iterate over every node in the document down to the most distant child. &amp;nbsp;Thus I needed to filter things out by using the node.name check. &amp;nbsp;Secondly, when it iterates it actually deals with every node twice; once on entering the node and once on exiting it. &amp;nbsp;That is why I am checking for the node_type as well as the node.name.&lt;br /&gt;
&lt;br /&gt;
Also, and this was just stupidity on my part, in order for me to do the xpath query on the node (after creating a small xml document using Nokogiri) I had to use outer_xml and not inner_xml. &amp;nbsp;Using inner_xml worked ok when I was just searching for the classId because when I created the document using inner_xml it actually ignored all sibling nodes to the sourcedid node. &lt;br /&gt;
&lt;br /&gt;
I also don't really know xpath all that well thus there is probably a better way for me to make sure I'm only getting the first sourcedid when I ask for classId instead of ALL sourcedid values in the document when I fire of the xpath query. &amp;nbsp;I'm not really sure; if there is feel free to let me know in the comments.&lt;br /&gt;
&lt;br /&gt;
Overall this code is pretty rough and specialized for this one off task I was asked to do but hopefully the Nokogiri code will help others as they parse an xml document while looking for values that might be spread out over various nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-563579441995335424?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sSPajdDH-ViHzCunENyrutNgtbg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/3kOUAvJzJdY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/563579441995335424/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=563579441995335424" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/563579441995335424?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/563579441995335424?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/3kOUAvJzJdY/parsing-large-xml-documents-in-ruby.html" title="Parsing Large XML Documents in Ruby" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/parsing-large-xml-documents-in-ruby.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAGRnk-cSp7ImA9WhRVGUU.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3306506263312708766</id><published>2012-01-19T10:25:00.000-05:00</published><updated>2012-01-19T10:25:27.759-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-19T10:25:27.759-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bash" /><category scheme="http://www.blogger.com/atom/ns#" term="samba" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="automator" /><title>Mount Samba Share on MAC to a Location of Your Choice - at Login</title><content type="html">One thing I've discovered in my move from Windows to MACs is that it isn't as easy to consistently mount a windows share to a consistent location in your file system.  Initially I wasn't even sure if it was possible.  The built in GUI doesn't really give you an option.  For instance if you are mounting the following two shares : smb://server1/d$ and smb://server2/d$ it is possible that one will end up at /Volumes/d$ and the other will end up at /Volumes/d-1$ or something like that.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The problem is it isn't easy to tell by looking which one is server1 and which one is server 2's mount point.  Thus, if you mount them in an inconsistent order server1 could end up at /Volumes/d$ once and then /Volumes/d-1$ the next time.  It's not an ideal situation.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Now you may already be asking - who cares?  If you setup an automator script with you login things will always be mounted in the same order and be at the same volume location and you'll just get used to knowing where things are.  True.  However, I work on a team and one of the things I also want to be able to do is have an ant script that can reliably run on each person's machine that can access these various samba shares (imagine one click deployment to a samba share?)

Thus I need a way to consistently have all this stuff in a place that does two things: 

&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Be a nice human readable location on the file system so you instantly know what should be there&lt;/li&gt;
&lt;li&gt;Is the same on everyones machine and exists in an easy to recreate way for new members of the team.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Thus I am using an automator task that uses both an applescript and a bash script to achieve my result. &amp;nbsp;The apple script part is used to request the users login password for the windows domain which is then used in the bash script when mounting the samba shares.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
So here is the apple script part:
&lt;br /&gt;
&lt;pre class="javascript" name="code"&gt;on run {input, parameters}
 tell application "System Events"
  set the_password to "password"
  display dialog "Please enter your Windows password: " default answer "" buttons {"OK", "Cancel"} default button "OK" with icon 2 with title "Password" with hidden answer
  set the_password to text returned of the result
 end tell
 return {the_password}
end run

&lt;/pre&gt;
&lt;div&gt;
I stole that bit from &lt;a href="http://aricsblog.blogspot.com/2006/09/running-shell-commands-with-automator.html"&gt;Aric Friesen&lt;/a&gt;.  I removed a bunch of his script but the basic core part of it remains unchanged.  In my automator task the second step is to "Run Shell Script" were you Pass Input as arguments.  Here is my bash script:
&lt;/div&gt;
&lt;pre class="javascript" name="code"&gt; #!/bin/bash

 echo $1
 if [ ! -d ~/windows ]; then
 mkdir ~/windows
 fi
 if [ ! -d ~/windows/server1-d ]; then
  mkdir ~/windows/server1-d
 else
  umount ~/windows/server1-d
 fi
 if [ ! -d ~/windows/server2-d ]; then
  mkdir ~/windows/server2-d
 else
  umount ~/windows/server2-d
 fi


 mount_smbfs "//DOMAIN;USERNAME:$1@SERVER1/d$" ~/windows/server1-d
 mount_smbfs "//DOMAIN;USERNAME:$1@SERVER2/d$" ~/windows/server2-d

&lt;/pre&gt;
&lt;div&gt;
There may seem like some extraneous fluff in there but I want to make sure it works no matter if the drives have ever been mounted before.  It turns out to mount a drive to a predetermined location you have to have a directory created at that location already.  The mount_smbfs command will then change that directory into a mount point.  Thus I have some checks to make sure my directories already exist and that the mounts haven't already happened before I try to mount to them.  I would prefer if I could tell that the directory were actually already being used as a mount point (so I could skip mounting it) but I couldn't find a reliable way to identify if a directory was a mount point and what it was actually pointing to.
&lt;br /&gt;
&lt;br /&gt;
Once I had this automator process setup I saved it as an application called "MountNetworkDrives". &amp;nbsp;From there you can make it execute on login by following these simple steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Open System Preferences&lt;/li&gt;
&lt;li&gt;Click on Users &amp;amp; Groups&lt;/li&gt;
&lt;li&gt;Using the "Current User" select "Login Items"&lt;/li&gt;
&lt;li&gt;Click on the small "+" at the bottom of the right panel&lt;/li&gt;
&lt;li&gt;Find your new application "MountNetworkDrives" and add it&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
And Voila! &amp;nbsp;You have created a consistent way to setup mounts on your mac. &amp;nbsp;Now you can share that automator script with your teammates. &amp;nbsp;Just have them change the username value in the bash script step and it is good to go.&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3306506263312708766?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YtUz9qn4ey0MVM8rY96p4pL-4BY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/s0rNhzmkkpI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3306506263312708766/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3306506263312708766" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3306506263312708766?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3306506263312708766?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/s0rNhzmkkpI/mount-samba-share-on-mac-to-location-of.html" title="Mount Samba Share on MAC to a Location of Your Choice - at Login" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/mount-samba-share-on-mac-to-location-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UMR3w8eCp7ImA9WhRVE0U.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-322714952702397541</id><published>2012-01-11T14:13:00.000-05:00</published><updated>2012-01-12T11:21:26.270-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-12T11:21:26.270-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><title>MySQL CAST and CONCAT</title><content type="html">&lt;span style="font-size: large;"&gt;CAST&lt;/span&gt;&lt;br /&gt;
This is just here to help me remember.  In MySQL if you want to CAST an int into a string you use:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;CAST(x AS CHAR)&lt;/pre&gt;
I had assumed it would be VARCHAR but I was wrong.  As a further &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/data-type-overview.html"&gt;reference here is info on all of the TYPES supported by MySQL&lt;/a&gt;.  What I find interesting is the fact that MySQL does have a VARCHAR type but you can't cast an int to it.  Why Not?

In the end it doesn't matter too much; the CHAR option worked.

&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style="font-size: large;"&gt;CONCAT&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A similarly odd behavior is how you concatenate strings in MySQL. &amp;nbsp;I had thought I would use &amp;amp; or || but &amp;nbsp;both of those return a 0 if you use them to concatenate. &amp;nbsp;Instead you have to wrap all of the strings you want to concatenate up into a call to the CONCAT function like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;CONCAT('http://www.rawlinson.us/blog', page_name, '/datafiles/?file_id', CAST(file_id AS VARCHAR)) as url&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-322714952702397541?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lqU7ETT8ulzxZSZbzZJjIVRI3ns/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/SkkFM3mxl3Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/322714952702397541/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=322714952702397541" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/322714952702397541?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/322714952702397541?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/SkkFM3mxl3Q/mysql-cast-and-concat.html" title="MySQL CAST and CONCAT" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/mysql-cast-and-concat.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UCRHkzfip7ImA9WhRVE0U.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-5004204922499895805</id><published>2012-01-11T14:05:00.000-05:00</published><updated>2012-01-12T11:21:05.786-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-12T11:21:05.786-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>How many Days|Weeks|Months Ago? [php]</title><content type="html">Yesterday I wrote a simple wordpress plugin that checks an rss feed and finds posts in that feed that contain specific keywords. &amp;nbsp;Any posts found that are also younger than n number of days are then displayed at the top of a page just as if they were posts in the wordpress blog.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
When I was display the data though I thought it would be nice if the pubdate sent with the feed actually showed up as "2 days ago..." or "4 months ago.." or whatever was applicable. &amp;nbsp;Thus, I did what any good lazy coder does I googled to see if anyone had written this up in PHP already and sure enough someone had.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I found this function on the &lt;a href="http://drupal.org/node/61565#comment-198230"&gt;drupal support community message boards posted by someone named "drenei"&lt;/a&gt;&lt;/div&gt;

&lt;pre class="php" name="code"&gt;
   &amp;lt;?php
   function ago($timestamp){
   $difference = time() - $timestamp;
   $periods = array("second", "minute", "hour", "day", "week", "month", "years", "decade");
   $lengths = array("60","60","24","7","4.35","12","10");
   for($j = 0; $difference &amp;gt;= $lengths[$j]; $j++)
   $difference /= $lengths[$j];
   $difference = round($difference);
   if($difference != 1) $periods[$j].= "s";
   $text = "$difference $periods[$j] ago";
   return $text;
  }
   ?&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-5004204922499895805?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oQetcoSaU6t4WM2TsqCNf1pdkm8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/v6Qz9oH9hFw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/5004204922499895805/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=5004204922499895805" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/5004204922499895805?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/5004204922499895805?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/v6Qz9oH9hFw/how-man-daysweeksmonths-ago-php.html" title="How many Days|Weeks|Months Ago? [php]" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2012/01/how-man-daysweeksmonths-ago-php.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIAQ3c-eSp7ImA9WhRQF00.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-4740647878146265475</id><published>2011-12-12T10:25:00.003-05:00</published><updated>2011-12-12T10:25:42.951-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-12T10:25:42.951-05:00</app:edited><title>Installing Ruby on a Mac fails with an error while running configure</title><content type="html">Today I tried to upgrade my Ruby version to the latest (1.9.3-p0) using RVM (Ruby Version Manager). &amp;nbsp;When I tried the install it failed with an error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;ERROR: Error running ' ./configure --prefix=/Users/bill/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/bill/.rvm/usr ', please read /Users/bill/.rvm/log/ruby-1.9.3-p0/configure.log&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;ERROR: There has been an error while running configure. Halting the installation.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I wasn't sure what to do but after a bit of digging on google and some forums I found the solution. &amp;nbsp;But, before I give you that here is the reasoning I found for the issue:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;it works with 1.9.2 - BUT I was also not able to get RVM going on Lion. I have xcode 4.2.&lt;/span&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;The problem is that xcode uses LLVM GCC and not (standard? I forget the term) GCC.&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
Finally, here is how to get it to install without any issues:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-size: 12px; line-height: 18px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;rvm install 1.9.3 --with-gcc=clang&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
This solution was found via &lt;a href="https://github.com/plamoni/SiriProxy/issues/138#issuecomment-3032544"&gt;dcinzona&lt;/a&gt; at github. &amp;nbsp;He found the answer on &lt;a href="http://stackoverflow.com/questions/8259928/error-compiling-ruby-1-9-3-using-rvm-homebrew-or-macports"&gt;stackoverflow&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-4740647878146265475?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y0iohjkAG0aYPuFwEG5P7OLQ_BA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/Rzk9Y4Cx6Jg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/4740647878146265475/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=4740647878146265475" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4740647878146265475?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4740647878146265475?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/Rzk9Y4Cx6Jg/installing-ruby-on-mac-fails-with-error.html" title="Installing Ruby on a Mac fails with an error while running configure" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/12/installing-ruby-on-mac-fails-with-error.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQGR304cCp7ImA9WhRQEkU.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2701977465151386280</id><published>2011-12-07T13:19:00.001-05:00</published><updated>2011-12-07T13:25:26.338-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-07T13:25:26.338-05:00</app:edited><title>Make F5 Refresh the page in Chrome on a Mac</title><content type="html">It turns out the F5 key doesn't do a page refresh on a mac.  That is a habit I just don't think I'll be able to break.  Fortunately, macs have a built in way to define application specific keyboard mappings.  Here are the instructions for mapping the F5 key to refresh in Chrome.&lt;br /&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Launch "System Preferences"&lt;/li&gt;
&lt;li&gt;Click the "Keyboard" icon&lt;/li&gt;
&lt;li&gt;Select "Keyboard Shortcuts" tab&lt;/li&gt;
&lt;li&gt;Hit the little "+" button under the main white area&lt;/li&gt;
&lt;li&gt;In the little pup-up window select "Google Chrome" as the Application&lt;/li&gt;
&lt;li&gt;Type in "Reload This Page" in the "Menu Title" field exactly as it appears in the Chrome's View menu (no quotes of course)&lt;/li&gt;
&lt;li&gt;Click inside the "Keyboard Shortcut" field and hit F5 key (or any desired combination)&lt;/li&gt;
&lt;li&gt;Restart Chrome to make it work&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;If you use safari this same process will work for that application as well&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: arial, 'san serif'; font-size: 13px;"&gt;Thanks to "paulcik" and his comment on the &lt;a href="http://www.google.com/support/forum/p/Chrome/thread?tid=73c83d887892a0a2&amp;amp;hl=en"&gt;google support forums&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2701977465151386280?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SQYDhf6Sm4YH7G-NW_kRiSmv9no/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/67mPDkgg4oY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2701977465151386280/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2701977465151386280" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2701977465151386280?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2701977465151386280?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/67mPDkgg4oY/make-f5-refresh-page-in-chrome-on-mac.html" title="Make F5 Refresh the page in Chrome on a Mac" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/12/make-f5-refresh-page-in-chrome-on-mac.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMBSXc5cCp7ImA9WhRSFk4.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-684161844937149820</id><published>2011-11-18T10:34:00.001-05:00</published><updated>2011-11-18T10:34:18.928-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-18T10:34:18.928-05:00</app:edited><title>My New Job</title><content type="html">For the past 12 years I have worked for a wonderful small company named Strictly Business Computer Systems.  During that time I've had the priviledge of working alongside some amazingly bright and talented people.  I will miss both the workplace and my coworkers enormously as I move forward towards a new opportunity at Marshall University.

I'll still be developing software using a variety of languages and tools and I'll still be blogging my solutions to weird little problems; I'll just be doing it with a little less focus on ColdFusion and a little more on PHP, .Net, and SharePoint.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-684161844937149820?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Seyf1G_Cxbh42xQFliI3M75izZ0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/V_UZ75D-8FA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/684161844937149820/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=684161844937149820" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/684161844937149820?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/684161844937149820?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/V_UZ75D-8FA/my-new-job.html" title="My New Job" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/11/my-new-job.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIAQnc_cSp7ImA9WhdaEEs.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-1178916033423262010</id><published>2011-10-17T13:28:00.004-04:00</published><updated>2011-10-19T18:32:23.949-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T18:32:23.949-04:00</app:edited><title>Can't Establish Security Trust Relationship with US Govt</title><content type="html">If you are ever working on a project for the US Govt and are accessing some site within their network (via a VPN) and you start to get security and trust relationship errors then you need to install the DoD certificates.  I found them at this &lt;a href="http://epfat.swf.usace.army.mil/Welcome.aspx"&gt;US Army Corps of Engineers Website&lt;/a&gt;.  I downloaded the zip file, ran the installer, and all of my trust problems with the government were resolved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-1178916033423262010?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q9wJ71Xt0xAeW4lGFYrfja9cS5s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/mbtPzG6QW84" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/1178916033423262010/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=1178916033423262010" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1178916033423262010?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1178916033423262010?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/mbtPzG6QW84/cant-establish-security-trust.html" title="Can't Establish Security Trust Relationship with US Govt" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/10/cant-establish-security-trust.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAHRX87cCp7ImA9WhdUE0w.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-1726029218245084277</id><published>2011-09-29T13:52:00.000-04:00</published><updated>2011-09-29T13:52:14.108-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-29T13:52:14.108-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><category scheme="http://www.blogger.com/atom/ns#" term="sql-server" /><title>Create a C# Model From a SQL Server Table</title><content type="html">If you aren't using a framework of some sort that helps make this even easier here is a sql script that will help you generate a set of getters/setters for a SQL Server table in C#.&lt;br /&gt;
&lt;br /&gt;
I haven't tested it much (nil) but it looks like it will work ok. &amp;nbsp;Basically you can just cut and paste the records returned into your class definition and you'll be good to go. &amp;nbsp;You may, however, wish to fix the case of the property names to match the proper convention. &amp;nbsp;I'm not sure how to fix the case using just SQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;
SELECT 'public '  +
		CASE data_type
			WHEN 'bigint'		THEN 'int'
--			WHEN 'binary'		THEN 'raw'
			WHEN 'bit'		THEN 'int'
			WHEN 'char'		THEN 'char'
			WHEN 'datetime'		THEN 'DateTime'
			WHEN 'decimal'		THEN 'decimal'
			WHEN 'float'		THEN 'float'
--			WHEN 'image'		THEN 'long raw'
			WHEN 'int'		THEN 'int'
			WHEN 'money'		THEN 'double'
			WHEN 'nchar'		THEN 'string'
			WHEN 'ntext'		THEN 'string'
			WHEN 'nvarchar'		THEN 'string'
			WHEN 'numeric'		THEN 'int'
			WHEN 'real'		THEN 'decimal'
			WHEN 'smalldatetime'	THEN 'DateTime'
			WHEN 'smallmoney'	THEN 'double'
			WHEN 'smallint'		THEN 'int'
			WHEN 'text'		THEN 'string'
			WHEN 'timestamp'	THEN 'Date'
			WHEN 'uniqueidentifier' THEN 'string'
			--WHEN 'varbinary'	THEN 'raw'
			WHEN 'varchar'		THEN 'string'
			ELSE 'CHECK THIS.. ' + data_type + ' DataType'
		END + ' ' + COLUMN_NAME + ' { get; set; }'
	
FROM information_schema.columns
WHERE table_name = 'class'
&lt;/pre&gt;

There are also a  few data types in here I'm not sure I converted properly; this was just a quick one-off thing I put together for a friend.  So, if you have any suggestions or corrections please leave them in the comments and I'll update it as I go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-1726029218245084277?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qshBWMXgrwl0Kxwpbw1JvvX12pI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/fk9IxpoJf8Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/1726029218245084277/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=1726029218245084277" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1726029218245084277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1726029218245084277?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/fk9IxpoJf8Q/create-c-model-from-sql-server-table.html" title="Create a C# Model From a SQL Server Table" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/09/create-c-model-from-sql-server-table.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MEQXs_cSp7ImA9WhdVEUw.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-4440535021115292392</id><published>2011-09-15T16:44:00.000-04:00</published><updated>2011-09-15T16:43:20.549-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-15T16:43:20.549-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="project planning" /><category scheme="http://www.blogger.com/atom/ns#" term="prioritization." /><category scheme="http://www.blogger.com/atom/ns#" term="groupthink" /><category scheme="http://www.blogger.com/atom/ns#" term="priorities" /><title>How to Get Group Consensus</title><content type="html">This is a post I started writing a few years ago (March 2008) but never published for some reason...&lt;br /&gt;
&lt;br /&gt;
I don't have any first hand experience with the KJ Technique but it sounds pretty promising.&amp;nbsp; I can't explain it as well as this linked article does so I'll just send you there.&amp;nbsp; However, if you have already used this technique (or something like it) and have some feedback I'd love it if you left a comment.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.uie.com/articles/kj_technique/"&gt;The KJ-Technique: A Group Process for Establishing Priorities&lt;/a&gt;&lt;br /&gt;
I actually came across this article via Assaf Arkin's blog &lt;a href="http://blog.labnotes.org/2008/03/23/rounded-corners-198-less-is-the-new-black/"&gt;Labnotes&lt;/a&gt;.  I just started reading his blog last week so it's already paid off in introducing me to this new concept.&amp;nbsp; Thanks Assaf.  &lt;br /&gt;
&lt;br /&gt;
As I started reading the article on the KJ Technique I couldn't help but continually think about Assaf's idea of building this as a web service.&amp;nbsp; Well, actually, it kept focusing on potential UI designs for really bringing the power of the technique to a web-based application.&amp;nbsp; My conclusion? I'm not very good at UI design!&amp;nbsp; My focus was more on how to bring this concept to a distributed team without need of some kind of teleconference.&amp;nbsp; How can you simulate the sticky-notes that can be grouped - or regrouped by different non-directly-communicating team members? If you can come up with a good UI that clearly communicates the shift of a sticky from one group to another (or a total merging of groups) by a remote user to all other users in the group it would be fantastic.&amp;nbsp; In fact, if it was really clear what was going on all the time and everyone could keep messing with the virtual sticky-notes I almost think a distributed version of the KJ-Technique would be better than the one described in the article because it would really help enforce the "no discussion" rule for the first 2/3's of the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-4440535021115292392?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/soii-fs8ptOiBg8b5Gas82TdYoI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/9LeKCe7Nhcw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/4440535021115292392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=4440535021115292392" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4440535021115292392?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4440535021115292392?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/9LeKCe7Nhcw/how-to-get-group-consensus.html" title="How to Get Group Consensus" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/09/how-to-get-group-consensus.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkICQns7eCp7ImA9WhdVEUw.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2344802762479398304</id><published>2011-09-15T16:29:00.001-04:00</published><updated>2011-09-15T16:29:23.500-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-15T16:29:23.500-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="debugging" /><category scheme="http://www.blogger.com/atom/ns#" term="console" /><title>console.log in IE</title><content type="html">If you're like me you've probably been happily working on a web project in chrome or firefox; using console.log to debug and then tried the site out in IE and had it fail due to a javascript error.  The error?  console is undefined of course.

Here is my simple and very limited solution to the problem.  At the beginning of my site, before any other javascript is defined I have this little snippet:

&lt;pre class="javascript" name="code"&gt;
var console = console || {
    log : function(text){
        /* 
        do nothing.. this prevents us from having errors
        in ie when we accidentally leave console.log calls in the js code
        on deployment:
        
        if we want a cheap console in ie just add alert(text); to this outside the comments
        */
       
    }
}
&lt;/pre&gt;


Basically what this does is it checks to see if console is defined, if so it returns the already defined console object.  If the console object isn't defined, then it returns a new object that contains a method of log.  The log method takes in a value and then does nothing with it.  The comment block tells you how you can make it do a bit more.  

There are plenty of more feature rich solutions to this problem out there but, in general, this works for me.  It's lightweight and easy to use.  I hope it saves you a few tiny headaches in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2344802762479398304?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oRp9C0qM2JMDoIUomSs5XvcdQGo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/Wv_a-KZ2nz0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2344802762479398304/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2344802762479398304" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2344802762479398304?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2344802762479398304?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/Wv_a-KZ2nz0/consolelog-in-ie.html" title="console.log in IE" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/09/consolelog-in-ie.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcNSXkyfCp7ImA9WhdQF0U.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3509505516904466170</id><published>2011-08-19T17:06:00.001-04:00</published><updated>2011-08-19T17:08:18.794-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-19T17:08:18.794-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="sql-server" /><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><title>Quickly Script a SQL Server View to Oracle Table</title><content type="html">I recently had a need to mirror a SQL server view in an Oracle database.  Without getting to detailed the basic premise is that a job runs once daily that copies data from the SQL Server via hetergenous data services into the Oracle table.  This allows some useful reporting queries to run that are joined across multiple Oracle schemas without having the slowdown involved with communicating directly over the heterogenous link on each query.&lt;br /&gt;
&lt;br /&gt;
Anyway, some of these views are stupid huge and I did not want to type each and every column name and column type. Thankfully there is a great resource inside SQL server that made my life quite a bit easier - the INFORMATION_SCHEMA.COLUMNS table.  It basically describes all the bits and pieces involved in all of the tables and views in your database.&lt;br /&gt;
&lt;br /&gt;
It's important to note that not all SQL server columns fit exactly into Oracle columns so I also needed to include a bit of logic to make &lt;a href="http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/apa.htm"&gt;the translation between datatypes&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is the query:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;SELECT '"' + column_name + '"     ' +
		CASE data_type
			WHEN 'bigint'		THEN 'number(19)'
			WHEN 'binary'		THEN 'raw'
			WHEN 'bit'		THEN 'number(3)'
			WHEN 'char'		THEN 'char'
			WHEN 'datetime'		THEN 'timestamp'
			WHEN 'decimal'		THEN 'number(' + CAST(numeric_precision as varchar) + ',' + CAST(numeric_scale as varchar) + ')'
			WHEN 'float'		THEN 'float(49)'
			WHEN 'image'		THEN 'long raw'
			WHEN 'int'		THEN 'number(10)'
			WHEN 'money'		THEN 'number(19,4)'
			WHEN 'nchar'		THEN 'nchar'
			WHEN 'ntext'		THEN 'long'
			WHEN 'nvarchar'		THEN 'nchar'
			WHEN 'numeric'		THEN 'number(' + CAST(numeric_precision as varchar) + ',' + CAST(numeric_scale as varchar) + ')'
			WHEN 'real'		THEN 'float(23)'
			WHEN 'smalldatetime'	THEN 'date'
			WHEN 'smallmoney'	THEN 'number(10,4)'
			WHEN 'smallint'		THEN 'number(5)'
			WHEN 'text'		THEN 'long'
			WHEN 'timestamp'	THEN 'raw'
			WHEN 'uniqueidentifier' THEN 'char(36)'
			WHEN 'varbinary'	THEN 'raw'
			WHEN 'varchar'		THEN 'varchar2( ' + CAST(CHARACTER_MAXIMUM_LENGTH AS varchar) + ')'
			ELSE 'CHECK THIS.. ' + data_type + ' DataType'
		END + ', '
	

FROM information_schema.columns
WHERE table_name = 'your_table_or_view_name'
&lt;/pre&gt;&lt;br /&gt;
This will basically give you backa bunch of records that have the column name surrounded by quotes and then the type of the column followed by a comma.&lt;br /&gt;
&lt;br /&gt;
Once you have that you just need to prepend the "CREATE TABLE tablename (" bit at the beginning and remove the final comma and append a closing ");" and you've got a nice script to create a table.&lt;br /&gt;
&lt;br /&gt;
If you have a small table this probably isn't too helpful.  However, some of the views I have to mirror have over 250 columns!  &lt;br /&gt;
&lt;br /&gt;
It is possible that at times you will see a -1 in the datatype field.  If that happens it is because the length was set to "MAX" however I didn't really need to update my query to handle that so I'll leave that as an exercise for you if you need to handle that special case.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3509505516904466170?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9typEWUTX_w3-5Ima0rnZ2XXAiQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/cJBXPcBy-tI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3509505516904466170/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3509505516904466170" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3509505516904466170?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3509505516904466170?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/cJBXPcBy-tI/quickly-script-sql-server-view-to.html" title="Quickly Script a SQL Server View to Oracle Table" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/08/quickly-script-sql-server-view-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFSXg-fyp7ImA9WhdSFkQ.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-4403651342944652230</id><published>2011-07-26T11:28:00.001-04:00</published><updated>2011-07-26T11:28:38.657-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-26T11:28:38.657-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><title>Oracle Error: ORA-12541 - TNS: no listener</title><content type="html">I was on vacation last week and when I returned, I could no longer connect to my local Oracle instance.  My C# apps and PL/SQL developer both reported a ORA-12541 TNS: no listener error.&lt;br /&gt;
&lt;br /&gt;
I hadn't changed anything before I left and I certainly hadn't changed anything as soon as I got back so I was a little perplexed.  Fortunately, there was a pretty easy solution which I extracted from &lt;a href="http://www.orafaq.com/wiki/ORA-12541"&gt;The Oracle FAQ&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Check your listeners status by going to the command line and entering the Listener Control Program using command LSNRCTL.  Once in the program enter the command: STATUS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tool suggests you also start and stop the listener but that had no effect for me.  My listener just didn't want to work.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Recreate your listener.  Again, go to a command prompt but this time open up the Network Configuration Assistant using the command: netca&lt;/li&gt;
&lt;li&gt;Inside this tool you first need to delete your listener.  Mine was actually called "listener" and I just accepted all of the defaults when deleting it.  Once it is deleted, recreate it, again I used all of the defaults.&lt;/li&gt;
&lt;li&gt;After it was created I went back to the Listener Control Program (LSNRCTL) and ran the STATUS commaned.  This time it looked pretty good and, sure enough, my apps and PL/SQL Developer were able to connect to the database.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-4403651342944652230?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KC3t8vYM1zv9rj42p-c1j5QhoOY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/1OF39fzMEYM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/4403651342944652230/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=4403651342944652230" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4403651342944652230?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4403651342944652230?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/1OF39fzMEYM/oracle-error-ora-12541-tns-no-listener.html" title="Oracle Error: ORA-12541 - TNS: no listener" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/07/oracle-error-ora-12541-tns-no-listener.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8MQ344fCp7ImA9WhZaF0Q.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-6931562731234979175</id><published>2011-07-04T11:54:00.000-04:00</published><updated>2011-07-04T11:54:42.034-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-04T11:54:42.034-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="google+" /><title>Google+ : My Favorite Feature So Far</title><content type="html">When I first heard about Google+ I thought that circles would be my favorite feature.  I thought having an easy way to filter who I published things to would be great.  And, so far, it is.  However, there is another aspect of circles that I like even more.  They are helping me find people who share my interests and who have interesting things to talk about.&lt;br /&gt;
&lt;br /&gt;
For example, with this Blog I talk about development stuff leaning mostly towards Cold Fusion development.  Thus when I was defining my circles I created a ColdFusion circle and put some folks like Sean Corfield and Marc Esher in my CF circle.  They both usually have interesting stuff to talk about in regards to CF and so I'm happy they both also put me into a circle that also seems to deal with development topics.&lt;br /&gt;
&lt;br /&gt;
These relationships were previously defined though.  We've all communicated in some fashion or another online either via twitter, a forum, or facebook.  Because of these relationships I trust that the people they are talking to about development stuff actually care about it and probably have something to add to the conversation at some point.  Thus, when one of them posts about a development topic to a limited audience I can look at the other members of the limited audience and instantly find other people who share that particular interest. I can't, necessarily, hear what they have to say - but I can begin to form a new relationship with these people by putting them in one of my circles.&lt;br /&gt;
&lt;br /&gt;
Once they are in my circle they will start to see some of my content on that topic.  If they like what I have to say they will most likely add me to their development circle and then I'll start hearing what they have to say and we will begin an online relationship around our shared interest in development..  If they don't like what I have to say they will just ignore me and the relationship will be terminated - which is fine.  &lt;br /&gt;
&lt;br /&gt;
This works for any topic I'm interested in.  I might have a C# circle or a Disc Golf or a Mountain Bike circle and, in each, I might find; via the extended circles, others who share my interest and who I might want to have a lasting conversation with.&lt;br /&gt;
&lt;br /&gt;
Circles, for me, aren't as much about filtering for who hears what I have to say but are about finding people who have something to say I want to hear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-6931562731234979175?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RSNqTEINsLRSWMjb6xAjjI22r4E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/KMj75iqlVug" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/6931562731234979175/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=6931562731234979175" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/6931562731234979175?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/6931562731234979175?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/KMj75iqlVug/google-my-favorite-feature-so-far.html" title="Google+ : My Favorite Feature So Far" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/07/google-my-favorite-feature-so-far.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04BRXY5eSp7ImA9WhZXE0g.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-8466532949482391940</id><published>2011-05-02T13:01:00.001-04:00</published><updated>2011-05-02T13:05:54.821-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-02T13:05:54.821-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql server ce" /><category scheme="http://www.blogger.com/atom/ns#" term="windows7" /><category scheme="http://www.blogger.com/atom/ns#" term="apache" /><title>Windows 7 : Apache Won't Start on Port 80 - PID 4 Blocking</title><content type="html">Today I ran into a strange problem where Apache wouldn't start.  I kept getting an error saying it couldn't bind to the socket (I only saw the error detail if I tried to start Apache from the command line).  I then ran the following command:&lt;br /&gt;
&lt;br /&gt;
netstat -o -n -a | findstr 0.0:80&lt;br /&gt;
&lt;br /&gt;
And saw that something unidentified was listening on Port 80 - netstat couldn't figure out what but it knew it was assigned Process ID (PID) 4.  I then went to task manager, turned on the PID column, and saw that the NT Kernel was PID 4.  WTF?  Why would the OS be listening on Port 80?&lt;br /&gt;
&lt;br /&gt;
Well, it turns out the OS was just sort of acting as a proxy - and I wasn't getting the full story.  Thankfully, a little Googling turned up an&lt;a href="http://www.honk.com.au/index.php/2010/10/20/windows-7-pid-4-listening-port-80-apache-cannot-star/"&gt; article that identified the culprit&lt;/a&gt; for me.. SQL Server Reporting Services (I installed SQL Server 2008 last week).&lt;br /&gt;
&lt;br /&gt;
I went into the Service manager, killed that service, and bam! Apache started right up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Crazy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-8466532949482391940?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QfySmQgcF57PrjnUq4i6lx3Qnsw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QfySmQgcF57PrjnUq4i6lx3Qnsw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QfySmQgcF57PrjnUq4i6lx3Qnsw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QfySmQgcF57PrjnUq4i6lx3Qnsw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/u2DJ0Hx17cs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/8466532949482391940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=8466532949482391940" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8466532949482391940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8466532949482391940?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/u2DJ0Hx17cs/windows-7-apache-wont-start-on-port-80.html" title="Windows 7 : Apache Won't Start on Port 80 - PID 4 Blocking" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/05/windows-7-apache-wont-start-on-port-80.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYCR3c8eCp7ImA9WhZSEUw.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-6226353051616784664</id><published>2011-03-26T00:02:00.001-04:00</published><updated>2011-03-26T00:02:46.970-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-26T00:02:46.970-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><category scheme="http://www.blogger.com/atom/ns#" term="oracleclob" /><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><category scheme="http://www.blogger.com/atom/ns#" term="clob" /><title>C# Writing a CLOB to an Oracle Database GOTCHA</title><content type="html">This may not apply to everyone but it did for me using Visual Studio 2008 with .Net 3.5&lt;br /&gt;
&lt;br /&gt;
I found plenty of examples on how to write a CLOB to an Oracle Database but none of them worked if the CLOB cell currently had nothing it in to write to. &amp;nbsp;Thus I came up with this solution.&lt;br /&gt;
&lt;br /&gt;
Sadly, it involves writing to the database twice. &amp;nbsp;The first &amp;nbsp;inserts a single space character into the field and the second actually writes the CLOB. &amp;nbsp;Here is some source code to help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Listing 1: Update the clob cell to have a single space in it.&lt;br /&gt;
&lt;pre class="csharp" name="code"&gt;string sql = "UPDATE table SET mycell = :myval WHERE myid = :myid";
 OracleConnection conn = GetConnection(); //helper method that gets my connection object.
 conn.Open();
 using(OracleCommand sqlCommand = new OracleCommand(sql, conn);
 {
  OracleParameter myval = sqlCommand.Parameters.Add("myval", OracleType.VarChar);
  myval.Value = " ";

  OracleParameter myid = sqlCommand.Parameters.Add("myid", OracleType.Int16);
  myval.Value = idValue; // assume idValue was predefined..

  sqlCommand.ExecuteNonQuery();
 }
 UpdateClob("table", "mycell", "WHERE id = " + idValue.ToString(), stringValue); // stringValue is predefined and is what will be finally stored in the CLOB
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
UpdateClob is a function that will actually write the final value to the CLOB field:&lt;br /&gt;
&lt;pre class="csharp" name="code"&gt;protected void UpdateClob(string table, string column, string where, string value)
        {
            var sql = "SELECT " + column + " FROM " + table + " " + where + " FOR UPDATE";

     // you need to convert your string into a byte array to pass into to the CLOB later
            byte[] newvalue = System.Text.Encoding.Unicode.GetBytes(value);


            OracleConnection conn = GetConnection();
            OracleTransaction transaction = conn.BeginTransaction();
            using (OracleCommand cmd = conn.CreateCommand())
            {
                cmd.Transaction = transaction;
                cmd.CommandText = sql;
                using (OracleDataReader reader = cmd.ExecuteReader())
                {
                    if (reader.Read())
                    {
                        OracleLob clob = reader.GetOracleLob(0);
   // if I didn't prepopulat the field the clob object would mysteriously have a null connection object.
                        clob.Write(newvalue, 0, newvalue.Length);
                        clob.Close();
                    }
                }
                transaction.Commit();
            }
        }
&lt;/pre&gt;&lt;br /&gt;
Anyway, overall it's a pretty straight forward process but kind of kludgy considering you have to write to the table twice.  I could not just use a parameterized query to pass in the CLOB's byte array value.  And, if I pre-wrote with an empty string like "" then it was as if I did nothing so I had to prepopulate with at least one character.&lt;br /&gt;
&lt;br /&gt;
Oddly enough, if I prepopulated with something like "PLACEHOLDER STRING" and then tried to write an empty string to it using the clob.Write() the method call succeeded by the value of the column didn't update.&lt;br /&gt;
&lt;br /&gt;
I can't say it makes a lot of sense but there you have it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-6226353051616784664?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2nLj4DpBpXhjzLmT7H531Chjfos/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2nLj4DpBpXhjzLmT7H531Chjfos/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2nLj4DpBpXhjzLmT7H531Chjfos/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2nLj4DpBpXhjzLmT7H531Chjfos/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/oKfJQmo6Q4A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/6226353051616784664/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=6226353051616784664" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/6226353051616784664?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/6226353051616784664?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/oKfJQmo6Q4A/c-writing-clob-to-null-record.html" title="C# Writing a CLOB to an Oracle Database GOTCHA" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/03/c-writing-clob-to-null-record.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUHQns-eyp7ImA9Wx9aEUU.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-9102260328390933155</id><published>2011-03-03T14:23:00.000-05:00</published><updated>2011-03-03T14:23:53.553-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-03T14:23:53.553-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pl/sql developer" /><category scheme="http://www.blogger.com/atom/ns#" term="plsql" /><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><title>Get Quick Dump of all Tables and Columns in Oracle Schema</title><content type="html">Today I was asked if there were any columns in our schema that contained the string "WIZ" in their name. &amp;nbsp;Here is the query I used to confidently answer no.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;&lt;div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;SELECT table_name, column_name &amp;nbsp;from dba_tab_columns&lt;/div&gt;&lt;div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;WHERE LOWER(owner) = 'schema_name'&lt;/div&gt;&lt;div style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;AND UPPER(column_name) LIKE '%WIZ%'&lt;/div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;ORDER BY table_name, column_name&lt;/span&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The only caveat was I had to be logged in as the db admin to access the "dba_tab_columns" table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-9102260328390933155?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1AGOoNYtgDqCjMe5344kYENheek/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1AGOoNYtgDqCjMe5344kYENheek/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1AGOoNYtgDqCjMe5344kYENheek/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1AGOoNYtgDqCjMe5344kYENheek/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/NRO8d8TuunY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/9102260328390933155/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=9102260328390933155" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/9102260328390933155?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/9102260328390933155?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/NRO8d8TuunY/get-quick-dump-of-all-tables-and.html" title="Get Quick Dump of all Tables and Columns in Oracle Schema" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/03/get-quick-dump-of-all-tables-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQMQ348eCp7ImA9WhZSFk4.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-4480147718894585165</id><published>2011-02-18T11:13:00.001-05:00</published><updated>2011-04-01T00:33:02.070-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-01T00:33:02.070-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="coldfusion" /><category scheme="http://www.blogger.com/atom/ns#" term="jrun" /><category scheme="http://www.blogger.com/atom/ns#" term="cf8" /><category scheme="http://www.blogger.com/atom/ns#" term="cf9" /><title>Installing CF8 and CF9 side by side on Apache 2.x</title><content type="html">I have a bit of a conundrum; I have some clients who use CF8 some who use CF9 (and yes, some who still use CF 6 and 7).  However, for the most part I only have to do regular work for those clients who use either CF8 or CF9.  The trouble is I only have one development machine and I need to have both CF8 and CF9 installed in parallel in such a way that I can easily switch between the two servers when I switch project contexts.  The following will explain how I set this up on my Windows XP machine and it borrows heavily from &lt;a href="http://www.cfgothchic.com/blog/post.cfm/presentation-installing-multiple-versions-of-coldfusion-together"&gt;a presentation I found at CF Goth Chic's website&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Before you begin I suggest you just uninstall any copy of CF you already have setup. &amp;nbsp;Before I did that I created a Coldfusion Archive that contained all of my existing datasources and mappings so I could quickly replicate them later. &amp;nbsp;If you don't know how to create or deploy a coldfusion archive I suggest you check the CF documentation. &amp;nbsp;Even without it you can probably guess your way though the process. &amp;nbsp;I only included the datasources and mappings in mine but you may want to back even more stuff up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ok, now on to the meat of the operation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Install Coldfusion 9 first. &amp;nbsp;You want to begin with the newest version so that you have the latest version of the Java Runtime to work with.&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;As you install you'll want to pick "Enterprise Multiserver Configuration"&lt;/li&gt;
&lt;li&gt;Also make sure you select "Use Built In Webserver, Development Only"&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Once the install has completed let the installer open the "Configuration Wizard"&lt;/li&gt;
&lt;li&gt;Once the Configuration Wizard finishes open the CF Administrator for your install at&amp;nbsp;&lt;a href="http://127.0.0.1:8300/CFIDE/administrator/index.cfm"&gt;http://127.0.0.1:8300/CFIDE/administrator/index.cfm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Inside the CF Admin Expand the "Enterprise Manager" option in the left menu and select Instance Manager&lt;/li&gt;
&lt;li&gt;Create a New Instance&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;Server Name: CF9&lt;/li&gt;
&lt;li&gt;Server Directory will auto-populate&lt;/li&gt;
&lt;li&gt;Select "Create Windows Service"&lt;/li&gt;
&lt;li&gt;Deselect "Auto Start Service"&lt;/li&gt;
&lt;li&gt;Click Submit - this part will take a while; sit back and browse &lt;a href="http://www.reddit.com/"&gt;Reddit &lt;/a&gt;or something while you wait.&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Once the setup was done you can visit the CF Admin for your new instance at http://127.0.0.1:8301/CFIDE/administrator &amp;nbsp;once here you can deploy your Coldfusion Archive if you created one.&lt;/li&gt;
&lt;li&gt;Install Coldfusion 8&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;This is a little more tricky. &amp;nbsp;Pick the J2EE configuration &amp;nbsp;"EAR" file&lt;/li&gt;
&lt;li&gt;Enter the context root of /&lt;/li&gt;
&lt;li&gt;Use the default for every other option; if you deviate from the defaults make a note of your changes and apply them as necessary in the later steps.&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;I provided the same admin and rds passwords I used in the CF9 installation.&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;li&gt;Go back to the CF9 admin at&amp;nbsp;&lt;a href="http://127.0.0.1:8300/CFIDE/administrator/index.cfm"&gt;http://127.0.0.1:8300/CFIDE/administrator/index.cfm&lt;/a&gt;&amp;nbsp;and define a second instance under the "Enterprise Manager"&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;ServerName: CF8&lt;/li&gt;
&lt;li&gt;Server Directory will auto-populate&lt;/li&gt;
&lt;li&gt;Create for EAR/WAR (optional) - enter the path to your newly created EAR file (C:\Coldfusion8\cfusion.ear is the default)&lt;/li&gt;
&lt;li&gt;Select "Create Windows Service"&lt;/li&gt;
&lt;li&gt;Deselect "Auto Start Service"&lt;/li&gt;
&lt;li&gt;Click submit - again this will take a while - read the news at &lt;a href="http://newsvine.com/"&gt;newsvine&lt;/a&gt; and relax.&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Once this step is done you can vist the CF Admin for this instance at http://127.0.0.1:8302/cfide/administrator&lt;/li&gt;
&lt;li&gt;At this point you're just about done. &amp;nbsp;We just have to make some apache configuration changes. &amp;nbsp;So first off go to /JRUN4/bin/wsconfig.exe and setup either your cf8 or cf9 server with your apache install. &amp;nbsp;This will do a couple things. &amp;nbsp;1. It will put the default jrun statements in your apache conf file and it will setup the jrun apache module under /jrun4/lib/wsconfig/1/ &lt;/li&gt;
&lt;li&gt;next in /jrun4/lib/wsconfig create two directories &amp;nbsp; one called cf9 and the other cf8&lt;/li&gt;
&lt;li&gt;now go to your apache conf file and search for JRUN and you'll find something like this&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="xml" name="code"&gt;&amp;lt;IfModule mod_jrun20.c&amp;gt;
    JRunConfig Verbose false
    JRunConfig Ignoresuffixmap false
    #JRunConfig Errorurl url &amp;lt;optionally redirect to this URL on errors&amp;gt;
    #JRunConfig ProxyRetryInterval 600 &amp;lt;number of seconds to wait before trying to reconnect to unreachable clustered server&amp;gt;
    #JRunConfig ConnectTimeout 15 &amp;lt;number of seconds to wait on a socket connect to a jrun server&amp;gt;
    #JRunConfig RecvTimeout 300 &amp;lt;number of seconds to wait on a socket receive to a jrun server&amp;gt;
    #JRunConfig SendTimeout 15 &amp;lt;number of seconds to wait on a socket send to a jrun server&amp;gt;

 JRunConfig Apialloc false
 JRunConfig Serverstore "C:/dev/tools/JRun4/lib/wsconfig/cf9/jrunserver.store"
 JRunConfig Bootstrap 127.0.0.1:51000
 AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
&amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
I've actually edited it a little to make those last four lines stand out.    The 51000 is the port that CF9's proxy is listening on.  Basically that is how APACHE talks to JRUN and CF9.  If you have a virtual server setup that you want to use your CF8 install you'd just put the following code inside your virtual server node of the conf file:&lt;br /&gt;
&lt;pre class="xml" name="code"&gt;&amp;lt;IfModule mod_jrun20.c&amp;gt;
 JRunConfig Apialloc false
 JRunConfig Serverstore "C:/dev/tools/JRun4/lib/wsconfig/cf8/jrunserver.store"
 JRunConfig Bootstrap 127.0.0.1:51002
 AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
&amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Note that both the serverstore was updated to point to /cf8/...  and the BootStrap port was switched to 51002.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
NOTE:  If you try to hit a site that is configured for CF8 at this point and it fails with the following error messages in your site.log:&lt;br /&gt;
&lt;pre&gt;Couldn't initialize from remote server, JRun server(s) probably down.
  JRun will not accept request.  Check JRun web server configuration and JRun mappings on JRun server.
&lt;/pre&gt;You'll want to check the following things.  &lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;First look in your /jrun4/servers/cf8/server-inf/jrun.xml file down near line 377 and make sure the deactivated value is "false".  It probably is.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;You'll then want to go to the JRUN management console at http://localhost:8000 - login with your cfadmin username and password.&lt;/li&gt;
&lt;li&gt;Expand the cf8 server node in the left menu and then click on "services" in the right panel you should see "ProxyService" and the status will probably say "Initialized" &amp;nbsp;That's the problem, it needs to say "Running"&lt;/li&gt;
&lt;li&gt;Click on the "Play" icon under "Actions" beside ProxyService.. Once that starts you should be able to load your CF8 site without any problems.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-4480147718894585165?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6xq2fFEgUNd9fb3NUFE902Ecsb8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6xq2fFEgUNd9fb3NUFE902Ecsb8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6xq2fFEgUNd9fb3NUFE902Ecsb8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6xq2fFEgUNd9fb3NUFE902Ecsb8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/DBhpfiEA5_g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/4480147718894585165/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=4480147718894585165" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4480147718894585165?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/4480147718894585165?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/DBhpfiEA5_g/installing-cf8-and-cf9-side-by-side-on.html" title="Installing CF8 and CF9 side by side on Apache 2.x" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/02/installing-cf8-and-cf9-side-by-side-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FRHY-eSp7ImA9Wx9XFE8.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-327962921309528860</id><published>2011-01-07T13:26:00.000-05:00</published><updated>2011-01-07T13:26:55.851-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-07T13:26:55.851-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Android - Hello World</title><content type="html">Yesterday I downloaded and installed Eclipse and the Android SDK.  I then tried to run the simple &lt;a href="http://developer.android.com/resources/tutorials/hello-world.html"&gt;Hello Android&lt;/a&gt; program that is on the developer.android.com site.  The code compiled but the application wouldn't deploy to the emulator properly.  Instead I got some weird errors as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;pre name="code" class="xml"&gt;[2011-01-07 12:47:04 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2011-01-07 12:47:04 - HelloAndroid] (null)
[2011-01-07 12:47:05 - HelloAndroid] Launch canceled!
&lt;/pre&gt;&lt;br /&gt;
It was pretty annoying because no matter how much I searched online and found other people with similar problems I couldn't seem to get the damn app to work on the emulator.  To make matters worse the Emulator takes FOREVER to start.  I was almost ready to give up before I began considering how annoying of a time I was having with something as simple as Hello World.&lt;br /&gt;
&lt;br /&gt;
Eventually I found a post at Stack Overflow that mentioned that I shouldn't launch the emulator from within Eclipse.  Instead I should create a batch file with the following contents and start the emulator with it.&lt;br /&gt;
&lt;br /&gt;
&lt;pre name="code" class="xml"&gt;emulator.exe -cpu-delay 0 -no-boot-anim -avd my_avd
&lt;/pre&gt;&lt;br /&gt;
I made the batch file and the emulator did start MUCH faster (still slow) but, sadly, the app still wouldn't deploy to the emulator properly and I kept getting the same errors.  I saw a bunch of suggestions that I look in the "logcat" but, of course, the tutorials I'd gone through didn't mention how to do that anywhere and none of the posts suggesting it gave the steps to do that either but eventually I found those too.   Here's how you view the logcat in Eclipse:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;In Eclipse go to the Window Menu&lt;/li&gt;
&lt;li&gt;Show View&lt;/li&gt;
&lt;li&gt;Other&lt;/li&gt;
&lt;li&gt;Expand Android&lt;/li&gt;
&lt;li&gt;Select LogCat&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
Unfortunately the logcat info was useless and I wasn't seeing anything that would explain why I was still getting my errors.  Then, I found a post that was tangentially related to my problem but where someone was seeing an error that mentioned something about a lack of memory or space or something.  I don't really remember.  However, the advice given to fix that problem also fixed mine.  I had to modify my batch file to include the -partition-size directive.  The advice suggested 514 as the value to use but I decided to use 1028 instead.  So now my batch file for starting the emulator looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre name="code" class="xml"&gt;emulator.exe -cpu-delay 0 -partition-size 1028 -no-boot-anim -avd my_avd
&lt;/pre&gt;&lt;br /&gt;
This final batch file fixed everything and I was good to go.  Hope it helps some others get going.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-327962921309528860?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AjDKjNMOS5f5GHG3dB3TA_WrCxU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AjDKjNMOS5f5GHG3dB3TA_WrCxU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AjDKjNMOS5f5GHG3dB3TA_WrCxU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AjDKjNMOS5f5GHG3dB3TA_WrCxU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/iof8NEtTxmI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/327962921309528860/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=327962921309528860" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/327962921309528860?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/327962921309528860?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/iof8NEtTxmI/android-hello-world.html" title="Android - Hello World" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>7</thr:total><feedburner:origLink>http://code.rawlinson.us/2011/01/android-hello-world.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04NSX8zfSp7ImA9Wx9SGUk.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-5350868593041999411</id><published>2010-12-09T20:53:00.000-05:00</published><updated>2010-12-09T20:53:18.185-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-09T20:53:18.185-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="google-chrome" /><category scheme="http://www.blogger.com/atom/ns#" term="chrome-os" /><category scheme="http://www.blogger.com/atom/ns#" term="chrome" /><category scheme="http://www.blogger.com/atom/ns#" term="google" /><title>My Chrome Netbook</title><content type="html">Today I recieved a new prototype netbook from Google - the Chrome Netbook.   I'm not sure why I was lucky enough to be selected to be a part of the pilot program but I think it might be because I have always, well for as long as I've been able to, run the dev build of the Chrome web browser.   Two or Three days ago I received an update to the browser and when it restarted there was a little green bubble on the top of a new tab asking me if I wanted to sign up for the Chrome OS Pilot program.  I was a little suspicious at first but followed the link and saw that it was legit so I filled out the short form and figured nothing would ever happen.  Today the netbook showed up in the mail.  Pretty cool.&lt;br /&gt;
&lt;br /&gt;
THis isn't Engadget so you won't be seeing a series of photos detailing the "unboxing" instead I'll try to describe the overall experience.  At first I was confused.  I didn't know why I was getting a box from some guy in Kentucky. It didn't have anything on it to suggest Google at all.  THen, when I opened the shipping box there was another cardboard box inside it.  The box is decorated with a sort of blue-print type diagram for a hamster powered rocket ship.  I thought that, perhaps, it was a gift from my Reddit secret santa.  However, when I removed the hamster box from the shipping box I saw a sticker on the bottom warning about a lithium-ion battery.  Suddenly I though, could this be a Chrome Netbook?  No way.&lt;br /&gt;
&lt;br /&gt;
I opened the box and sure enough, sitting before me was a very plain looking purely black netbook.  No labels, no stickers, no badges, nothing but a soft touch matte black notebook.  Heck it isn't even small like I think of netbooks, it is closer to a 13" mac book or something.  It's also very thin; but it weighs a surprising amount.  I'm not sure how much it weighs but it is deceptively heavy for it's size.  &lt;br /&gt;
&lt;br /&gt;
In side the box was a battery which is fills about half of the bottom of the netbook.  THere as also a power cord and a getting started card.  That's it.  THe card was super simple and it said to put the battery in, turn it on gently, and follow the welcome wizard.  So I did.  I put the battery in, opened the lid (which, in this case, woke the machine up - I didn't need to hit the power button) and I walked through the setup.  I think the setup was 3 things.  First, accept a user agreement.  Second, pick a wireless network - there is no RJ 45 plug.&lt;br /&gt;
&lt;br /&gt;
At first I couldn't connect to a wireless network because my office uses enterprise WEP - which requires a username and a password.  The network settings only take a password and uses standard wep (as well as wpa and something else, I can't remember).  However, there is an insecure network near my office which I was able to connect to.  Immediately after connecting the netbook began to update itself to the latest version and then it rebooted.  At that point I could either login with my google account info OR as a guest.&lt;br /&gt;
&lt;br /&gt;
If you login as a guest it starts a session using, effectively, incognito mode on Chrome.  I opted to start up using my login information and it instantly imported my bookmarks, extensions, and history, etc to the chrome browser in the OS.&lt;br /&gt;
&lt;br /&gt;
The OS is just about what you might imagine.  It is the chrome web browser; except there are a few small differences.  First off it supports alt-tab between different chrome windows, each chrome window is full screen so the alt-tab feels like you're switching between desktops (imagine a desktop manager with virtual desktops off the screen).  The settings panel of this instance of the browser has a network page which lets you pick the wireless network you want to join to OR if you want to connect to the verizon 3G network.&lt;br /&gt;
&lt;br /&gt;
Yep, it has a 3G antenna built in.  However, so far, I haven't had much luck with getting that to work. Supposedly, once I successfully activate it I'll get 100MB of data transfer a month for free for 24 months.  I can also sign up for some kind of account for as little as $10/mo.  Since I haven't gotten that part to work yet I can't say much about it.&lt;br /&gt;
&lt;br /&gt;
I honestly don't know much more about the hardware inside the box. There was a small card in the hamster box that told me it uses an intel processor but that's all I know.  I suspect it might have an SSD harddrive but that's only because it boots up so fast.&lt;br /&gt;
&lt;br /&gt;
It's not instant, at least not doing a cold boot. It takes about 7-8 seconds to get to the login screen but, once at the login screen, everything else happens instantly.  There are none of the annoyingly slow startup services or auto-run programs going on that I deal with on my work machine. Instead, I login and instantly I'm on the web.  Plus, when I am done I don't have to wait for the machine to sleep before closing the lid.  I just close the lid and it is asleep.  That fast.  Then, when I open it later it is awake as soon as I open it.  The machine doesn't take a few moments to get its' bearings.  It just works.  That's pretty cool.  Other things like the iPad might work like that - I don't know, I don't have one - but this is the first computer I've had that is this responsive in a way that just lets me get stuff done.&lt;br /&gt;
&lt;br /&gt;
There is a small camera built in above the monitor - but I don't know what resolution.  It also has a microphone built in right beside it. Plus there are speakers on the back/bottom area.  On the side are three ports; a power port, a usb port, and a headphone jack.  That's it.  No CF card slots, no external monitor ports, no network cable slots, nothing.  Nothing on the back at all because, once you open it the top swivels down behind the keyboard a little and completely obscures the back of the computer.  &lt;br /&gt;
&lt;br /&gt;
The keyboard is a bit different too.  Many have already heard that Google is killing the caps-lock key and the rumor is not an exaggeration.  It is also killing the function keys.  In their place are iconified keys that do most of what you need.  One goes back, one forward, one for refresh, one for "full screen browser" mode, one is alt-tab, one is brightness, another anti-brightness, then one each for mute, volume up, and volume down and finally a power button in the top right of the keyboard.&lt;br /&gt;
&lt;br /&gt;
The rest of the keyboard is pretty traditional except the directional arrows are a little crammed.  Right and left are normal but up and down are both half-height and together fit in one keys space.  In place of the caps-lock key is a magnifying glass key.  That actually just opens a new tab (same as ctrl+t).  For those who want you can use all the normal keyboard shortcuts so ctrl+alt+n opens an incognito window.&lt;br /&gt;
&lt;br /&gt;
Another difference between chrome the os and chrome the browser is that there is a settings panel for changing mouse sensitivity and the date/time.  Each of the things that make it separate are completely unobtrusive though so as soon as you boot up you feel like you're just in a webbrowser so it is pretty easy to get your bearings and start doing things.  From my perspective of nighttime computer use; checking email, browsing the web, youtube videos, facebook and twitter it is perfect.  Obviously it wouldn't work very well for my job (software development) but I think for most normal home computer users it will work for the vast majority of things they would want to do.  Especially considering how many websites are the equivalent to desktop applications now a days.&lt;br /&gt;
&lt;br /&gt;
With that being said I am not sure if I could use it to upload photos from my camera.  I don't know if the machine will communicate via USB with it.  Plus, since there is no cf slot I'm not sure how I'd transfer photos to it and then to the web.&lt;br /&gt;
&lt;br /&gt;
Overall I really like the machine itself. I love the non-descript blackness of it.  I love the feel of the weird material the cover is made out of.  I also really like the keyboard.  However, I am having trouble adjusting to the unusual, to me, track pad.  There is no scroll area, no buttons to right click with, it is just a track pad area.  However, if you want to right click you have to click with two fingers.  I'm not very good at that yet though so most of the time my right clicks don't seem to register.  I'm not sure if my fingers are too close together or if I am not clicking hard enough.  I think, maybe, I am supposed to put both fingers down then press and the whole pad kind of clicks; it's weird.  You can also scroll by swiping two fingers up or down the pad.  That works much better for me than the right click but it just isn't normal for me yet so I tend to move my mouse around a lot because I just swipe one finger down the right side of the track pad like I can at work.&lt;br /&gt;
&lt;br /&gt;
I couldn't find any reference that said I'm not allowed to talk about the book so hopefully I'm not breaking the rules.  Overall I'm pretty psyched about it; though I have reported 3 different things so far for the engineers at Google to consider.   If you have any questions just ask and if I can answer them I'll do what I can.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-5350868593041999411?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Wi2HH6rZIJzNrTGzCpp-aQ3bGDE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wi2HH6rZIJzNrTGzCpp-aQ3bGDE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Wi2HH6rZIJzNrTGzCpp-aQ3bGDE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wi2HH6rZIJzNrTGzCpp-aQ3bGDE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/msAVPo_IXkw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/5350868593041999411/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=5350868593041999411" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/5350868593041999411?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/5350868593041999411?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/msAVPo_IXkw/my-chrome-netbook.html" title="My Chrome Netbook" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://code.rawlinson.us/2010/12/my-chrome-netbook.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EHQXcyeSp7ImA9Wx9TFEg.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2042044409986149864</id><published>2010-11-05T19:09:00.004-04:00</published><updated>2010-11-22T14:53:50.991-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-22T14:53:50.991-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="coldfusion" /><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="memory" /><category scheme="http://www.blogger.com/atom/ns#" term="heap" /><title>Monitor Your Java Heap on the Fly</title><content type="html">This sample code will be in ColdFusion as that was where I decided to test it.  However, it can obviously be used within a Java app if you wanted.&lt;br /&gt;
&lt;br /&gt;
I'm not going to get into the pros and cons of manually calling the garbage collector but feel free to hash it out in the comments.&lt;br /&gt;
&lt;br /&gt;
Anyway, here is how you check your currently used Heap and, if you want, how you call the garbage collector.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="coldfusion"" name="code"&gt;&amp;lt;cffunction name="cleanGC"&amp;gt;
 &amp;lt;cfset var rt = createObject("java","java.lang.Runtime") /&amp;gt;
 &amp;lt;cfset var used = rt.getRunTime().totalMemory()  - rt.getRuntime().freeMemory() /&amp;gt;
 &amp;lt;cfset var half = rt.getRunTime().totalMemory()/2/&amp;gt;
 &amp;lt;cfif used GT (half)&amp;gt;&amp;lt;!--- more than half as many megs as are available being used? Clean up if we can ---&amp;gt;
  &amp;lt;!--- call garbage collection ---&amp;gt;
  &amp;lt;cfset rt.getRunTime().gc() /&amp;gt;
 &amp;lt;/cfif&amp;gt;
&amp;lt;/cffunction&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
It's pretty straight-forward really.  Use at your own risk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2042044409986149864?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zVWCzwfiKuXEPDo3pNAB-ZNYoVg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zVWCzwfiKuXEPDo3pNAB-ZNYoVg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zVWCzwfiKuXEPDo3pNAB-ZNYoVg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zVWCzwfiKuXEPDo3pNAB-ZNYoVg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/eQw6_5RD2bM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2042044409986149864/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2042044409986149864" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2042044409986149864?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2042044409986149864?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/eQw6_5RD2bM/monitor-your-java-heap-on-fly.html" title="Monitor Your Java Heap on the Fly" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://code.rawlinson.us/2010/11/monitor-your-java-heap-on-fly.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAFSH8zeip7ImA9Wx5bFk4.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-1561216935551505251</id><published>2010-11-01T14:37:00.001-04:00</published><updated>2010-11-01T14:38:39.182-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-01T14:38:39.182-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tortoisesvn" /><category scheme="http://www.blogger.com/atom/ns#" term="subeclipse" /><title>SVN Merging for Dummies with TortoiseSVN</title><content type="html">I'm a big fan of branching in Subversion when working on a new feature set.  However, I'm also a moron who has endless trouble getting my branch to merge back into the main trunk of the repository.  Thus, this guide, to help me (and you) remember the easiest way to merge a branch back into trunk.&lt;br /&gt;
&lt;br /&gt;
I use TortoiseSVN version 1.6.7 so you may have to adjust these steps for your version.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Merge Trunk into your Branch - you have to do this first; do it at least once a week if your trunk is actively seeing development so that your merge back is as painless as possible.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Right click in the root of your checked out branch and select TortoiseSVN - Merge&lt;/li&gt;
&lt;li&gt;In the dialog that appears select "Merge From Range of Revisions"&lt;/li&gt;
&lt;li&gt;In the form put your repository trunk in and leave the revision field blank.&lt;/li&gt;
&lt;li&gt;Click the "test" button if you want; or just click Merge; depending on the size of your repo you may be waiting a while; have patience and relax...&lt;/li&gt;
&lt;li&gt;Eventually the merge will finish, when it does, check the log for any conflicts and figure out how to resolve them.  There shouldn't be many.&lt;/li&gt;
&lt;li&gt;Check in your branch noting the merge in the comments.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Merge your Branch to Trunk - only do this after step one is completed.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Navigate to a checked out copy of your trunk&lt;/li&gt;
&lt;li&gt;right click in the root and pick TortoiseSVN - Merge&lt;/li&gt;
&lt;li&gt;In the popup select "Merge between two branches&lt;/li&gt;
&lt;li&gt;In the from field enter your trunk path.  I know this is kind of counter-intuitive but it is correct.  You want to update from the trunk's current state so that it then matches your branches current state (since you just merged trunk into your branch&lt;/li&gt;
&lt;li&gt;in the TO field put your branches path.&lt;/li&gt;
&lt;li&gt;Choose the HEAD revision for both branches&lt;/li&gt;
&lt;li&gt;Merge away (or test if you prefer)&lt;/li&gt;
&lt;li&gt;Check in the trunk noting the merge in the comments&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
It's painfully simple really but It messes me up almost every time.  Also, remember to update your checked out branches (your branch and trunk) before you do any of the merges.  &lt;br /&gt;
&lt;br /&gt;
Good coding and good luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-1561216935551505251?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x-cqf0eAehFuzrndc5zaA2e2_2c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x-cqf0eAehFuzrndc5zaA2e2_2c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/x-cqf0eAehFuzrndc5zaA2e2_2c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x-cqf0eAehFuzrndc5zaA2e2_2c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/InTheTrenches/~4/wZyahFoez18" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/1561216935551505251/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=1561216935551505251" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1561216935551505251?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/1561216935551505251?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/wZyahFoez18/svn-merging-for-dummies-with.html" title="SVN Merging for Dummies with TortoiseSVN" /><author><name>Bill Rawlinson</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-Z3VX4nMlKXE/AAAAAAAAAAI/AAAAAAABaas/CdHNWNCP0Tk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://code.rawlinson.us/2010/11/svn-merging-for-dummies-with.html</feedburner:origLink></entry></feed>

