This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Expression: (?:(</?[A-Za-z_]*[A-Z]+[A-Za-z_]*[>|\s]|\s(?:GREATER\sTHAN(?:\sOR\sEQUAL TO)?|LESS\sTHAN(?:\sOR\sEQUAL\sTO)?|N?EQ|[LG]TE?|AND|OR|(?:NOT\s)?EQUAL|DOES\sNOT\sCONTAIN|(?:IS\s)?NOT|IS|CONTAINS|XOR|EQV|IMP)\s)) | |
| Replace: \L$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET NOCOUNT ON; | |
| DECLARE @TABLE VARCHAR(100), | |
| @SQL VARCHAR(MAX); | |
| SET @TABLE = ''; | |
| SELECT @SQL = COALESCE(@SQL, '') | |
| + CAST( 'UPDATE ' + @TABLE + ' ' + | |
| 'SET [' + C.COLUMN_NAME + '] = NULL ' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 + ')) ' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}$"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* --------------------------------------------------------------------------------------- ---- | |
| 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 |