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 foor15Min(t) { | |
var roundedMinutes = INT(minute(t) / 15 ) * 15; | |
return CreateDateTime(year(t), month(t), day(t), hour(t),roundedMinutes,0) | |
} | |
</cfscript> | |
<CFHEADER NAME="Cache-Control" VALUE="public, max-age=900"> | |
<CFHEADER NAME="Last-Modified" VALUE="#LSDateFormat(#foor15Min( DateConvert( 'Local2UTC', now() ) )#, 'ddd, dd mmm yyyy')# #LSTimeFormat(#foor15Min( DateConvert( 'Local2UTC', now() ) )#, 'HH:mm:ss')# GMT"> |
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
<h1>Caches Overview</h1> | |
<h2>cacheType</h2> | |
<cfdump var="#cacheCount('cacheType')#" label="cacheType" /> | |
cache cacheType size: <cfoutput>#(SizeOf( cacheGetAll("", "cacheType") )/1024)/1024#</cfoutput> MB<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
<!--- see: http://christianmuellerdesign.wordpress.com/2014/05/23/getting-startet-with-coldfusion-and-mxunit/ ---> | |
<cfcomponent displayname="mxunit.framework.Test" extends="mxunit.framework.TestCase"> | |
<cffunction name="firstTest" access="public" returntype="void"> | |
<cfscript> | |
addTrace("expected vs. actual" ); | |
assertTrue(true); | |
assertEquals(this.expected, true); | |
</cfscript> | |
</cffunction> |
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> | |
private struct function mergeStructs(required array structs) { | |
var result = {}; | |
var argsLen = arrayLen(arguments.structs); | |
for ( var j = 1; j <= argsLen; j = j + 1 ) { | |
var keys = structKeyArray(arguments.structs[j]); | |
var keysLen = arrayLen(keys); | |
for ( var i = 1; i <= keysLen; i = i + 1 ) { | |
var key = lcase(keys[i]); | |
result[key] = arguments.structs[j][key]; |
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> | |
private struct function mergeStructs(required array structs) { | |
var base = {}; | |
var len = arrayLen(arguments.structs); | |
for (var i = 1; i <= len; i = i + 1) { | |
for (key in arguments.structs[i]) base[lcase(key)]=arguments.structs[i][key]; | |
} | |
return base; | |
} | |
</cfscript> |
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> | |
private query function reduceQueryColumns(required query source, required string columns) { | |
var qReduced = ""; | |
query name="qReduced" dbtype="query" { writeOutput("select #arguments.columns# from arguments.source") }; | |
return qReduced; | |
} | |
private query function reRemoveColumns(required query source, required string regex) { | |
var columns = listToArray(arguments.source.columnlist); | |
for (var i = arrayLen(columns); i >= 1 ; i = i - 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
ALTER TABLE tbl AUTO_INCREMENT = 5; |
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
DROP procedure IF EXISTS split_string; | |
DELIMITER $$ | |
CREATE PROCEDURE split_string (list TEXT) | |
BEGIN | |
DECLARE max INT DEFAULT 0; | |
DECLARE i INT DEFAULT 1; | |
DECLARE elem INT DEFAULT 0; | |
SET max = length(list) - length(replace(list, ',', '')); |
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
<.*?(\>) |
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
svn st | grep '^?' | awk '{print $2}' | xargs rm -rf |
OlderNewer