Member since 10/01/2008

Location: Belfast, United Kingdom

16 snippets

1652 profile views

5 Comment(s) Posted

View their favorites



first submission:submitting first snipplet

kouphax's Recent Snippets

« Prev 1 Next »
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.
1 415 posted 13 years ago by kouphax
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.
2 2358 posted 14 years ago by kouphax
This script will alow you to download files from a remote FTP
2 863 posted 14 years ago by kouphax
Use this command to prevent seeing ....68 more type stack trace message in Grails output.
0 342 posted 14 years ago by kouphax
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 /* POGO used in the mapping */ class BranchFax {...
0 716 posted 14 years ago by kouphax
Calculates the number of Months between 2 given dates
1 1202 posted 14 years ago by kouphax
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.
2 794 posted 14 years ago by kouphax
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
0 417 posted 14 years ago by kouphax
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. <[email protected]("##/##/####")-->
0 489 posted 14 years ago by kouphax
Constraints plugin (requires annotation plugin). This is the second draft version that has been severly refactoed both internally and externally.
0 429 posted 14 years ago by kouphax
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. An annota...
1 1281 posted 14 years ago by kouphax
remove(array) --> array Array.remove(a) simply removes all the items in the passed in array from the current scope array. Good for bulk operations.
0 482 posted 14 years ago by kouphax
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.
1 618 posted 14 years ago by kouphax
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). Currently only works with IE and FF (that's all I needed).
1 515 posted 14 years ago by kouphax
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. It uses prototype but you can replace the Prototype.Browser stuff with a...
0 698 posted 14 years ago by kouphax
The only function the Tag Cloud singleton exposes it the process() function which take 3 arguments. 1. Cloud Data - Required. Needs to have a display value property and a count property. The actual property names are configurable but by default...
0 492 posted 14 years ago by kouphax
« Prev 1 Next »