Skip to content

Instantly share code, notes, and snippets.

@chippinkston
chippinkston / demoService.cfc
Created August 7, 2015 20:14
A demo FW/1 service to test DB connections
component accessors=true output=false persistent=false {
property datasource;
public query function getOneRecord(){
var q = queryExecute(
"select name, abbrev from state limit 1"
, {datasource = "#getDatasource().name#"}
);
return q;
}
@chippinkston
chippinkston / GetTickets
Last active November 25, 2015 17:01
ORM In Query
tickets = ormExecuteQuery("
select
tic
from
tickets as tic
join
tic.status as status
where
status.name IN (:status)
"
@chippinkston
chippinkston / testDI.cfc
Last active April 28, 2016 15:20
Example of unfound service - Throws Error: Component [test.model.testDI] has no accessible Member with name [RESULTSSERVICE]under Luccee 4.5.2.018 and TestBox v2.3.0+00044
component extends="testbox.system.BaseSpec" accessors="true"{
function beforeAll(){
variables.bf = new lib.org.framework.3_1_0.ioc("/model");
variables.bf.addBean("datasource", {"name"="myDSN"});
variables.resultsService = variables.bf.getBean('resultsService');
}
function run( testResults, testBox ){
feature( "Survey Reporting", function() {
describe("I want to know how many responses we have in the system"
, function() {
@chippinkston
chippinkston / testDI-works.cfc
Last active April 28, 2016 17:38
Moving the declaration into the given() block works. Did direct call rather than using DI/1.
component extends="testbox.system.BaseSpec" accessors="true"{
function beforeAll(){
}
function run( testResults, testBox ){
feature( "Get a Count of Responses", function() {
describe("I want to know how many responses we have in the system"
, function() {
scenario( "Get all Response counts", function(){
given( "I have a Survey ID",function() {
variables.resultsService = new model.services.resultsService();
@chippinkston
chippinkston / key [_FW1] doesn't exist
Created October 12, 2016 15:07
Exception that keeps showing up in my logs.
"ERROR","http-nio-8888-exec-8","10/07/2016","22:15:00","","key [_FW1] doesn't exist
at lucee.runtime.type.util.StructSupport.invalidKey(StructSupport.java:66):66
at lucee.runtime.type.scope.RequestImpl.get(RequestImpl.java:168):168
at lib.org.framework.one_cfc$cf.udfCalla(/home/mysite/public_html/lib/org/framework/one.cfc:2091):2091
at lib.org.framework.one_cfc$cf.udfCall(/home/mysite/public_html/lib/org/framework/one.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:766):766
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:742):742
@chippinkston
chippinkston / key [MURA] doesn't exist
Created October 12, 2016 15:11
Exception that keeps showing up in my logs.
"ERROR","http-nio-8888-exec-22","10/08/2016","02:30:51","","key [MURA] doesn't exist
at lucee.runtime.type.util.StructSupport.invalidKey(StructSupport.java:66):66
at lucee.runtime.type.StructImpl.get(StructImpl.java:120):120
at user.sessionuserfacade_cfc$cf.udfCall1(/home/mysite/public_html/wwwroot/requirements/mura/user/sessionUserFacade.cfc:57):57
at user.sessionuserfacade_cfc$cf.udfCall(/home/mysite/public_html/wwwroot/requirements/mura/user/sessionUserFacade.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642):642
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
@chippinkston
chippinkston / key [_FW1] doesn't exist - single line
Created October 12, 2016 15:33
Exception that keeps showing up in my logs.
"ERROR","http-nio-8888-exec-2","10/09/2016","21:45:00","","Message: key [_FW1] doesn't exist"
@chippinkston
chippinkston / gist:bb26eaa78e969205d088f3905e7e4e43
Created February 17, 2017 17:04
vagrant cfconfig show settings
//install commandbox on the vagrant machine
CommandBox:lucee-server> cd /opt/lucee/lib/lucee-server/
CommandBox:lucee-server> cfconfig show from=. [email protected]
{
"searchResultsets":"yes",
"mergeURLAndForm":"no",
"requestTimeout":"0,0,0,50",
"clientCookies":"yes",
"scopeCascading":"standard",
<cfscript>
echo('testing');
test = new test();
dump(test.testMe());
dump(test.generics());
dump(test);
</cfscript>
<h2>Longer first item</h2>
<div>
<div class="col-md-6" style="background-color: #ff8000">foo<br />foo<br />foo<br />foo<br />foo<br /></div>
<div class="col-md-6" style="background-color: #2b6e88">foo<br />foo<br />foo<br /></div>
<div class="col-md-6" style="background-color: #2b9933">foo<br />foo<br />foo<br />foo<br /></div>
</div>
<h2>Longer second item</h2>
<div>
<div class="col-md-6" style="background-color: #ff8000">foo<br />foo<br />foo<br /></div>