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 implements="i" accessors="true" { | |
property name="name" type="string"; | |
public any function init(name) { | |
setName(arguments.name); | |
return this; | |
} | |
} |
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
jdbc:as400://{servername};prompt=false;translate binary=true;lazy close=true;extended dynamic=false;package={package Name (keep it to 6 chars or less)};package library={packageLibrary};naming=system;libraries=qtemp {library list};errors=full; | |
ClassName: com.ibm.as400.access.AS400JDBCDriver |
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> | |
//In Adobe ColdFusion | |
//instead of structNew() or {} create a java linked hashmap | |
myStruct = createObject( "java", "java.util.LinkedHashMap" ).init(); | |
//now just use it like any other struct | |
//NOTE: one difference though is that it will be case sensitive, myStruct["one"] will be different than myStruct["One"] | |
//unlike normal cf structures | |
//In railo you can do it like the adobe example or use this shorthand |
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
var allElements = document.getElementsByTagName("*"), allIds = {}, dupIDs = []; | |
for (var i = 0, n = allElements.length; i < n; ++i) { | |
var el = allElements[i]; | |
if (el.id) { | |
if (allIds[el.id] !== undefined) dupIDs.push(el.id); | |
allIds[el.id] = el.name || el.id; | |
} | |
} | |
if (dupIDs.length) { console.error("Duplicate ID's:", dupIDs);} else { console.log("No Duplicates Detected"); } |
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
<html> | |
<head> | |
<title></title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<a href="http://google.com">Google</a><br /> | |
<a href="http://example.com" data-dont-fade="true">Example.com (dont fade)</a> |
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
<!--- works properly ---> | |
<cfdump var="randRange(0,2^31-2): #randRange(0,2^31-2)#"/><br /> | |
<!--- returns a negative number every time ---> | |
<cfdump var="randRange(0,2^31-1): #randRange(0,2^31-1)#"/><br /> | |
<!--- The following line errors (expectedly) with | |
Parameter validation error for the RANDRANGE function. | |
The value of parameter 2, which is currently 2147483648, must be a int value. ---> | |
<!--- <cfset x = randRange(0,2^31) /> ---> |
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
SELECT | |
columns.* | |
, '' remarks | |
, data_type type_name | |
, character_maximum_length column_size | |
, column_default column_default_value | |
, syscolumns.is_identity | |
, CASE WHEN primaryKeyConstraints.constraint_type IS NOT NULL THEN 1 ELSE 0 END is_primarykey | |
, CASE WHEN foreignKeyConstraints.constraint_type IS NOT NULL THEN 1 ELSE 0 END is_foreignKey | |
FROM |
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
<html> | |
<head> | |
<title>JS File Upload</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<input type="file" id="inpFile" value="" /> | |
<input type="button" id="btnUpload" value="upload" /> | |
<script> |
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
<cfsetting requesttimeout="600" /> | |
<cfscript> | |
public array function i1 (required array a, required array b) { | |
if (arrayLen(b) < arrayLen(a)) { | |
var t = a; | |
a = b; | |
b = t; | |
} |
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
/* useful if you dont have a real exception join */ | |
/* this will return the records in a that are not in b on the join conditions in the left outer join */ | |
select | |
a.foo | |
FROM | |
a | |
LEFT OUTER | |
JOIN b | |
ON a.id = b.id | |
WHERE |
OlderNewer