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> | |
| param variables.foo = ""; | |
| writedump(variables); | |
| /* | |
| Railo 4.2.1.007 Error (template) | |
| Message Invalid Identifier, the following character cannot be part of a identifier [=] | |
| Stacktrace The Error Occurred in | |
| E:\home\html\railo-test\param-test-2605.cfm: line 2 |
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> | |
| /** | |
| * Displays a formatted approximation of how long ago a timestamp was. | |
| * | |
| * @param input - Date to Format (required) | |
| * @param defaultMask - the date mask if the date is earlier than the earliest case. Default dd MMM, YYYY | |
| * @return Returns a string. | |
| * @author Ryan Guill (ryanguill@gmail.com), Adam Tuttle (adam@fusiongrokker.com) | |
| * @version 1, Sept 11, 2014 |
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
| /* | |
| This CFC is intended to be used with fw/1 and stored in the session scope. | |
| session.flash = beanFactory.getBean("FlashStorage"); //if you are using fw/1 | |
| or | |
| session.flash = FlashStorage(); | |
| it is inteneded to be used to store any variables you would like to hold on |
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> | |
| a = function () { | |
| return true; | |
| }; | |
| b = function () { | |
| return 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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> | |
| writedump(parsedatetime("Wed, 05 Nov 2014 20:22:51 GMT")); | |
| writedump(now()); | |
| </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> | |
| //http://blog.adamcameron.me/2014/11/something-for-weekend-wee-code-quiz-in.html | |
| function getSubseries(required array series, required numeric threshold) { | |
| if (series.len() == 0) { | |
| return series; | |
| } | |
| var candidates = []; |
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> | |
| function getData_works (ID) { | |
| var data = queryNew("ID","Integer"); | |
| queryAddRow(data); | |
| querySetCell(data, "ID", 1); | |
| //this works fine | |
| return queryExecute("SELECT * FROM data where ID = :ID", {ID: ID}, {dbtype="query"}); | |
| } |
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
| <html> | |
| <head> | |
| <title></title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"></script> | |
| <script> | |
| var set = { | |
| one : { | |
| alphabet : "a", |
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 EXISTS ( SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[tablename]') AND name = N'tablename_IDX0') | |
| BEGIN | |
| DROP INDEX tablename_IDX0 ON tablename; | |
| END | |
| CREATE NONCLUSTERED INDEX tablename_IDX0 ON tablename | |
| ( | |
| columnA | |
| ) | |
| INCLUDE |