I hereby claim:
- I am kevindb on github.
- I am kevinmorris (https://keybase.io/kevinmorris) on keybase.
- I have a public key whose fingerprint is 96E4 7994 CC82 38DB 8D67 050A F496 D958 F98A E40C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/* --------------------------------------------------------------------------------------- ---- | |
Blog Entry: | |
Handling Remote API Errors With Application.cfc's OnError() Event Method | |
Author: | |
Ben Nadel / Kinky Solutions | |
Link: | |
http://www.bennadel.com/index.cfm?event=blog.view&id=1567 |
public string function getGuid(){ | |
return insert("-", createUUID(),23); | |
} | |
public boolean function getIsGuid( | |
required string guid | |
){ | |
return isValid("regex", arguments.guid,"^[a-fA-F\d]{8}-([a-fA-F\d]{4}-){3}[a-fA-F\d]{12}$"); | |
} |
public string function arrayStructKeyToList( | |
required array arr, | |
required string key | |
){ | |
local.response = ""; | |
if(len(arguments.key) gt 0){ | |
for(local.elem in arguments.arr){ | |
if(structKeyExists(local.elem, arguments.key)){ |
(function( $ ) { | |
// Plugin definition | |
$.fn.ajaxSelect = function(settings) { | |
// Extend this object from Deferred, allowing for promises | |
var defer = $.extend(this, $.Deferred()); | |
// Extend our default options with those provided. | |
// Note that the first argument to extend is an empty | |
// object – this is to keep from overriding our "defaults" object |
/** | |
* @hint Returns reasonable array of objects from a cfquery | |
*/ | |
public function queryToArray( | |
required query query, | |
string excludeColumns = "" | |
){ | |
if (server.coldfusion.productName == "ColdFusion Server") { | |
local.columns = arguments.query.getMetaData().getColumnLabels(); |
/** | |
* @hint Removes whitespace from HTML code | |
Originally authored by Jordan Clark ([email protected]) | |
*/ | |
public string function compressHtml( | |
required string html, | |
numeric level = 2 | |
){ | |
local.response = this.trim(arguments.html); |
SET nocount ON; | |
IF Object_id('tempdb..#SPARCEPERCENTAGE') IS NOT NULL | |
BEGIN | |
DROP TABLE #sparcepercentage | |
END; | |
IF Object_id('tempdb..#TMP') IS NOT NULL | |
BEGIN | |
DROP TABLE #tmp |
SET NOCOUNT ON; | |
DECLARE @TABLE VARCHAR(100), | |
@SQL VARCHAR(MAX); | |
SET @TABLE = ''; | |
SELECT @SQL = COALESCE(@SQL, '') | |
+ CAST( 'UPDATE ' + @TABLE + ' ' + | |
'SET [' + C.COLUMN_NAME + '] = LTRIM(RTRIM(' + C.COLUMN_NAME + ')) ' + |
SET NOCOUNT ON; | |
DECLARE @TABLE VARCHAR(100), | |
@SQL VARCHAR(MAX); | |
SET @TABLE = ''; | |
SELECT @SQL = COALESCE(@SQL, '') | |
+ CAST( 'UPDATE ' + @TABLE + ' ' + | |
'SET [' + C.COLUMN_NAME + '] = NULL ' + |