<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 18:11:15 +0000</lastBuildDate>
    <item>
      <title>(JavaScript) Primitive QueryString Param Extractor Plugin - kouphax</title>
      <link>https://snipplr.com/view/13571/primitive-querystring-param-extractor-plugin</link>
      <description>&lt;p&gt;Extracts a string paremeter from the url query string.  Basic operation wont handle multiples such as radio buttons etc.  Just gets the first instance of the name and returns it's value.&lt;/p&gt;</description>
      <pubDate>Mon, 30 Mar 2009 06:50:40 UTC</pubDate>
      <guid>https://snipplr.com/view/13571/primitive-querystring-param-extractor-plugin</guid>
    </item>
    <item>
      <title>(JavaScript) jQuery Tab On Return Key Press - kouphax</title>
      <link>https://snipplr.com/view/12643/jquery-tab-on-return-key-press</link>
      <description>&lt;p&gt;Simple function for turning RETURN key presses into TAB key presses.  Focuses input element next in the DOM (usually makes sense), unless we are at the end of the form, at which point it focuses the first element in the form for cyclical purposes.&lt;/p&gt;</description>
      <pubDate>Fri, 27 Feb 2009 08:54:42 UTC</pubDate>
      <guid>https://snipplr.com/view/12643/jquery-tab-on-return-key-press</guid>
    </item>
    <item>
      <title>(Groovy) Download Files from FTP (Groovy ANT Task) - kouphax</title>
      <link>https://snipplr.com/view/10625/download-files-from-ftp-groovy-ant-task</link>
      <description>&lt;p&gt;This script will alow you to download files from a remote FTP&lt;/p&gt;</description>
      <pubDate>Mon, 22 Dec 2008 03:46:46 UTC</pubDate>
      <guid>https://snipplr.com/view/10625/download-files-from-ftp-groovy-ant-task</guid>
    </item>
    <item>
      <title>(Bash) Disable Stacktrace Filtering - kouphax</title>
      <link>https://snipplr.com/view/10280/disable-stacktrace-filtering</link>
      <description>&lt;p&gt;Use this command to prevent seeing ....68 more type stack trace message in Grails output.&lt;/p&gt;</description>
      <pubDate>Fri, 05 Dec 2008 04:02:20 UTC</pubDate>
      <guid>https://snipplr.com/view/10280/disable-stacktrace-filtering</guid>
    </item>
    <item>
      <title>(Groovy) Simple ORM in Groovy - kouphax</title>
      <link>https://snipplr.com/view/10220/simple-orm-in-groovy</link>
      <description>&lt;p&gt;Using Groovy you can extend the Sql, DataSet and GroovyResultSet objects present in the language to do simple object mapping similar to iBatis et al.  An example of using the code below&#13;
&#13;
    /* POGO used in the mapping */&#13;
    class BranchFax {&#13;
      def faxCodeId, nsc, faxNumber, branchName, address1&#13;
    }&#13;
&#13;
    /* Connect to the DB */&#13;
    def db = Sql.newInstance(&#13;
        "jdbc:oracle:thin:@//10.7.1.79/DATABSE",&#13;
        "user1", "test1",&#13;
        "oracle.jdbc.driver.OracleDriver"&#13;
    )&#13;
&#13;
    /* create a dataset */&#13;
    def bf = db.dataSet("BRANCH_FAX")&#13;
&#13;
    /* now work some magic */&#13;
    def result01 = bf.firstRow().coerce(BranchFax)&#13;
    def result02 = bf.firstRow().transmogrify(BranchFax)&#13;
    def result03 = bf.transmogrify(BranchFax)&#13;
    def result04 = db.transmogrify("SELECT * FROM BRANCH_FAX", BranchFax)&lt;/p&gt;</description>
      <pubDate>Wed, 03 Dec 2008 05:02:18 UTC</pubDate>
      <guid>https://snipplr.com/view/10220/simple-orm-in-groovy</guid>
    </item>
    <item>
      <title>(Groovy) Calculate Number of Months Between 2 Dates - kouphax</title>
      <link>https://snipplr.com/view/10119/calculate-number-of-months-between-2-dates</link>
      <description>&lt;p&gt;Calculates the number of Months between 2 given dates&lt;/p&gt;</description>
      <pubDate>Fri, 28 Nov 2008 04:24:38 UTC</pubDate>
      <guid>https://snipplr.com/view/10119/calculate-number-of-months-between-2-dates</guid>
    </item>
    <item>
      <title>(JavaScript) Fit String to Width - kouphax</title>
      <link>https://snipplr.com/view/9703/fit-string-to-width</link>
      <description>&lt;p&gt;Examine a string and truncate it so that it fits into the required width based on font-size/weight etc&lt;/p&gt;</description>
      <pubDate>Thu, 13 Nov 2008 04:00:26 UTC</pubDate>
      <guid>https://snipplr.com/view/9703/fit-string-to-width</guid>
    </item>
    <item>
      <title>(JavaScript) Escape Regular Expression Characters in String - kouphax</title>
      <link>https://snipplr.com/view/9649/escape-regular-expression-characters-in-string</link>
      <description>&lt;p&gt;Escape all special regex characters (.*+?|()[]{}\) from a string.  Useful when dynamically building a Regular Expression object based on input text that could hold regex characters.&lt;/p&gt;</description>
      <pubDate>Tue, 11 Nov 2008 09:41:17 UTC</pubDate>
      <guid>https://snipplr.com/view/9649/escape-regular-expression-characters-in-string</guid>
    </item>
    <item>
      <title>(JavaScript) Auto Focus First On-Screen Element - kouphax</title>
      <link>https://snipplr.com/view/9600/auto-focus-first-onscreen-element</link>
      <description>&lt;p&gt;This code, when placed at the end of the body tag will set focus on the first visible enabled element on the screen.  It considers visibility as well as all forms on-screen&lt;/p&gt;</description>
      <pubDate>Mon, 10 Nov 2008 08:16:07 UTC</pubDate>
      <guid>https://snipplr.com/view/9600/auto-focus-first-onscreen-element</guid>
    </item>
    <item>
      <title>(JavaScript) InputMask jQuery Plugin - kouphax</title>
      <link>https://snipplr.com/view/9402/inputmask-jquery-plugin</link>
      <description>&lt;p&gt;Based on my Annotations plugin this plugin offers the ability to use Mask annotations to apply input masks over input elements on a page.  Very much BETA.  See comments for use.&#13;
&#13;
&lt;!--@Mask("##/##/####")--&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 31 Oct 2008 08:52:24 UTC</pubDate>
      <guid>https://snipplr.com/view/9402/inputmask-jquery-plugin</guid>
    </item>
    <item>
      <title>(JavaScript) Constraints jQuery Plugin - kouphax</title>
      <link>https://snipplr.com/view/9251/constraints-jquery-plugin</link>
      <description>&lt;p&gt;Constraints plugin (requires annotation plugin).&#13;
&#13;
This is the second draft version that has been severly refactoed both internally and externally.&lt;/p&gt;</description>
      <pubDate>Sat, 25 Oct 2008 13:01:48 UTC</pubDate>
      <guid>https://snipplr.com/view/9251/constraints-jquery-plugin</guid>
    </item>
    <item>
      <title>(JavaScript) Annotations jQuery Plugin - kouphax</title>
      <link>https://snipplr.com/view/9250/annotations-jquery-plugin</link>
      <description>&lt;p&gt;The annotaion framework provides access to client side comment based DOM annotations. The framework does not imply any specific usage and is essentially useless on it's own.  It merely provides another way to offer metadata for elements.&#13;
&#13;
An annotated DOM Element is any element in the DOM preceeded by one or many  comments of the form below.  NB. The payload ({...}) is optional.&lt;/p&gt;</description>
      <pubDate>Sat, 25 Oct 2008 12:52:04 UTC</pubDate>
      <guid>https://snipplr.com/view/9250/annotations-jquery-plugin</guid>
    </item>
    <item>
      <title>(JavaScript) Array Remove Function - kouphax</title>
      <link>https://snipplr.com/view/9076/array-remove-function</link>
      <description>&lt;p&gt;remove(array) --&gt; array&#13;
&#13;
Array.remove(a) simply removes all the items in the passed in array from the current scope array.  Good for bulk operations.&lt;/p&gt;</description>
      <pubDate>Fri, 17 Oct 2008 08:38:14 UTC</pubDate>
      <guid>https://snipplr.com/view/9076/array-remove-function</guid>
    </item>
    <item>
      <title>(Regular Expression) Strip Trailing Whitespace from Lines in a File - kouphax</title>
      <link>https://snipplr.com/view/8858/strip-trailing-whitespace-from-lines-in-a-file</link>
      <description>&lt;p&gt;This regular expression matches any trailing whitespace at the end of a line (whitespace and tabs).  Replace this with nothing to remove trailing whitespace from files.&lt;/p&gt;</description>
      <pubDate>Mon, 06 Oct 2008 06:13:22 UTC</pubDate>
      <guid>https://snipplr.com/view/8858/strip-trailing-whitespace-from-lines-in-a-file</guid>
    </item>
    <item>
      <title>(JavaScript) inDOMOrder jQuery Plugin - kouphax</title>
      <link>https://snipplr.com/view/8857/indomorder-jquery-plugin</link>
      <description>&lt;p&gt;jQuery Plugin for returning selected DOM Nodes in DOM order.  e.g. $('img.L,img.Y') will not be guaranteed DOM order (usually all the L's then all the Y's).&#13;
&#13;
Currently only works with IE and FF (that's all I needed).&lt;/p&gt;</description>
      <pubDate>Mon, 06 Oct 2008 05:37:07 UTC</pubDate>
      <guid>https://snipplr.com/view/8857/indomorder-jquery-plugin</guid>
    </item>
    <item>
      <title>(JavaScript) Sort Element Array by DOM Position - kouphax</title>
      <link>https://snipplr.com/view/8763/sort-element-array-by-dom-position</link>
      <description>&lt;p&gt;This function will sort an array of DOM elements in order of the DOM position.  Useful when using calls such as $$("img.L,img.M") which doesn;t return a sorted element array.&#13;
&#13;
It uses prototype but you can replace the Prototype.Browser stuff with anything else.&lt;/p&gt;</description>
      <pubDate>Thu, 02 Oct 2008 05:02:12 UTC</pubDate>
      <guid>https://snipplr.com/view/8763/sort-element-array-by-dom-position</guid>
    </item>
    <item>
      <title>(JavaScript) Javascript Tag Cloud - kouphax</title>
      <link>https://snipplr.com/view/8734/javascript-tag-cloud</link>
      <description>&lt;p&gt;The only function the Tag Cloud singleton exposes it the process() function which take 3 arguments.&#13;
&#13;
   1. Cloud Data - Required. Needs to have a display value property and a count property. The actual property names are configurable but by default looks for text and value respectivley&#13;
   2. Render Function - Required. This is the function that will render the cloud items onto the page. This is left up to the developer as this could be dramatically different each time. IT accepts 3 arguments - Display Text, Calculated Size and&#13;
   3. Optional Configuration - Object that accepts:&#13;
          * scaler - Overrides the default scaling calculation&#13;
          * unit - The default size unit eg '%' or 'px'&#13;
          * textProperty - The property on the object to get the display value&#13;
          * valueProperty - The property on the object to get the count per item&lt;/p&gt;</description>
      <pubDate>Wed, 01 Oct 2008 07:00:55 UTC</pubDate>
      <guid>https://snipplr.com/view/8734/javascript-tag-cloud</guid>
    </item>
  </channel>
</rss>
