Skip to content

Instantly share code, notes, and snippets.

Chris Weller wellercs

Block or report user

Report or block wellercs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
wellercs / javaloader-elasticsearch-ClassNotFoundException
Last active Jan 30, 2016
elastic search class not found exception using JavaLoader
View javaloader-elasticsearch-ClassNotFoundException
java.lang.ClassNotFoundException: org.elasticsearch.common.settings.ImmutableSettings at$ at$ at Method) at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at java.lang.ClassLoader.findSystemClass( at com.compoundtheory.classloader.NetworkClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at coldfusion.runtime
View cfml-REReplace-\1
REReplaceNoCase("{{cms:winter_wonderland}}", "{{cms:(\w+)}}", "#getThemeData(theme='\1')#", "all");
function getThemeData(required string theme) {
wellercs / cfml-append-vs-addAll
Created Dec 3, 2015
CFML - array append versus addAll
View cfml-append-vs-addAll
arr1 = [1];
arr2 = [2,3];
arr3 = [1];
arr4 = [2,3];
View list-with-consecutive-delimiter
// testxy gives expected results
testxy.actual_dimensions = "144xy210";
testxy.actual_dimension_width = listFirst(testxy.actual_dimensions, "x", true);
testxy.actual_dimension_height = listLast(testxy.actual_dimensions, "x", true);
// testxx does not give expected results
// expected testxx.actual_dimension_height to be x210
testxx.actual_dimensions = "144xx210";
View api-service
// inside Application.cfc is service constructor
application.EnterpriseService = new;
// inside site code somewhere, custom_args={});
// EnterpriseService.cfc
init() {
// some shared constants set here
View Twitter-cfc
<cfcomponent displayname="Twitter" output="false" hint="I provide functions for interacting with the Twitter API.">
<cfscript> = "Twitter";
variables.baseURI = "";
variables.charset = "UTF-8";
variables.version = "1.1";
<cffunction name="init" access="public" output="false" returntype="any" hint="I initialize the component">
<cfargument name="apiKey" required="false" type="string" default="" hint="I am the API key to the Twitter API that was provided to us by Twitter.">
wellercs / cf_cfqueryparamWithSQLVar
Created Nov 1, 2013
Example of declaring and setting a SQL variable with cfqueryparam since there seems to be performance issues with large data sets when using cfqueryparam in a sub-select.
View cf_cfqueryparamWithSQLVar
<cfset arguments.IsSold = 1>
<cfquery name="local.qryTraditional" datasource="cfartgallery">
, a1.FirstName
, a1.LastName
, (
SELECT TOP 1 LargeImage
WHERE IsSold = <cfqueryparam cfsqltype="cf_sql_bit" value="#arguments.IsSold#">
wellercs / Response-cfc-jquery-example
Created Apr 6, 2013
jQuery example of calling a function that consumes Response.cfc
View Response-cfc-jquery-example
<script src="//"></script>
<script type="text/javascript">
url: '/sandbox/Demo.cfc', // this can be found at
data: {
method: 'validateDemo',
fname: "John",
lname: "Doe",
email: "bademail",
wellercs / Response-cfc-example
Created Apr 6, 2013
Example of working with Response.cfc
View Response-cfc-example
<cffunction name="validateDemo" access="public" returntype="any" output="false">
<cfargument name="fname" type="string" required="true">
<cfargument name="lname" type="string" required="true">
<cfargument name="email" type="string" required="true">
<cfargument name="throwerror" type="boolean" required="false" default="false">
<cfset var local = {}>
<cfset local.responseobject = new Response()>
View cfchart_invalid_color.cfm
<cfchart format="png" chartwidth="270" xaxistitle="Visits last 7 Days" show3d="no" foregroundcolor="##333333" showborder="no" fontbold="yes" tipStyle="none" url="" showLegend="true">
<cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="FLASHvisits" datalabelstyle="none" seriesLabel="FloorPlan">
<cfif chartData.showVTS><cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="VTSvisits" seriesColor="blue" datalabelstyle="none" seriesLabel="IDS"></cfif>
<cfif chartData.showMobile><cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="MOBILEvisits" seriesColor="red" datalabelstyle="none" seriesLabel="Mobile"></cfif>
The line that the stack trace says it's erroring on is:
<cfif chartData.showMobile><cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="MOBILEvisits" seriesColor="red" datalabelstyle="none" seriesLabel="Mobile"></cfif>
You can’t perform that action at this time.