Skip to content

Instantly share code, notes, and snippets.

View arrayEachParallel.cfm
<cfscript>
cfflush(interval=16);
start = getTickCount();
trackIt("Begin Test");
["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth"].each(function(value, index, array){
trackIt("(#value#) start");
var delay = (array.len() - index) * 1000;
trackIt("(#value#) wating for #delay#ms");
sleep(delay);
View trycf-gist.cfm
<cfscript>
sRet['pdffiles'] = [
{pdffile = "file1.pdf",sort = 1},
{pdffile = "file3.pdf",sort = 3},
{pdffile = "file2.pdf",sort = 2},
{pdffile = "file22.pdf",sort = 22}
];
writeDump(sRet['pdffiles']);
View trycf-gist.cfm
<cfscript>
foo = QueryNew("id");
bar = QueryExecute(
"SELECT COUNT(1) AS cnt FROM foo",
[],
{dbtype="query"}
);
writeDump(bar);
</cfscript>
View gist:10100791
foo.cfc
-----------
component accessors = true {
// accessors = true // syntax error here (it should be above,as per now)
property string username setter = true required=true;
property string password setter = true required=true;
property string WSURL setter=true required=true;
}
test.cfm