This file contains hidden or 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
<?php | |
function getFilesInDirectoryAsArray($directory, $recursive, $arrFilter=array()) { | |
$arrItems = array(); | |
if(substr($directory, strlen($directory)-1, 1) != "/"){ | |
$directory.="/"; | |
} | |
if(count($arrFilter)){ | |
$filterMap=array(); | |
for($i=0;$i<count($arrFilter);$i++){ | |
$filterMap[$arrFilter[$i]]=true; |
This file contains hidden or 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
<cfcomponent output="yes"> | |
<cffunction name="getF" output="no"> | |
<cfreturn function(a){ return a+1;}> | |
</cffunction> | |
<cfscript> | |
function test2(closure1=function(a){ return a+1;}){ | |
return arguments.closure1(4); | |
} | |
</cfscript> |
This file contains hidden or 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> | |
password="test1234"; | |
N = 65536; // CPU cost parameter. | |
r = 16; // Memory cost parameter. | |
p = 1; // Parallelization parameter. | |
// Note: SCryptUtil has default of 16 byte random salt and 256-bit key | |
SCryptUtil=createobject("java", "com.lambdaworks.crypto.SCryptUtil", "/path/to/scrypt-1.4.0.jar"); | |
// generate a hash | |
hashedPassword=SCryptUtil.scrypt(password, N, r, p); |
This file contains hidden or 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
<cffunction name="getImplicitVariableAccessAsHTMLTable"> | |
<cfargument name="railoWebAdminPassword" type="string" required="yes"> | |
<cfscript> | |
var uniqueStruct={}; | |
var ts=0; | |
var q=0; | |
var output=0; | |
var count=0; | |
var jsoutput=0; | |
admin action="getDebug" type="web" password="#arguments.railoWebAdminPassword#" returnVariable="ts"; |
This file contains hidden or 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
/** | |
* $.unserialize | |
* | |
* Takes a string in format "param1=value1¶m2=value2" and returns an object { param1: 'value1', param2: 'value2' }. If the "param1" ends with "[]" the param is treated as an array. | |
* | |
* Example: | |
* | |
* Input: param1=value1¶m2=value2 | |
* Return: { param1 : value1, param2: value2 } | |
* |