This file contains 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
CREATE OR REPLACE FUNCTION isNull(value_to_check ANYELEMENT, replacement_value ANYELEMENT) | |
RETURNS ANYELEMENT AS $$ | |
BEGIN | |
RETURN COALESCE(value_to_check, replacement_value); | |
END; | |
$$ LANGUAGE plpgsql IMMUTABLE; |
This file contains 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
<cfexecute name="aws" arguments="configure set aws_access_key_id xxx"></cfexecute> | |
<cfexecute name="aws" arguments="configure set aws_secret_access_key xxx"></cfexecute> | |
<cfexecute name="aws" arguments="configure set region us-east-1"></cfexecute> | |
<cfexecute name="aws" arguments="configure set output json"></cfexecute> |
This file contains 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
<cffunction name="createFavicon" access="public" returntype="void"> | |
<cfargument name="letter" type="string" required="true"> | |
<cfargument name="saveLocation" type="string" required="true"> | |
<!--- Set image dimensions (16x16 pixels) ---> | |
<cfset width = 16> | |
<cfset height = 16> | |
<!--- Create a buffered image with transparency ---> | |
<cfset BufferedImage = createObject("java", "java.awt.image.BufferedImage")> |
This file contains 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
<cfset sf = createobject('Java','coldfusion.server.ServiceFactory')> | |
<cfset tasks = sf.CronService.listAll()/> | |
<cfloop from="1" to="#arraylen(tasks)#" index="i"> | |
<cfset here.task = tasks[i]> | |
<cfoutput> | |
<pre> | |
<cfschedule | |
action = "update" | |
task = "#here.task.task#" |
This file contains 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
<cfparam name="attributes.src" default="0"> | |
<cfparam name="attributes.query" default="q"> | |
<cfswitch expression="#thisTag.ExecutionMode#"> | |
<cfcase value="start"> | |
<cfset inputStream = CreateObject("java", "java.io.FileInputStream").init(JavaCast("string", attributes.src )) /> | |
<cfset XSSFWorkbook = CreateObject("java", "org.apache.poi.xssf.usermodel.XSSFWorkbook").init(inputStream) /> | |
<cfset DataFormatter = CreateObject("java", "org.apache.poi.ss.usermodel.DataFormatter") /> | |
<cfset Evaluator = CreateObject("java", "org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator").init(XSSFWorkbook) /> |
This file contains 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
<cfparam name="attributes.type" default="html"> | |
<cfswitch expression="#thisTag.ExecutionMode#"> | |
<cfcase value="start"> | |
</cfcase> | |
<cfdefaultcase> | |
<!--- *************************************************** ---> | |
<!--- Basic Errors ---> | |
<!--- *************************************************** ---> |
This file contains 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
<cfcomponent displayname="USP"> | |
<!--- ********************************************************************************************** ---> | |
<!--- Hint: Before start, add correct default values for arguments currently marked with xxxxxxxxxxx ---> | |
<!--- ********************************************************************************************** ---> | |
<cffunction name = "init" access= "Public" output = "No" returntype= "Any"> | |
<!--- UPS Access Settings ---> | |
<cfargument name="License" type="string" required="No" default="xxxxxxxxxxx" hint="UPS License Key" /> | |
<cfargument name="Account" type="string" required="No" default="xxxxxxxxxxx" hint="UPS Account ID" /> |
This file contains 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
<!--- | |
<cf_WinSCP action ="listdir" | |
username ="" | |
password ="" | |
host ="" | |
name ="qryDirectory" | |
directory ="" /> | |
<cf_WinSCP action="exists" | |
username ="" |
This file contains 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
<cfset Mongo = CreateObject("java","com.mongodb.MongoClient")> | |
<cffunction name="m" returntype="any"> | |
<cfargument name="value" type="any"> | |
<cfif IsJSON(arguments.value)> | |
<cfset local.retrun = CreateObject("java","com.mongodb.util.JSON").parse(arguments.value)> | |
<cfelse> | |
<cfset local.retrun = CreateObject("java","com.mongodb.util.JSON").parse( SerializeJSON(arguments.value) )> | |
</cfif> | |
<cfreturn local.retrun> |
This file contains 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
<cfcomponent displayname ="unit" output="no"> | |
<!--- ************************************************************************************ ---> | |
<!--- Get local.tracking ---> | |
<!--- ************************************************************************************ ---> | |
<cffunction name="tracking" access="remote" returntype="any" output="no"> | |
<cfargument name="trackingID" required="yes" type="string"> | |
<cfargument name="UserID" default=""> | |
<cfargument name="Password" default=""> | |
<cfargument name="ShowDetail" default="Yes"> |
NewerOlder