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 schools.id AS schoolid,schools.name AS school,districts.id AS districtid, districts.name AS district | |
FROM sms_schools AS schools | |
LEFT JOIN sms_districts AS districts ON schools.districtid = districts.id | |
WHERE 1 = 1 | |
ORDER BY (CASE WHEN districts.id IS NULL then 1 ELSE 0 END),districts.name, schools.name; |
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
foo = 'bar'; | |
if(foo IS 'bar'){ | |
writeOutput(foo); | |
} |
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
<cfcomponent displayname="CF SCP" hint="Handles SCP style functionality within ColdFusion" output="false"> | |
<cfproperty name="scpserver" hint="Remote server to send files to" type="string" /> | |
<cfproperty name="username" hint="Username for access to the remote server" type="struct" /> | |
<cfproperty name="password" hint="Password of the remote server (required if not using private key authentication)" type="string" /> | |
<cfproperty name="key" hint="Path to private key for private key authentication" type="string" /> | |
<cfproperty name="connection" type="any" /> | |
<!--- #### Object Constructor #### ---> | |
<cffunction name="init" hint="Object constructor" access="public" output="false" returntype="any"> | |
<cfargument name="server" type="string" required="false" default="" /> |
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
realNum = rand(10) | |
puts "What is your guess?" | |
checkNum = gets.to_i | |
while checkNum != realNum do | |
if checkNum != realNum | |
puts 'Your guess is wrong. What is your guess?' | |
checkNum = gets.to_i | |
end | |
end | |
puts 'You guessed correctly!' |
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
<cfcomponent> | |
<cfif left(Server.ColdFusion.productversion,1) LT 9> | |
<cffunction name="arrayFind" access="public" output="false" returntype="Numeric" hint="Returns the index of the first found element in the array containing the value argument"> | |
<cfargument name="array" required="true" type="array" /> | |
<cfargument name="value" required="true" type="string" /> | |
<cfreturn (Arguments.array.indexOf(Arguments.value)) +1 /> | |
</cffunction> | |
</cfif> | |
</cfcomponent> |
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
sudo chmod 464 Info.plist |
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(){ | |
console.log('Tabbing interface'); | |
// Create the array that stores our disabled tabs and populate it | |
var tabdisabled = []; | |
$('.tabs ul:first li a').each(function(index){ | |
var $this = $(this); | |
var $enabled = $('.tabs div .enable#' + index); | |
if($this.hasClass('disabled'))tabdisabled.push(index); | |
// Add the handler to enable and disable the tab |
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
public function save(any rc) void{ | |
// Run an insert query called local.student here | |
local.history = { | |
student = local.student.GENERATED_KEY, | |
datestamp = now(), | |
active = Rc.active, | |
school = Rc.school, | |
grade = Rc.grade | |
}; | |
variables.fw.service('student.newhistory','history',local.history); |
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
component{ | |
function init(statusini){ | |
variables.ini = expandPath(Arguments.statusini); | |
return this; | |
} | |
function getStatus(section, id){ | |
var code = getProfileString(variables.ini, section, id); | |
if(!len(code)) getProfileString(variables.ini, section, 000); | |
if(!len(code)) throw(message="Status code not found", detail="There is no status code with id #Arguments.id# in #Arguments.section#, and no default status code was found."); | |
return code; |
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
<cftry> | |
<cfquery name="create" datasource="inmemory"> | |
CREATE TABLE testTable ( | |
testID INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), | |
test VARCHAR(50) | |
) | |
</cfquery> | |
<cfcatch type="any"> | |
<!--- Well this sucks. Now our application can't do anything. ---> | |
</cfcatch> |