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> | |
// midnight in Malaga | |
theDate = '2023-09-11T00:00:00+02:00'; | |
// Should show the previous day at 10PM in Lisbon | |
writeDump( dateTimeFormat( theDate, "YYYY-MM-dd'T'hh:nn:ss", "UTC") ); | |
// Should show the previous day at 06PM in NY | |
writeDump( dateTimeFormat( theDate, "YYYY-MM-dd'T'hh:nn:ss", "America/New_York") ); | |
</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
component { | |
/** | |
* Undocumented property | |
*/ | |
property name="HibernateSessionStats"; | |
/** | |
* Undocumented property |
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
#!/usr/bin/env bash | |
# Path to the checked out Lucee source | |
# Note that the tests run are pulled from this directory, | |
# so you'll have best luck (up to date tests) if you check out the tag that matches the LUCEE_VERSION variable. | |
LUCEE_PATH=/home/michael/server/lucee/lucee | |
# Path to the checked out lucee/script-runner project, | |
# which is what sets up and runs the CFML-based tests | |
LUCEE_SCRIPT_RUNNER_PATH=/home/michael/server/lucee/script-runner/ |
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> | |
if ( server.keyExists( "lucee" ) ){ | |
cfEngine = server.lucee.version; | |
} else { | |
cfEngine = server.coldfusion.productversion | |
} | |
writeOutput('<h1>#cfEngine#</h1>' ); | |
// LOWERCASE | |
writeOutput("<h2>lowercase UUID</h2><code>isValid( 'uuid', 'b0e494c1-2ff8-44d5-a897-70af769e568c' )</code><br><br>"); | |
writeDump( isValid( 'uuid', 'b0e494c1-2ff8-44d5-a897-70af769e568c' ) ); |
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> | |
if ( server.keyExists( "Lucee" ) ){ | |
writeOutput( '<h3>Lucee #server.lucee.version#</h1>' ); | |
} else { | |
writeOutput( '<h3>Adobe Coldfusion #server.coldfusion.productversion#</h1>' ); | |
} | |
testQry = queryNew( "lineData" ); | |
row = { | |
lineData : { |
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> | |
if ( server.keyExists( "Lucee" ) ){ | |
writeOutput( '<h3>Lucee #server.lucee.version#</h1>' ); | |
} else { | |
writeOutput( '<h3>Adobe Coldfusion #server.coldfusion.productversion#</h1>' ); | |
} | |
testQry = queryNew( "lineData" ); | |
row = { | |
lineData : { |
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
component { | |
/** | |
* Get a distribution struct of the prevelance of certain values | |
* | |
* @callback the random number generator or value generator. | |
*/ | |
public struct function getValuePrevalence( required callback ){ | |
var graph = {}; | |
for( var i = 0; i < 10000; i++ ){ | |
var number = callback(); |
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
" Set indentation via spaces | |
" @cite https://linuxhandbook.com/vim-indentation-tab-spaces/ | |
set autoindent expandtab tabstop=4 shiftwidth=4 | |
" Show line numbers by default | |
set nu | |
" F3: Toggle list (display unprintable characters). | |
" https://stackoverflow.com/a/12534401 | |
nnoremap <f3> :set list! list?<cr> |
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> | |
if ( structkeyExists( server, "lucee" ) ){ | |
writeOutput( "<h2>Lucee #server.lucee.version#" ); | |
} else { | |
writeOutput( "<h2>Adobe CF #server.coldfusion.productversion#" ); | |
} | |
writeOutput( "<h4>isSimpleValue at 10,000 iterations</h4>" ); | |
iterateTest( "string", "isSimpleValue" ); | |
iterateTest( "function", "isSimpleValue" ); | |
iterateTest( "struct", "isSimpleValue" ); |
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
component{ | |
/** | |
* Convert the given cfsqltype string name to a Hibernate Type object. | |
* i.e. `toHibernateSQLType( "cf_sql_varchar" )` or `toHibernateSQLType( "varchar" )`. | |
* | |
* @param cfsqltype Type name, like "cf_sql_integer" or "cf_sql_bit" | |
* @returns one of the classes from the org.hibernate.type package. | |
*/ | |
public function toHibernateSQLType( required string cfsqltype ){ |
NewerOlder