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
var table = [ | |
["Person", "Age", "City"], | |
["Sue", 22, "San Francisco"], | |
["Joe", 45, "Halifax"] | |
]; | |
var rows = table.length ; | |
for (var i = 0 ; i < rows ; i++) { | |
var output = '' ; | |
var cells = table[i].length ; | |
for (var j = 0 ; j < cells; j++) { |
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
-- collection of useful regular expressions |
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
<!--- Get request from ColdFusion page contenxt. ---> | |
<cfset objRequest = GetPageContext().GetRequest() /> | |
<!--- Get requested URL from request object. ---> | |
<cfset strUrl = objRequest.GetRequestUrl().Append( | |
"?" & objRequest.GetQueryString() | |
).ToString() | |
/> |
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
-- '1,2,3' is the list of ids we would be searching against | |
SELECT * | |
FROM table | |
WHERE id IN | |
( | |
SELECT REGEXP_SUBSTR('1,2,3','[^,]+', 1, level) from dual | |
CONNECT BY REGEXP_SUBSTR('1,2,3', '[^,]+', 1, level) is not null | |
) |
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
<!--- local/variable scope ---> | |
<cfdump var="#getPageContext().getVariableScope()#" expand="false" label="variable scope"/> | |
<!--- all scopes LT cf10 ---> | |
<cfdump var="#getPageContext().getBuiltInScopes()#"/> | |
<!--- all scopes cf10+ ---> | |
<cfdump var="#getPageContext().getCFScopes()#"/> |
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
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function(obj, start) { | |
for (var i = (start || 0), j = this.length; i < j; i++) { | |
if (this[i] === obj) { return i; } | |
} | |
return -1; | |
} | |
} |
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
var alertFallback = true; | |
if (typeof console === "undefined" || typeof console.log === "undefined") { | |
console = {}; | |
if (alertFallback) { | |
console.log = function(msg) { | |
alert(msg); | |
}; | |
} else { | |
console.log = function() {}; | |
} |
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
a:not([href]) { | |
/* Styles for anchors without href */ | |
} |
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
dir /A:-D /N /S /B > filenames.txt | |
forfiles /S /C "cmd /c echo @path0x09@fsize0x09@fdate" > filenames.txt | |
for %f in (*.txt) do type "%f" >> combined.txt |
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
SELECT * | |
FROM table a | |
WHERE A.column_name IN ( | |
SELECT REGEXP_SUBSTR('1,2,3','[^,]+', level) FROM dual | |
CONNECT BY REGEXP_SUBSTR('1,2,3', '[^,]+', level) is not null | |
) |