ketanjetty.com
closures
http://ketanjetty.com/coldfusion/javascript/closures
Query to unordered list. A closure is formed by returning a reference to a function (inner function) that was created within an execution context of another function. The future of cms, a simple, easy and intutive content management system . more. Cf prototyping engine, generates boilerplate code and . more. Monitor and timely auto-restart to avoid Jrun hang . more. Uses OOPs inheritance to create configuration file . more. Complete real estate application using data from MLS . more.
ketanjetty.com
JVM runtime
http://ketanjetty.com/coldfusion/monitor/jvm-runtime
Query to unordered list. The following code shows to how to tap into the coldfusion's underlying jvm to get information about:. Get data of DSNs in the current cf admin. Gets data of all current sessions. Gets data of all current sessions. Gets memory usage of the underlying java runtime. Gets number of processors (that the java runtime can access) in the machine. Gets the servername from the system. Return the instance name, useful in clusters to see which instance is handling the request. Get current s...
ketanjetty.com
dump to mail
http://ketanjetty.com/coldfusion/monitor/dump-to-mail
Query to unordered list. The DumpToMail() is created to help developers dump coldfusion objects to a mail for debugging purpose. You can dump objects like cfcatch, query, query result, session, variables and any coldfusion variables using this function. How to use DumpToMail() in your code. The future of cms, a simple, easy and intutive content management system . more. Cf prototyping engine, generates boilerplate code and . more. Monitor and timely auto-restart to avoid Jrun hang . more.
ketanjetty.com
regex
http://ketanjetty.com/coldfusion/javascript/regex
Query to unordered list. RegEx - - - flags g - global match i - ignore case m - match over multiple lines Escaping - special characters to literal and literal characters to special Quantifiers? Matches zero or one times * - matches zero or more times - matches one or more times {n} - matches n times {n, m} - matches at least n times, but not more than m times Anchors - matches at the start of the line $ - matches at the end of the line b - matches at the beginning or the end of a word delimiter (?
ketanjetty.com
Application.cfc
http://ketanjetty.com/coldfusion/basics/application-cfc
Query to unordered list. Cffunction name="onRequest" returnType="void" output="false" cfargument name="thePage" type="String" required="true" / cfreturn / /cffunction- - cffunction name="onRequestEnd" returnType="void" output="false" cfargument name="thePage" type="String" required="true" / cfreturn / /cffunction cffunction name="onMissingTemplate" returnType="boolean" output="false" cfargument name="targetpage" type="String" required="true" / cfreturn true / /cffunction! This method is invoked for each ...
ketanjetty.com
dump to file
http://ketanjetty.com/coldfusion/monitor/dump-to-file
Query to unordered list. The DumpToFile() is created to help developers dump coldfusion objects to a file for debugging purpose. You can dump objects like cfcatch, query, query result, session, variables and any coldfusion variables using this function. Force the thread to sleep for 100ms, to avoid overwriting the dump file - - cfset thread = CreateObject("java", "java.lang.Thread") cfset thread.sleep(100)! How to use DumpToFile() in your code. Monitor and timely auto-restart to avoid Jrun hang . more.
ketanjetty.com
jrun monitor
http://ketanjetty.com/coldfusion/monitor/jrun-monitor
Query to unordered list. The following code is written in CSharp to monitor the underlying jrun. This code will restart coldfusion 8 whenever the CPU and memory usage exceeds 90% of the alloted resources for more than 5 minutes. Here is a screencast. Of "how to deploy this code as a windows service packaged as an installer.". Coldfusion JRun monitoring and auto-restart code in CSharp. JrunRestart) { jrunRestart = true; } } / restart the process only if is not running and is not already started if (!
ketanjetty.com
stack trace
http://ketanjetty.com/coldfusion/monitor/stack-trace
Query to unordered list. To get the stack trace we dip into the coldfusion service factory object and get the data from the debugging service. This function gathers the data and displays the data in a neat orderly format in a saved htm save. Coldfusion stack trace code. How to use the stack trace function - - cfset monitorObj = CreateObject("component","monitor") cfset monitorObj.getStackTrace()! Resulting Stack Trace sample file. For a sample stack trace, click here. The future of cms, a simple, easy an...
ketanjetty.com
monitor
http://ketanjetty.com/coldfusion/monitor
Query to unordered list. The future of cms, a simple, easy and intutive content management system . more. Cf prototyping engine, generates boilerplate code and . more. Monitor and timely auto-restart to avoid Jrun hang . more. Uses OOPs inheritance to create configuration file . more. Complete real estate application using data from MLS . more. Create your own search engine for your web site . more.
ketanjetty.com
cookies
http://ketanjetty.com/coldfusion/basics/cookies
Query to unordered list. There are two kinds of cookies, as follows:. In-memory cookies OR Session cookies:. JSessionID is a session cookie. Coldfusion uses CFCOOKIE to set the cookie. The following code will convert the persistent cookies CFID and CFTOKEN to session cookie, thus allowing the cookies to be deleted automatically by the browser on browser close. How to end a coldfusion session on browser close. Cfif IsDefined("cookie.CFID") AND IsDefined("cookie.CFTOKEN")!