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
function findEntry(filePath, entry) { | |
var file = ""; | |
var line = ""; | |
try { | |
file = fileOpen(filePath, "read", "UTF-8"); | |
line = ""; | |
while (!fileIsEOF(file)) { | |
line = fileReadLine(file); |
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
function findEntry(filePath, entry) { | |
var file = ""; | |
var line = ""; | |
try { | |
file = fileOpen(filePath, "read", "UTF-8"); | |
line = ""; | |
while (!fileIsEOF(file)) { | |
line = fileReadLine(file); |
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
// Application.cfc | |
component { | |
this.name = "testApplicationStop"; | |
this.applicationTimeout = createTimeSpan(0, 0, 1, 0); | |
function onApplicationStart(){ | |
application.key = createUuid(); | |
application.startedAt = timeFormat(now(), "HH:MM:SS.LLL") & "<br />"; | |
application.firstVar = "First var using #application.startedAt#"; |
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
<cfif structKeyExists(form, "btnSubmit")> | |
<cfif form.btnSubmit EQ "ADD"> | |
<cfinsert tablename="tbl_test" datasource="scratch_mysql" formfields="tst_data"> | |
<cfelseif form.btnSubmit EQ "UPDATE"> | |
<cfupdate tablename="tbl_test" datasource="scratch_mysql" formfields="tst_id,tst_data"> | |
</cfif> | |
</cfif> | |
<cfquery name="q" datasource="scratch_mysql"> | |
SELECT tst_id, tst_data | |
FROM tbl_test |
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
<!--- medalsChart.cfm ---> | |
<cfchart chartheight="400" chartwidth="400" title="Medals at the Olympics @ 2/8/2012" format="html" seriesplacement="stacked"> | |
<cfchartseries label="Bronze" type="bar" seriescolor="8C7853"> | |
<cfchartdata item="NZ" value="2"> | |
<cfchartdata item="GB" value="4"> | |
<cfchartdata item="USA" value="10"> | |
</cfchartseries> | |
<cfchartseries label="Silver" type="bar" seriescolor="E6E8FA"> | |
<cfchartdata item="NZ" value="0"> |
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
<!--- doLoop.cfm ---> | |
<cf_loop iterations="10" index="i"> | |
<cfoutput>[#i#]</cfoutput>Hello World<br /> | |
</cf_loop> |
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
<!--- view.cfm ---> | |
<cfimport taglib="/shared/CF/other/customTags/looping" prefix="ui"> | |
<cfoutput> | |
<ui:table data="#q#" headers="true" columnnames="id,english,maori" border="2" cellpadding="2" cellspacing="2"> | |
<tr><td>#id#</td><td>#english#</td><td>#maori#</td></tr> | |
</ui:table> | |
<hr /> |
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
<!--- data.cfm ---> | |
<cfscript> | |
q = queryNew(""); | |
queryAddColumn(q, "id", [1,2,3,4]); | |
queryAddColumn(q, "English", ["one","two","three","four"]); | |
queryAddColumn(q, "Maori", ["tahi","rua","toru","wha"]); | |
a = [ | |
[1,"one","tahi"], | |
[2,"two","rua"], |
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
<!--- table.cfm ---> | |
<cfif THISTAG.ExecutionMode EQ "Start"> | |
<cfscript> | |
param name="attributes.data"; // no type checking, just existence checking | |
param name="attributes.headers" type="boolean" default=false; | |
param name="attributes.columnNames" type="string"; // this'll be treated as a list | |
currentRow = 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
import java.util.*; | |
import java.lang.reflect.*; | |
public class ClassViewer | |
{ | |
private static final String nl = System.getProperty("line.separator"); | |
public static final String viewClassByName(String name) | |
throws Exception | |
{ |
OlderNewer