<?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;Ck8MSX0-eSp7ImA9WhVTE0U.&quot;"><id>tag:blogger.com,1999:blog-10753561</id><updated>2012-02-27T17:14:48.351-05:00</updated><category term="logging" /><category term="flash" /><category term="bug" /><category term="conversion" /><category term="selenium" /><category term="memento" /><category term="algorithms" /><category term="duck-typing" /><category term="cfcunit" /><category term="query" /><category term="daos" /><category term="getfullyear" /><category term="iteration" /><category term="software development" /><category term="t-sql" /><category term="applescript" /><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="handbrake" /><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="fit" /><category term="data structures" /><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="macports" /><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="folder-action" /><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="xcode" /><category term="integration" /><category term="sql-server" /><category term="applications devleopment" /><category term="priorities" /><category term="modeling" /><category term="itunes" /><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="binary-search" /><category term="critical trip point" /><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="avi" /><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="mountain-lion" /><category term="parsing" /><category term="api" /><category term="url parsing" /><category term="cf" /><category term="lion" /><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="uml" /><category term="test driven development" /><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="subeclipse" /><category term="customer service" /><category term="curation" /><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="m4v" /><category term="plugins" /><category term="stubs" /><category term="uri" /><category term="cpu-usage" /><category term="singletons" /><category term="debugging" /><category term="alttab" /><category term="apple" /><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>334</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;Ck8MSX09fCp7ImA9WhVTE0U.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-8514255530740419403</id><published>2012-02-27T13:24:00.001-05:00</published><updated>2012-02-27T17:14:48.364-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-27T17:14:48.364-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="macports" /><category scheme="http://www.blogger.com/atom/ns#" term="xcode" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="mountain-lion" /><category scheme="http://www.blogger.com/atom/ns#" term="lion" /><title>Rollback from Mountain Lion to Lion</title><content type="html">&lt;b&gt;&lt;span style="color: red;"&gt;Disclaimer: Before you do this; if it doesn't work you can't blame me. &amp;nbsp;It worked OK for me but maybe I was just lucky.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ok, with that out of the way here's the lowdown. &amp;nbsp;I installed the developer preview of Mac OS X Mountain Lion and immediately started to notice some things that I really needed wouldn't work anymore. &amp;nbsp;No parallels, macports had issues and couldn't compile things with XCode 4.4 (what is required for Mt Lion), and quite a bit more dealing with things that depended on macports or the compiler within xcode.&lt;br /&gt;
&lt;br /&gt;
So what did I do? &amp;nbsp;I tried to be creative and everything failed.&lt;br /&gt;
&lt;br /&gt;
Oh, and I didn't have a time machine snapshot of my system before the upgrade. &amp;nbsp; Anyway, I eventually went to google to find some solutions and found this posting explaining how to &lt;a href="http://kurrytran.blogspot.com/2012/02/how-to-uninstall-mountain-lion-os-x.html"&gt;install uninstall Mountain Lion&lt;/a&gt; except it doesn't show you how to uninstall Mountain Lion at all; it just shows you how to install Lion on another partition. &amp;nbsp;It does, however, have the key to the castle so to speak and I'll get into that in a little bit.&lt;br /&gt;
&lt;br /&gt;
Before you can install Lion you need a copy of Lion. &amp;nbsp;Makes sense right? &amp;nbsp;Well I didn't have a copy but the aforementioned post told me I could get it using my apple dev center account but then it said I couldn't&amp;nbsp;because&amp;nbsp;I was running mountain lion and that I'd need to get it another way. &amp;nbsp;Well damn.&lt;br /&gt;
&lt;br /&gt;
Later in the article he said you have to fool the system to let you install lion on the other partition by changing the version number of Mountain Lion. &amp;nbsp;I thought, well, what if I just do that now so I can get a copy of Lion and BAM! it worked. &amp;nbsp;So here are the basic steps.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp;I use sublime as my text editor and I have a command alias to launch sublime using the word sublime from the terminal..&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;$ sublime&amp;nbsp;&lt;span style="background-color: white; color: #4f4f4f; font-size: 13px; line-height: 18px; text-align: left;"&gt;/System/Library/CoreServices/SystemVersion.plist&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;It will ask you for your password; enter it then change the two version instances from 10.8 to 10.7&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Save the file; you'll be asked for your password again; enter it.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Now download Lion. &amp;nbsp;If you don't have an dev center account I guess you can pay the $30.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;wait a while. &amp;nbsp;Lion is big and it takes a long time to download. &amp;nbsp;It kind of freaked me out because it showed it going into my "Applications" at first but then it felt like nothing was happening. &amp;nbsp;Have some patience; go read reddit for a while.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Eventually the download will finish and the Lion installer will open automatically. &amp;nbsp;Notice, nowhere in this list did I tell you to make a new partition. &amp;nbsp;Screw that step!&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: #4f4f4f; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="color: black; font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;Install right over mountain lion. &amp;nbsp;Just pick the partition you normally have things on and GO.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: left;"&gt;&lt;span style="color: red; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;i&gt;&lt;span style="font-family: Times; font-size: small; font-style: normal; line-height: normal; text-align: -webkit-auto;"&gt;&lt;b&gt;WAIT WAIT.. finish reading this before you go...IT'S REALLY IMPORTANT&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;When the install is done your machine will reboot and prompt you to login but you won't be able to. &lt;a href="http://www.gibni.com/cant-login-after-os-x-lion-install-solved"&gt;&amp;nbsp;Lion hates your old passwords and gets rid of them all&lt;/a&gt; - you can't login yet. &amp;nbsp;Just reboot again and wait for the screen to go completely black then hold down &amp;nbsp;cmd+r&amp;nbsp;&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;HOLD THEM DOWN; don't just press and release. &amp;nbsp;HOLD THEM BOTH until a window opens called "Utilities"&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;In the main menu bar there is a services option, click on it and find terminal. &amp;nbsp;If it isn't services just look in each menu until you find terminal; open terminal&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;in the terminal window type "resetpassword" without the quotes and hit enter&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;A new windows opens and it shows you all of your old accounts. &amp;nbsp;Find yours and reset your password.&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;While you're at it reset the administrator password.&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;Once your down with that close all the windows then in the system menu pick restart&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;This time you don't have to hold down any keys.&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;Eventually the login screen will pop up; login as yourself&lt;/li&gt;
&lt;li style="text-align: -webkit-auto;"&gt;Now go to the system menu and install any updates so you're nice and secure.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
That worked for me (I also reinstalled xcode 4.3 from the app store after that).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Good luck&lt;/div&gt;
&lt;br /&gt;
-------&lt;br /&gt;
Some&amp;nbsp;additional&amp;nbsp;notes:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;After you re-install XCode 4.3; go to preferences, downloads, and install the command line tools&lt;/li&gt;
&lt;li&gt;I also reinstalled macports to be on the safe side&lt;/li&gt;
&lt;li&gt;parallels still doesn't work for me after the rollback.. I will reinstall parallels and hope for the best &lt;b&gt;UPDATE:&lt;/b&gt; uninstall and reinstall fixed it.&lt;/li&gt;
&lt;li&gt;because of some changes to mail; rolling back left me with a broken mail app; not a deal breaker as I can just use outlook as we get our mail from an exchange server at the office.&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-8514255530740419403?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/A_ZF_EALOey6p3f5tFTEnF56-CE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A_ZF_EALOey6p3f5tFTEnF56-CE/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/A_ZF_EALOey6p3f5tFTEnF56-CE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A_ZF_EALOey6p3f5tFTEnF56-CE/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/Ox_IgHOT2p8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/8514255530740419403/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=8514255530740419403" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8514255530740419403?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8514255530740419403?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/Ox_IgHOT2p8/rollback-from-mountain-lion-to-lion.html" title="Rollback from Mountain Lion to Lion" /><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/02/rollback-from-mountain-lion-to-lion.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMESHY-eyp7ImA9WhRbGEk.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-3168018163570127583</id><published>2012-02-09T23:33:00.001-05:00</published><updated>2012-02-09T23:33:29.853-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-09T23:33:29.853-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="m4v" /><category scheme="http://www.blogger.com/atom/ns#" term="handbrake" /><category scheme="http://www.blogger.com/atom/ns#" term="avi" /><category scheme="http://www.blogger.com/atom/ns#" term="applescript" /><category scheme="http://www.blogger.com/atom/ns#" term="itunes" /><category scheme="http://www.blogger.com/atom/ns#" term="automator" /><category scheme="http://www.blogger.com/atom/ns#" term="apple" /><title>Handbrake, Applescript, Automator, and iTunes Together as a Folder Action</title><content type="html">Yesterday I posted about my initial attempt at automatically converting .avi files with handbrake to m4v files and having them automatically added to iTunes. &amp;nbsp;That plan worked fine if the items dropped into my watched folder were all of the type .avi AND they weren't in a subdirectory.&lt;br /&gt;
&lt;br /&gt;
Tonight I decided to try and address these two deficincies. &amp;nbsp;First I can now handle the case where a folder is the "input" parameter; though my knowledge of applescript is so deficient I can only deal with one layer of directory heirarchy - sorry, no recursion. &amp;nbsp;I also now test for the extension of the file being processed to make sure it is an .avi before proceeding (otherwise I just skip the file).&lt;br /&gt;
&lt;br /&gt;
Yesterday I also made the script look a little more generic by hiding some of the elements of my directory structure by using words like "me" - today I decided to just post it as I wrote it. &amp;nbsp;You will have to change some variable values to make this work on your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;on run {input, parameters}
 repeat with x in input

  -- need to determine if input is a file or a directory..
  set details to (info for x without size)
  set allFiles to {}

  if kind of details is "folder" then
   -- if it is a folder, we need to grab all the contents as a list
   set tempFiles to list folder (x) without invisibles
   repeat with y in tempFiles
    set the end of allFiles to ((x as string) &amp;amp; y) as alias
   end repeat
  else
   -- if it is a file then we make a one item list..
   set the end of allFiles to x as alias
  end if
  
  -- now loop over the list we just made.
  repeat with i in allFiles
   
   -- only process avi files.
   if name extension of (info for i) is "avi" then
    try
     set text item delimiters to ":"
     set file_name to last text item of (i as text)
     set text item delimiters to ""
    on error
     set text item delimiters to ""
    end try
    
    set origFilepath to quoted form of POSIX path of (i as alias)
    set newFileName to "" &amp;amp; (characters 1 thru -5 of file_name as string) &amp;amp; ".m4v"
    set newFilepath to "/Users/bill/temp_movies/mp4/" &amp;amp; newFileName &amp;amp; ""
    
    
    --apple uses colons as delimiters while the  Untitled=drive; Users=directory; me=username; mp4=temp directory..
    set finalPath to ("Untitled:Users:bill:temp_movies:mp4:" &amp;amp; newFileName)
    
    
    --start the conversion; shell command uses the forward slash as the delimiter; hence two finalpath defined.
    set shellCommand to "nice /Applications/HandBrakeCLI -i " &amp;amp; origFilepath &amp;amp; " -o " &amp;amp; newFilepath &amp;amp; " --preset=\"AppleTV 2\";"
    do shell script shellCommand
    
    --I've told itunes to copy files on import; this way I don't have m4v's laying all over the place
    tell application "iTunes"
     add finalPath
    end tell
    
    --after the import is done I delete the m4v file I just created (from the temp directory)
    tell application "Finder"
     delete finalPath
    end tell
    
    -- prepare the movie for later deletion..
    set trashPath to "Untitled:Users:bill:temp_movies:to_trash:"
    tell application "Finder"
     move i to folder trashPath
    end tell
   end if
  end repeat
 end repeat
 return input
end run
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-3168018163570127583?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RxxHxYgbMsVo-AfDek5alskVAPY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RxxHxYgbMsVo-AfDek5alskVAPY/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/RxxHxYgbMsVo-AfDek5alskVAPY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RxxHxYgbMsVo-AfDek5alskVAPY/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/xLwQZc8_PvA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/3168018163570127583/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=3168018163570127583" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3168018163570127583?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/3168018163570127583?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/xLwQZc8_PvA/handbrake-applescript-automator-and.html" title="Handbrake, Applescript, Automator, and iTunes Together as a Folder Action" /><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/02/handbrake-applescript-automator-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MCRXg5eSp7ImA9WhRbF0Q.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-2597278994803871217</id><published>2012-02-08T23:44:00.000-05:00</published><updated>2012-02-09T08:51:04.621-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-09T08:51:04.621-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="m4v" /><category scheme="http://www.blogger.com/atom/ns#" term="conversion" /><category scheme="http://www.blogger.com/atom/ns#" term="folder-action" /><category scheme="http://www.blogger.com/atom/ns#" term="handbrake" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="avi" /><category scheme="http://www.blogger.com/atom/ns#" term="applescript" /><category scheme="http://www.blogger.com/atom/ns#" term="automator" /><title>Automatically convert .avi to .m4v and add to iTunes using Automator</title><content type="html">That is a long title but not nearly as long and arduous as my process of figuring out how to do what it says. &amp;nbsp;Here is the scenario...&lt;br /&gt;
&lt;br /&gt;
Let's say you and your mom are sharing a dropbox folder and she plops in an .avi of her recent performance in the community theater where she lives. &amp;nbsp;You don't really like the avi format and would prefer it in the m4v format and inside iTunes so you can watch it on your TV using your apple tv. &amp;nbsp;What is one way to do that?&lt;br /&gt;
&lt;br /&gt;
Well, I'm going to tell you. &amp;nbsp;Now, trust me, this probably isn't the best way; but it works and that's all I wanted. &amp;nbsp;Initially I tried the export movies task in automator but the resultant video wasn't working in iTunes - I'm not sure why. &amp;nbsp;Therefore I resulted to using the Handbrake CLI from within an apple script via automator. &amp;nbsp;Here is the script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sql" name="code"&gt;on run {input, parameters}
 repeat with i in input
  try
   set text item delimiters to ":"
   set file_name to last text item of (i as text)
   set text item delimiters to ""
  on error
   set text item delimiters to ""
  end try
  
  set origFilepath to quoted form of POSIX path of (i as alias)
  set newFileName to "" &amp;amp; (characters 1 thru -5 of file_name as string) &amp;amp; ".m4v"
  set newFilepath to "/Users/me/mp4/" &amp;amp; newFileName &amp;amp; ""
  

  --apple uses colons as delimiters while the  Untitled=drive; Users=directory; me=username; mp4=temp directory..
  set finalPath to ("Untitled:Users:me:mp4:" &amp;amp; newFileName)
  
  
  --start the conversion; shell command uses the forward slash as the delimiter; hence two finalpath defined.
  set shellCommand to "nice /Applications/HandBrakeCLI -i " &amp;amp; origFilepath &amp;amp; " -o " &amp;amp; newFilepath &amp;amp; " --preset=\"AppleTV 2\";"
  do shell script shellCommand
  
  --I've told itunes to copy files on import; this way I don't have m4v's laying all over the place
  tell application "iTunes"
   add finalPath
  end tell
  
  --after the import is done I delete the m4v file I just created (from the temp directory)
  tell application "Finder"
   delete finalPath
  end tell
  
 end repeat
 
 return input
end run
&lt;/pre&gt;
&lt;br /&gt;
Basically to use this you create a new automator "Folder Action" using an "Apple Script"  paste this entire thing into the script (replacing anything apple puts there by default).  Then pick the folder you want to watch.  I noticed that the task usually fires off about 10 seconds after an .avi file shows up in the directory.&lt;br /&gt;
&lt;br /&gt;
This still needs something to confirm the file that just plopped into the watch directory is an actual .avi file. &amp;nbsp;I didn't worry about that though it is probably &amp;nbsp;not too hard to add that check (though with apple script and its' crazy syntax I wouldn't bet on it).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10753561-2597278994803871217?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RX_91b4tgQSrRhgZZhlQa4bf9BY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RX_91b4tgQSrRhgZZhlQa4bf9BY/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/RX_91b4tgQSrRhgZZhlQa4bf9BY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RX_91b4tgQSrRhgZZhlQa4bf9BY/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/strsU82OOC8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/2597278994803871217/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=2597278994803871217" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2597278994803871217?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/2597278994803871217?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/strsU82OOC8/automatically-convert-avi-to-m4v-and.html" title="Automatically convert .avi to .m4v and add to iTunes using Automator" /><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/02/automatically-convert-avi-to-m4v-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMMQHcyeCp7ImA9WhRbFkk.&quot;"><id>tag:blogger.com,1999:blog-10753561.post-8031778929063746359</id><published>2012-02-07T16:01:00.001-05:00</published><updated>2012-02-07T16:01:21.990-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T16:01:21.990-05:00</app:edited><title>2 Months of Mac : The Good and the Bad</title><content type="html">I started using a mac two months ago after over twenty years of windows use. &amp;nbsp; However, rather than reiterate my opinion on both of my blogs (personal and technical) I've posted the full story over on my personal blog and I'm just putting a link to it here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://blog.rawlinson.us/two-months-with-a-mac-the-good-and-the-bad"&gt;http://blog.rawlinson.us/two-months-with-a-mac-the-good-and-the-bad&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I don't like cross linking like this but I hope you'll understand that this is a topic that might be interesting to both my technical friends/followers and my non-technical friends/family. &amp;nbsp;I hope you'll click through and read it and, maybe even comment with some helpful tips and tricks.&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-8031778929063746359?l=code.rawlinson.us' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9NYC61as20vhtxJs0KY-9O2B3tU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9NYC61as20vhtxJs0KY-9O2B3tU/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/9NYC61as20vhtxJs0KY-9O2B3tU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9NYC61as20vhtxJs0KY-9O2B3tU/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/ydUz1YNCtqQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://code.rawlinson.us/feeds/8031778929063746359/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=10753561&amp;postID=8031778929063746359" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8031778929063746359?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/10753561/posts/default/8031778929063746359?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/InTheTrenches/~3/ydUz1YNCtqQ/2-months-of-mac-good-and-bad.html" title="2 Months of Mac : The Good and the Bad" /><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/02/2-months-of-mac-good-and-bad.html</feedburner:origLink></entry><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="1 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>1</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></feed>

