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
git branch --merged | grep -v '^* master$' | grep -v '^ master$' | xargs git branch -d |
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
variables.CUT.$("sayHello").$callback(variables.testFunction); | |
assertEquals("Hola Luis", variables.CUT.sayHello("Luis")) | |
// the callback method | |
private function testFunction(name){ | |
return "Hola " & arguments.name; | |
} |
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 URL.id = 123> | |
<cffunction name="testa"> | |
<cfargument name="id" type="numeric" required="no"> | |
<cfreturn isDefined("id")> | |
</cffunction> | |
<cffunction name="testb"> | |
<cfargument name="id" type="numeric" required="no"> |
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
component extends="testbox.system.BaseSpec" { | |
function beforeTests(){ | |
cut = fooTest(); | |
} | |
function run( testResults, testBox ){ | |
describe("A spec", function() { | |
beforeEach(function(string currentSpec) { |
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
<cfoutput> | |
#numberformat(4.50, "_.__")#<br> | |
#numberformat(4.50, "9.99")#<br> | |
#numberformat(4.50, "0.00")#<br> | |
#numberformat("4.50", "_.__")#<br> | |
#numberformat("4.50", "9.99")#<br> | |
#numberformat("4.50", "0.00")#<br> | |
#numberformat("4.5", "_.__")#<br> | |
#numberformat("4.5", "9.99")#<br> | |
#numberformat("4.5", "0.00")#<br> |
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
<cfscript> | |
// create a dummy list.... | |
list = ""; | |
elements = 5000; | |
step = 5; | |
i = 0; | |
while (i<elements) { | |
list = listAppend(list, elements + i); |
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 q = queryNew("id")> | |
<cfloop from=1 to=5 index="index"> | |
<cfset queryAddRow(q)> | |
<cfset querySetCell(q, "id", index)> | |
</cfloop> | |
<cfdump var="#arrayLen(q["id"])#"><!--- this shows 5 ---> | |
<cfdump var="#arrayAvg(q["id"])#"><!--- this shows 3 ---> | |
<cfdump var="#arraySum(q["id"])#"><!--- this shows 15 ---> | |
<cfdump var="#q["id"][4]#"><!--- this shows 4 ---> |
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
<cfscript> | |
function foo(a=1,b=2) { | |
writeoutput(hash(serializeJSON(arguments)) & "<br>"); | |
} | |
foo(1, 2); | |
foo(a=1, b=2); | |
foo(b=2, a=1); | |
foo(b=2); | |
foo(a=1); |
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
<cfscript> | |
function foo(a=1,b=2) cachedwithin="#createTimeSpan(0, 0, 0, 10)#" { | |
writeoutput(getTickCount() & " " & hash(serializeJSON(arguments)) & "<br>"); | |
sleep(10); | |
} | |
foo(1, 2); | |
foo(a=1, b=2); | |
foo(b=2, a=1); | |
foo(b=2); |
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
<cfscript> | |
foo = "{ts '2015-01-09 15:15:39'}"; | |
writeDump(isDate(foo)); // true | |
writeDump(DateFormat(foo, "yyyy-mm-dd")); // 2015-01-09 | |
writeDump(LSDateFormat(foo, "yyyy-mm-dd")); // error | |
</cfscript> |
OlderNewer