<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6588557980575031843</id><updated>2012-02-16T19:59:04.044-08:00</updated><category term='scala ant'/><category term='java'/><category term='rails django activerecord'/><title type='text'>Coding Notes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-2557695007778304551</id><published>2012-01-24T10:30:00.001-08:00</published><updated>2012-01-24T10:30:39.186-08:00</updated><title type='text'>qgit</title><content type='html'>Trying out qgit&amp;nbsp;&lt;a href="http://sourceforge.net/projects/qgit/"&gt;http://sourceforge.net/projects/qgit/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-2557695007778304551?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/2557695007778304551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=2557695007778304551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2557695007778304551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2557695007778304551'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2012/01/qgit.html' title='qgit'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-4393355131369064925</id><published>2011-12-21T14:04:00.001-08:00</published><updated>2011-12-21T14:04:41.625-08:00</updated><title type='text'>bash key bindings</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bind -V&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bind -P&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gnu.org/software/bash/manual/bashref.html#Bindable-Readline-Commands"&gt;http://www.gnu.org/software/bash/manual/bashref.html#Bindable-Readline-Commands&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-4393355131369064925?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/4393355131369064925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=4393355131369064925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4393355131369064925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4393355131369064925'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/12/bash-key-bindings.html' title='bash key bindings'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-6041603898674215</id><published>2011-11-07T13:56:00.000-08:00</published><updated>2011-11-07T13:56:08.520-08:00</updated><title type='text'>Rails and execjs</title><content type='html'>&lt;pre&gt;&lt;br /&gt;rake aborted!&lt;br /&gt;Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add these 2 lines to the Gemfile in the rails 3.1 project root:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;gem 'execjs'&lt;br /&gt;gem 'therubyracer'&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-6041603898674215?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/6041603898674215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=6041603898674215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6041603898674215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6041603898674215'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/11/rails-and-execjs.html' title='Rails and execjs'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-5157729387382267698</id><published>2011-10-25T13:38:00.000-07:00</published><updated>2011-10-25T13:38:01.329-07:00</updated><title type='text'>Scala self-type annotations</title><content type='html'>&lt;pre&gt;&lt;br /&gt;trait A {&lt;br /&gt;  this: B =&gt;&lt;br /&gt;&lt;br /&gt;  val x: Int&lt;br /&gt;&lt;br /&gt;  def a() = {&lt;br /&gt;    println("A.a")&lt;br /&gt;    println(x)&lt;br /&gt;    println(y)&lt;br /&gt;    println()&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;trait B {&lt;br /&gt;  this: A =&gt;&lt;br /&gt;&lt;br /&gt;  val y: Int&lt;br /&gt;&lt;br /&gt;  def b() = {&lt;br /&gt;    println("B.b")&lt;br /&gt;    println(y)&lt;br /&gt;    println(x)&lt;br /&gt;    println()&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;object AB extends A with B {&lt;br /&gt;  val x = 123&lt;br /&gt;  val y = 456&lt;br /&gt;&lt;br /&gt;  def run() = {&lt;br /&gt;    a()&lt;br /&gt;    b()&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;AB.run()&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-5157729387382267698?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/5157729387382267698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=5157729387382267698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/5157729387382267698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/5157729387382267698'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/10/scala-self-type-annotations.html' title='Scala self-type annotations'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-4165823569398271106</id><published>2011-10-17T17:16:00.000-07:00</published><updated>2011-10-17T17:16:56.942-07:00</updated><title type='text'>Fixing M-x in emacs</title><content type='html'>Put this in $HOME/.Xmodmap&lt;pre&gt;&lt;br /&gt;keycode 133 = Alt_L&lt;br /&gt;clear mod1&lt;br /&gt;clear mod4&lt;br /&gt;add mod1 = Alt_L&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-4165823569398271106?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/4165823569398271106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=4165823569398271106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4165823569398271106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4165823569398271106'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/10/fixing-m-x-in-emacs.html' title='Fixing M-x in emacs'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-3574265181345517249</id><published>2011-09-30T14:49:00.001-07:00</published><updated>2011-09-30T14:49:22.518-07:00</updated><title type='text'>Scala REPL: Full Stack Trace</title><content type='html'>lastException.printStackTrace&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-3574265181345517249?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/3574265181345517249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=3574265181345517249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/3574265181345517249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/3574265181345517249'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/09/scala-repl-full-stack-trace.html' title='Scala REPL: Full Stack Trace'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-7892218125574225195</id><published>2011-06-14T17:51:00.000-07:00</published><updated>2011-06-14T17:53:46.867-07:00</updated><title type='text'>Oracle XML literals with ampersands</title><content type='html'>&lt;pre&gt;&lt;br /&gt;SQL&amp;gt; set scan off;&lt;br /&gt;SQL&amp;gt; select xmltype('&amp;lt;a&amp;gt;Hello&amp;amp;amp;World&amp;lt;/a&amp;gt;') from sys.dual;&lt;br /&gt;&lt;br /&gt;XMLTYPE('&amp;lt;A&amp;gt;HELLO&amp;AMP;WORLD&amp;lt;/A&amp;gt;')&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&amp;lt;a&amp;gt;Hello&amp;amp;World&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-7892218125574225195?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/7892218125574225195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=7892218125574225195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7892218125574225195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7892218125574225195'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/06/oracle-xml-literals-with-ampersands.html' title='Oracle XML literals with ampersands'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-4025152893743522979</id><published>2011-03-08T16:17:00.000-08:00</published><updated>2011-03-08T16:29:40.908-08:00</updated><title type='text'>Eclipse plugins for unit testing</title><content type='html'>&lt;a href="http://infinitest.github.com/"&gt;Infinitest&lt;/a&gt; + &lt;a href="http://moreunit.sourceforge.net/"&gt;MoreUnit&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-4025152893743522979?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/4025152893743522979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=4025152893743522979' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4025152893743522979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4025152893743522979'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/03/eclipse-plugins-for-unit-testing.html' title='Eclipse plugins for unit testing'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-319436803725048282</id><published>2011-01-26T00:48:00.000-08:00</published><updated>2011-01-26T01:04:18.443-08:00</updated><title type='text'>rspec with rails</title><content type='html'>With old versions of rails, such as 2.3, we install rspec the old way:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo gem install rspec-rails -v 1.3.3&lt;br /&gt;script/generate rspec&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-319436803725048282?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/319436803725048282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=319436803725048282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/319436803725048282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/319436803725048282'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2011/01/rspec-with-rails.html' title='rspec with rails'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-1645359809652904198</id><published>2010-11-10T10:57:00.000-08:00</published><updated>2010-11-10T11:01:10.012-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scala ant'/><title type='text'>scaladoc via ant</title><content type='html'>The scaladoc ant task documentation &lt;a href="http://www.scala-lang.org/node/98"&gt;on the Scala site&lt;/a&gt; is out of date. Instead, try the command-line arguments &lt;a href="http://www.scala-lang.org/docu/files/tools/scaladoc.html"&gt;from the man page&lt;/a&gt; without the hyphens.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;scaladoc destdir="doc" sourcepath="${src}"&lt;br /&gt;          doctitle="Hello Browser"&lt;br /&gt;          docsourceurl="http://..."&gt;&lt;br /&gt;  &amp;lt;src path="${src}"/&gt;&lt;br /&gt;  &amp;lt;include name="**/*.scala"/&gt;&lt;br /&gt;  &amp;lt;include name="**/*.java"/&gt;&lt;br /&gt;&amp;lt;/scaladoc&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-1645359809652904198?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/1645359809652904198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=1645359809652904198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1645359809652904198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1645359809652904198'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2010/11/scaladoc-via-ant.html' title='scaladoc via ant'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-587264474986607647</id><published>2010-10-20T13:51:00.000-07:00</published><updated>2010-10-20T13:55:20.331-07:00</updated><title type='text'>Apply a vararg function to a list in Scala</title><content type='html'>If you have a function "f" which takes a variable number of arguments, and you want to call it with the values in some list variable "values" you can do this in Lisp using the "apply" function:&lt;br /&gt;&lt;pre&gt;(apply f values)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you want to do this is Scala, you just call the function and cast the values to the varargs type:&lt;br /&gt;&lt;pre&gt;val values = List(1, 2, 3)&lt;br /&gt;f(values : _*)&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-587264474986607647?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/587264474986607647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=587264474986607647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/587264474986607647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/587264474986607647'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2010/10/apply-vararg-function-to-list-in-scala.html' title='Apply a vararg function to a list in Scala'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-8845380024680734650</id><published>2010-10-18T13:07:00.000-07:00</published><updated>2010-10-18T13:13:37.783-07:00</updated><title type='text'>Scala, Lift, SBT woe</title><content type='html'>I'm loving Scala, but somehow &lt;a href="http://code.google.com/p/simple-build-tool/"&gt;sbt&lt;/a&gt; got into a weird state. I'd tell it to create a project using Scala 2.8.0 and it would complain that it could not download Scala 2.7.7.&lt;br /&gt;&lt;br /&gt;Apparently it somehow got into a confused state where it was trying to find the files locally. The solution: remove the .m2 and .ivy2 directories in my home directory.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;% sbt update&lt;br /&gt;Project does not exist, create new project? (y/N/s) y&lt;br /&gt;Name: Something&lt;br /&gt;Organization: Harold&lt;br /&gt;Version [1.0]:&lt;br /&gt;Scala version [2.7.7]: 2.8.0&lt;br /&gt;sbt version [0.7.4]:&lt;br /&gt;Getting Scala 2.7.7 ...&lt;br /&gt;&lt;br /&gt;:: problems summary ::&lt;br /&gt;:::: WARNINGS&lt;br /&gt;    [NOT FOUND  ] org.scala-lang#scala-compiler;2.7.7!scala-compiler.jar (3ms)&lt;br /&gt;&lt;br /&gt;  ==== Maven2 Local: tried&lt;br /&gt;&lt;br /&gt;    file:///Users/harold1/.m2/repository/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Apparently sbt needs to get Scala 2.7.7 first, and then it goes on to install 2.8.0.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-8845380024680734650?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/8845380024680734650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=8845380024680734650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/8845380024680734650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/8845380024680734650'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2010/10/scala-lift-sbt-woe.html' title='Scala, Lift, SBT woe'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-1934817343206892915</id><published>2010-10-08T15:00:00.000-07:00</published><updated>2010-10-08T15:03:27.024-07:00</updated><title type='text'>Git: put a copy of a repository on a remote server using ssh</title><content type='html'>Making a server copy of a repository using git and ssh:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ssh server&lt;br /&gt;mkdir repo.git&lt;br /&gt;cd repo.git&lt;br /&gt;git init --bare # Must do a bare init to receive the repo&lt;br /&gt;exit&lt;br /&gt;&lt;br /&gt;git remote add server ssh://server/home/harold/repo.git&lt;br /&gt;git push server master&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now you can push and pull using the remote server alias instead of the full ssh URL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-1934817343206892915?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/1934817343206892915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=1934817343206892915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1934817343206892915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1934817343206892915'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2010/10/git-put-copy-of-repository-on-remote.html' title='Git: put a copy of a repository on a remote server using ssh'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-8671224075452374750</id><published>2010-02-11T15:47:00.000-08:00</published><updated>2010-02-11T15:56:02.983-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails django activerecord'/><title type='text'>Django vs Rails</title><content type='html'>Django has better documentation, but...&lt;br /&gt;&lt;br /&gt;I like that Rails isn't monolithic, the way Django is. With Rails I can use gem to install just ActiveRecord and use that in random scripts to save objects in a database. To use Django, I need to install the whole platform and set some environment variables before I can do that.&lt;br /&gt;&lt;br /&gt;The Rails approach would be good for a class: you can introduce ActiveRecord alone and cover it thoroughly before discussing anything about server-side web application architecture.&lt;br /&gt;&lt;br /&gt;If you come from the top-down school of thought, ActiveRecord should probably be learned before file I/O or SQL. It's higher-level and easier to use, and newbies should probably start by coding to ActiveRecord rather than trying to manage their own CSV or XML data files (or worse, custom packed binary data structures). And with SQLite, you don't need to know about database servers - it's just a file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-8671224075452374750?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/8671224075452374750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=8671224075452374750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/8671224075452374750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/8671224075452374750'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2010/02/django-vs-rails.html' title='Django vs Rails'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-2535397310093261676</id><published>2009-11-20T16:11:00.000-08:00</published><updated>2009-11-20T16:13:12.101-08:00</updated><title type='text'>Ruby's yield is unusual</title><content type='html'>&lt;a href="http://langexplr.blogspot.com/2007/09/rubys-yield-statement.html"&gt;yield in Ruby calls an implicit block parameter keeping the current function on the stack&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-2535397310093261676?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/2535397310093261676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=2535397310093261676' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2535397310093261676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2535397310093261676'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/11/rubys-yield-is-unusual.html' title='Ruby&apos;s yield is unusual'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-6361468075060261384</id><published>2009-11-04T15:18:00.000-08:00</published><updated>2009-11-04T15:19:37.033-08:00</updated><title type='text'>curl : allow cached</title><content type='html'>Was just testing curl to see the performance difference of mod_disk_cache, but curl inserts Pragma: no-cache by default. The solution:&lt;br /&gt;&lt;br /&gt;curl -H Pragma: -v ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-6361468075060261384?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/6361468075060261384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=6361468075060261384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6361468075060261384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6361468075060261384'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/11/curl-allow-cached.html' title='curl : allow cached'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-4323884287552372820</id><published>2009-10-30T00:18:00.001-07:00</published><updated>2009-10-30T00:19:40.653-07:00</updated><title type='text'>jUnit execution via ant</title><content type='html'>Run in server mode for finer grained multithreading:&lt;br /&gt;&lt;br /&gt;&amp;lt;jvmarg value="-server"/&gt;&lt;br /&gt;&lt;br /&gt;Make sure the assert keyword throws on failure:&lt;br /&gt;&lt;br /&gt;&amp;lt;assertions&gt;&amp;lt;enable/&gt;&amp;lt;/assertions&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-4323884287552372820?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/4323884287552372820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=4323884287552372820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4323884287552372820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4323884287552372820'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/10/junit-execution-via-ant.html' title='jUnit execution via ant'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-7115887374196832193</id><published>2009-10-29T12:56:00.001-07:00</published><updated>2009-10-29T12:56:55.567-07:00</updated><title type='text'>ThreadLocal and Tomcat</title><content type='html'>Since Tomcat doesn't kill and restart the worker threads when a webapp is redeployed (ouch - that'd hurt), ThreadLocals leak because they're tied to the Class object (in turn tied to the WebappClassLoader).&lt;br /&gt;&lt;br /&gt;So you need to avoid ThreadLocal or use a ServletContextListener to null out ThreadLocals on redeploy to avoid a memory leak. Yuck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-7115887374196832193?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/7115887374196832193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=7115887374196832193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7115887374196832193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7115887374196832193'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/10/threadlocal-and-tomcat.html' title='ThreadLocal and Tomcat'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-968140355012162184</id><published>2009-10-08T17:23:00.001-07:00</published><updated>2009-10-08T17:23:11.057-07:00</updated><title type='text'>ANTLR for Unicode support</title><content type='html'>options {&lt;br /&gt;&amp;amp;nbsp;charVocabulary = '\u0000'..'\uFFFE';&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-968140355012162184?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/968140355012162184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=968140355012162184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/968140355012162184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/968140355012162184'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/10/antlr-for-unicode-support.html' title='ANTLR for Unicode support'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-1662905122730924123</id><published>2009-09-10T13:49:00.001-07:00</published><updated>2009-09-10T13:49:51.325-07:00</updated><title type='text'>Eclipse bookmarks</title><content type='html'>http://etc.to/eclipse_bookmarks_plugin&amp;lt;br class="khtml-block-placeholder"&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-1662905122730924123?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/1662905122730924123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=1662905122730924123' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1662905122730924123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1662905122730924123'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/09/eclipse-bookmarks.html' title='Eclipse bookmarks'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-2885988757555716614</id><published>2009-09-03T13:52:00.001-07:00</published><updated>2009-09-03T13:52:28.661-07:00</updated><title type='text'>Beginner's tools</title><content type='html'>IDE: Eclipse, vim, emacs&amp;lt;br&amp;gt;&lt;br /&gt;&lt;br /&gt;Build tool: make, ant/rake/etc.&lt;br /&gt;&lt;br /&gt;Version control: SVN, git&lt;br /&gt;&lt;br /&gt;Network capture: Wireshark, tcpdump&lt;br /&gt;&lt;br /&gt;In-browser developer tools: Firebug, Safari, Yslow&lt;br /&gt;&lt;br /&gt;Database: sqlite, MySQL, Derby&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-2885988757555716614?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/2885988757555716614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=2885988757555716614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2885988757555716614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2885988757555716614'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/09/beginner-tools.html' title='Beginner&amp;#39;s tools'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-1992869841177648007</id><published>2009-06-09T16:35:00.001-07:00</published><updated>2009-06-09T16:35:43.875-07:00</updated><title type='text'>OSGi implementation: Equinox</title><content type='html'>http://www.eclipse.org/equinox/documents/quickstart.php&lt;br class="khtml-block-placeholder"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-1992869841177648007?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/1992869841177648007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=1992869841177648007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1992869841177648007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1992869841177648007'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/06/osgi-implementation-equinox.html' title='OSGi implementation: Equinox'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-7947572886031705935</id><published>2009-05-19T15:56:00.001-07:00</published><updated>2009-05-19T15:56:24.925-07:00</updated><title type='text'>rlwrap</title><content type='html'>use rlwrap to add readline support to anything.&lt;br /&gt;&lt;br /&gt;fink install rlwrap&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-7947572886031705935?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/7947572886031705935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=7947572886031705935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7947572886031705935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7947572886031705935'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/05/rlwrap.html' title='rlwrap'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-450947230641745933</id><published>2009-05-19T12:27:00.001-07:00</published><updated>2009-05-19T12:27:36.138-07:00</updated><title type='text'>pid listening on port</title><content type='html'>lsof -i :8080&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-450947230641745933?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/450947230641745933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=450947230641745933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/450947230641745933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/450947230641745933'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/05/pid-listening-on-port.html' title='pid listening on port'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-3018356872039048726</id><published>2009-04-24T14:29:00.001-07:00</published><updated>2009-04-24T14:29:39.183-07:00</updated><title type='text'>htaccess to set Content-Type</title><content type='html'>AddType 'application/xml; charset=UTF-8' xhtml&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-3018356872039048726?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/3018356872039048726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=3018356872039048726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/3018356872039048726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/3018356872039048726'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/04/htaccess-to-set-content-type.html' title='htaccess to set Content-Type'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-4460112869433238270</id><published>2009-04-20T20:24:00.001-07:00</published><updated>2009-04-20T20:24:51.449-07:00</updated><title type='text'>httpd.conf on OS X</title><content type='html'>/private/etc/apache2/httpd.conf&lt;br class="khtml-block-placeholder"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-4460112869433238270?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/4460112869433238270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=4460112869433238270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4460112869433238270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4460112869433238270'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/04/httpdconf-on-os-x.html' title='httpd.conf on OS X'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-1639693800253782120</id><published>2009-04-20T13:11:00.001-07:00</published><updated>2009-04-20T13:11:43.989-07:00</updated><title type='text'>Eclipse JDOM Detail Formatter</title><content type='html'>java.io.ByteArrayOutputStream os =&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;&lt;span style="color: #7f0055"&gt;new&lt;/span&gt; java.io.ByteArrayOutputStream();&lt;br /&gt;&lt;br /&gt;org.jdom.output.XMLOutputter outputter =&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;&lt;span style="color: #7f0055"&gt;new&lt;/span&gt; org.jdom.output.XMLOutputter(&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;org.jdom.output.Format.getPrettyFormat());&lt;br /&gt;&lt;br /&gt;outputter.output(content, os);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #7f0055"&gt;return&lt;/span&gt; &lt;span style="color: #7f0055"&gt;new&lt;/span&gt; String(os.toByteArray());&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-1639693800253782120?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/1639693800253782120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=1639693800253782120' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1639693800253782120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1639693800253782120'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/04/eclipse-jdom-detail-formatter.html' title='Eclipse JDOM Detail Formatter'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-4933299918924377851</id><published>2009-03-18T13:46:00.000-07:00</published><updated>2009-03-18T15:33:56.471-07:00</updated><title type='text'>Have Eclipse auto-transfer files via ssh/scp</title><content type='html'>Eclipse includes the optional Ant library and its dependancies for making scp transfers. So add an Ant builder and send files after a manual build. Sample build.xml:&lt;br /&gt;&lt;br /&gt;&amp;lt;project name="jschtest" default="test" basedir="."&gt;&lt;br /&gt;    &amp;lt;target name="test"&gt;&lt;br /&gt;        &amp;lt;scp localfile="build.xml"&lt;br /&gt;             todir="userid@host:from-ant"&lt;br /&gt;             keyfile="/home/userid/.ssh/id_dsa"&lt;br /&gt;             passphrase=""/&gt;&lt;br /&gt;    &amp;lt;/target&gt;&lt;br /&gt;&amp;lt;/project&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-4933299918924377851?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/4933299918924377851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=4933299918924377851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4933299918924377851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4933299918924377851'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/03/have-eclipse-auto-transfer-files-via.html' title='Have Eclipse auto-transfer files via ssh/scp'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-8129801333588579039</id><published>2009-01-07T10:27:00.001-08:00</published><updated>2009-01-07T10:27:12.491-08:00</updated><title type='text'>Sybase setuser
</title><content type='html'>Like su!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-8129801333588579039?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/8129801333588579039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=8129801333588579039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/8129801333588579039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/8129801333588579039'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/01/sybase-setuser.html' title='Sybase setuser&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-6763257848069467855</id><published>2009-01-07T09:51:00.001-08:00</published><updated>2009-01-07T09:51:35.253-08:00</updated><title type='text'>JS debug in Safari
</title><content type='html'>http://blog.jagregory.com/2006/05/15/javascript-console-in-safari/&lt;br class="khtml-block-placeholder"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-6763257848069467855?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/6763257848069467855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=6763257848069467855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6763257848069467855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6763257848069467855'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/01/js-debug-in-safari.html' title='JS debug in Safari&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-5657495289553111856</id><published>2009-01-03T22:19:00.001-08:00</published><updated>2009-01-03T22:21:11.165-08:00</updated><title type='text'>DB2 on Mac OS X</title><content type='html'>IBM DB2 Express-C is now available for Mac OS X, but you have to increase the shmmax/shmall kernel parameters. You can try interactively like so (these values of 256MB and 100MB worked for me where 200 and 100 saw db2start fail):&lt;br /&gt;&lt;br /&gt;sudo sysctl -w kern.sysv.shmmax=268435456&lt;br /&gt;&lt;br /&gt;sudo sysctl -w kern.sysv.shmall=131072000&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;then you add it to (probably creating) /etc/sysctl.conf to survive reboots.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-5657495289553111856?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/5657495289553111856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=5657495289553111856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/5657495289553111856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/5657495289553111856'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2009/01/db2-on-mac-os-x.html' title='DB2 on Mac OS X'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-3135288706704056074</id><published>2008-12-19T12:18:00.001-08:00</published><updated>2008-12-19T12:18:43.462-08:00</updated><title type='text'>wireshark http method filter
</title><content type='html'>http.request.method == "GET"&lt;br class="khtml-block-placeholder"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-3135288706704056074?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/3135288706704056074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=3135288706704056074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/3135288706704056074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/3135288706704056074'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/wireshark-http-method-filter.html' title='wireshark http method filter&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-4177298177291371212</id><published>2008-12-19T11:25:00.001-08:00</published><updated>2008-12-19T11:25:34.004-08:00</updated><title type='text'>Sun's HttpClient and Tomcat's WebappClassLoader leak 
</title><content type='html'>Running Tomcat servlets that use the JDK's built-in HTTP client (think URL.openConnection("http://...")), it seems to leak memory when the context / webapp is redeployed. Looking closer with jmap and Eclipse MAT, it seems like the keep-alive functionality in the JDK is to blame.&lt;br /&gt;&lt;br /&gt;sun.net.www.http.HttpClient has a static KeepAliveCache member, which keeps a Thread object around (not running by the time I get to it). That Thread's context class loader is my Tomcat WebappClassLoader, so that can't get GCed. Not sure why, but this seems to cause every redeploy to leak a WebappClassLoader and eventually I get the dreaded OOM PermGen.&lt;br /&gt;&lt;br /&gt;If I use a different HTTP client and dramatically disable Sun's by setting HttpClient.kac = null, then on redeploy, the WebappClassLoader is GCed and the classes are unloaded (freeing the PermGen space) *most* of the time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-4177298177291371212?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/4177298177291371212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=4177298177291371212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4177298177291371212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/4177298177291371212'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/sun-httpclient-and-tomcat.html' title='Sun&amp;#39;s HttpClient and Tomcat&amp;#39;s WebappClassLoader leak &#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-6633587257058440871</id><published>2008-12-15T13:47:00.001-08:00</published><updated>2008-12-15T13:49:19.307-08:00</updated><title type='text'>Tomcat sessions</title><content type='html'>&amp;lt;session-config&gt;&lt;br /&gt;  &amp;lt;session-timeout&gt;&lt;br /&gt;    60 &amp;lt;!-- minutes --&gt;&lt;br /&gt;  &amp;lt;/session-timeout&gt;&lt;br /&gt;&amp;lt;/session-config&gt;&lt;br /&gt;&lt;br /&gt;goes in web.xml, at the bottom of the web-app.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-6633587257058440871?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/6633587257058440871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=6633587257058440871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6633587257058440871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6633587257058440871'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/tomcat-sessions.html' title='Tomcat sessions'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-7514822655297195225</id><published>2008-12-15T13:02:00.001-08:00</published><updated>2008-12-15T13:02:29.373-08:00</updated><title type='text'>Enable jconsole
</title><content type='html'>-Dcom.sun.management.jmxremote&lt;br class="khtml-block-placeholder"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-7514822655297195225?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/7514822655297195225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=7514822655297195225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7514822655297195225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7514822655297195225'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/enable-jconsole.html' title='Enable jconsole&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-2105071548170797172</id><published>2008-12-10T15:58:00.001-08:00</published><updated>2008-12-10T15:58:04.534-08:00</updated><title type='text'>Java array copying
</title><content type='html'>System.arraycopy should've been added to Arrays ... sigh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-2105071548170797172?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/2105071548170797172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=2105071548170797172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2105071548170797172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/2105071548170797172'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/java-array-copying.html' title='Java array copying&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-262390232317941062</id><published>2008-12-10T15:57:00.001-08:00</published><updated>2008-12-10T15:57:05.531-08:00</updated><title type='text'>DTD to Relax NG compact
</title><content type='html'>fink install trang&lt;br /&gt;trang -I dtd -O rnc file.dtd file.rnc&lt;br /&gt;# Yay!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-262390232317941062?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/262390232317941062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=262390232317941062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/262390232317941062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/262390232317941062'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/dtd-to-relax-ng-compact.html' title='DTD to Relax NG compact&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-1202837275104471627</id><published>2008-12-09T12:35:00.001-08:00</published><updated>2008-12-09T12:35:28.663-08:00</updated><title type='text'>Syntactic Macros
</title><content type='html'>Java's generics and assert show how helpful Common Lisp's features are - you could add them yourself.&lt;br /&gt;&lt;br /&gt;A co-worker gave up on Java's assert because it is too awkward to enable, opting to use throw new AssertionError instead. But if syntactic macros were available, we could fix assert ourselves.&lt;br /&gt;&lt;br /&gt;At the same time, C shows how to do it badly: text manipulation instead of parse tree transforms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-1202837275104471627?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/1202837275104471627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=1202837275104471627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1202837275104471627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1202837275104471627'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/syntactic-macros.html' title='Syntactic Macros&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-6200090691047479776</id><published>2008-12-09T12:21:00.001-08:00</published><updated>2008-12-09T12:21:39.385-08:00</updated><title type='text'>Inheritance, Delegates, AOP
</title><content type='html'>Heavy delegate pattern in the Objective-C Cocoa libraries provides a better alternative to inheritance in many scenarios. For example, delegates can provide a way to add a mix-in feature to a class without multiple inheritance (logging, security check, caching, proxying, and on and on). Simple inheritance doesn't work if you want a way to cleanly add a mix-in to various subclasses of an interface/ABC where, as with factories. Every time I do this, though, it feels like I'm writing the code that an AOP tool should be generating for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-6200090691047479776?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/6200090691047479776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=6200090691047479776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6200090691047479776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6200090691047479776'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/12/inheritance-delegates-aop.html' title='Inheritance, Delegates, AOP&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-467866773683278489</id><published>2008-11-12T13:41:00.001-08:00</published><updated>2008-11-12T13:41:21.286-08:00</updated><title type='text'>Emacs Relax NG validation
</title><content type='html'>nxml-mode uses rnc files to validate and complete contents. To see which grammar is being used for the current buffer, C-c C-s C-w (rng-what-schema).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-467866773683278489?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/467866773683278489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=467866773683278489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/467866773683278489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/467866773683278489'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/11/emacs-relax-ng-validation.html' title='Emacs Relax NG validation&#xA;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-7314110391962450838</id><published>2008-11-12T11:40:00.000-08:00</published><updated>2010-02-10T13:03:20.904-08:00</updated><title type='text'>XPath 2 has "let"</title><content type='html'>XPath 2 actually has the functional programming favorite "let" hidden in the "for" syntax. "for" iterates across a sequence, but in XPath, a single value is also a sequence allowing you to use it for "let", e.g.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;for $name in 'Bob' return $name&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-7314110391962450838?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/7314110391962450838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=7314110391962450838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7314110391962450838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/7314110391962450838'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/11/xpath-2-has-let.html' title='XPath 2 has &quot;let&quot;'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-993076684997007881</id><published>2008-10-15T10:45:00.000-07:00</published><updated>2008-10-15T10:46:58.918-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Tomcat and symlinks</title><content type='html'>Couldn't figure out why my servlets weren't getting hit - set a breakpoint in doGet and everything. Turns out that Tomcat ignores symlinks to be more secure unless you put allowLinking="true" in your context XML config file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-993076684997007881?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/993076684997007881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=993076684997007881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/993076684997007881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/993076684997007881'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/10/tomcat-and-symlinks.html' title='Tomcat and symlinks'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-426828819786764547</id><published>2008-10-15T10:42:00.000-07:00</published><updated>2008-10-15T10:45:05.733-07:00</updated><title type='text'>OpenVPN 192.168.45.1 problem solved</title><content type='html'>After building openvpn for OS X using &lt;a href="http://girasoli.org/?p=30"&gt;these great instructions&lt;/a&gt;, it seemed to start up fine. Everything for the VPN'd IP addresses was routed to 192.168.45.1 ... but there was nothing there! Turns out, if the server wants LZO compression, you have to use it too. So after rebuilding with the LZO library and turning on lzo in the config file, it works. Yay.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-426828819786764547?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/426828819786764547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=426828819786764547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/426828819786764547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/426828819786764547'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/10/openvpn-192168451-problem-solved.html' title='OpenVPN 192.168.45.1 problem solved'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-1486609026578245133</id><published>2008-09-30T15:49:00.000-07:00</published><updated>2008-09-30T16:00:01.395-07:00</updated><title type='text'>Apache docs</title><content type='html'>For JDOM and Log4j I haven't been happy with the docs I find, but the source has helped immensely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-1486609026578245133?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/1486609026578245133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=1486609026578245133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1486609026578245133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/1486609026578245133'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/09/apache-docs.html' title='Apache docs'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6588557980575031843.post-6109959084029966558</id><published>2008-09-18T13:35:00.000-07:00</published><updated>2008-09-18T13:37:30.719-07:00</updated><title type='text'>No chunking XML-RPC</title><content type='html'>Apparently XML-RPC doesn't support chunked transfers (&lt;a href="http://www.xmlrpc.com/spec"&gt;http://www.xmlrpc.com/spec&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6588557980575031843-6109959084029966558?l=short-coding-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://short-coding-notes.blogspot.com/feeds/6109959084029966558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6588557980575031843&amp;postID=6109959084029966558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6109959084029966558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6588557980575031843/posts/default/6109959084029966558'/><link rel='alternate' type='text/html' href='http://short-coding-notes.blogspot.com/2008/09/no-chunking-xml-rpc.html' title='No chunking XML-RPC'/><author><name>Harold L.</name><uri>http://www.blogger.com/profile/10328521031282332994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
