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
<!--- Create initial recordset ---> | |
<cfset variables.structElementTest = structNew() /> | |
<!--- Artist 1 ---> | |
<cfset structElementTest.band1 = "MUSE" /> | |
<cfset structElementTest["band1_website"] = "www.muse.mu" /> | |
<!--- Artist 2 ---> | |
<cfset structElementTest["band2"] = "Radiohead" /> | |
<!--- Mixed case ---> |
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
<script language="javascript"> | |
// Set your DataTable configuration, in your onLoad event | |
var myConfigs = { | |
currencyOptions : { | |
prefix: '<?php echo $this->currency->getSymbol($this->currency->getLocale()); ?>' | |
, decimalPlaces:2 | |
, decimalSeparator:"." | |
, thousandsSeparator:"," | |
} | |
}; |
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="getFreeSpace" displayname="getFreeSpace" description="Use Java.io.File to return amount of free space in target path" access="public" output="false" returntype="any"> | |
<cfargument name="path" displayName="path" type="string" hint="File path" required="true" /> | |
<!--- Create an instance of the Java IO File Class ---> | |
<cfset var objFile = createObject("java", "java.io.File").init(arguments.path)/> | |
<!--- Return the amount of free space ---> | |
<cfreturn objFile.getFreeSpace() /> | |
</cffunction> <!--- End: checkFreeSpace() ---> |
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
<cfset variables.structTest = structNew()/> | |
<!--- Determine the current file path ---> | |
<cfset variables.structTest.current_folder = expandPath("/") /> | |
<!--- Lookup free space based on the passed in file path ---> | |
<cfset variables.structTest.freeSpace = numberFormat(getFreeSpace(variables.structTest.current_folder)) /> | |
<cfdump var="#variables.structTest#" label="structTest" /> |
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
<!--- Create a regular expression pattern to find BR tags ---> | |
<cfset variables.patternHTMLBreak = "(<br[^>]*>\s*)" /> | |
<!--- Replace all forms of the BR tag, To handle a wierd IO issue in CF8 using CFDoc with two consecutive BR's ---> | |
<cfset variables.PDFPage = trim(reReplaceNoCase(variables.PDFPage, variables.patternHTMLBreak, "<br/> ", "ALL")) /> |
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
$('alphaonly').keypress(function(e){ | |
// Convert the character code to a string | |
var strIn = String.fromCharCode(e.charCode); | |
// The current cursor position is stored as: e.target.selectionStart | |
if(e.target.selectionStart == 0) { | |
// Setup our pattern, excluding anything other than a-zA-Z | |
var patt = /[a-zA-Z]/gi; | |
} else { | |
// Setup our pattern to allow alpha, spaces and dashes |
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
private java.time.ZonedDateTime convertJODADateTimeToJavaZonedDateTime(DateTime originDateTime, DateTimeZone originTimeZone) { | |
if (originDateTime == null || originTimeZone == zone) { | |
return null; | |
} | |
// Convert from JODA to Java 8 time | |
java.time.ZonedDateTime newDateTime = java.time.ZonedDateTime.ofInstant( | |
Instant.ofEpochMilli(originDateTime.getMillis()), java.time.ZoneId.of(zone.getID())); | |
return newDateTime; |
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
DECLARE @constraintName varchar(200); | |
SET @constraintName = 'SomeConstraintName'; | |
IF ( SELECT count(*) FROM sys.objects | |
WHERE type_desc LIKE '%CONSTRAINT' | |
AND OBJECT_NAME(object_id) = @constraintName) <> 0 BEGIN | |
PRINT 'FOUND Constraint: ' + @constraintName; | |
-- Perform some action... | |
END | |
ELSE |