This file contains 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 loadsplits WHERE Loadnumber = 7499999 |
This file contains 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
<cffunction name="valueSearch2" returntype="string" access="remote"> | |
<cfargument name="input" type="numeric" required="true"/> | |
<cfset var local.msg = ''> | |
<cfset local.bitAR = arrayNew(1) /> | |
<cfset local.bitAR[1] = { bit = 256, name = 'Authority' } /> | |
<cfset local.bitAR[2] = { bit = 128, name = 'Claims' } /> | |
<cfset local.bitAR[3] = { bit = 64, name = 'Service Failure' } /> |
This file contains 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
<!--- cf function that solves the fizzbuzz test ---> | |
<!--- I generally don't like functions outputing themselves, | |
I would rather have it do a return - gives you more flexability later ---> | |
<cffunction name="displayFBMsg" access="private" hint="whatever..."><!--- no returntype / no output ---> | |
<cfargument name="numberOfIterations" required="true" type="numeric"><!--- personal preference, I like name, type, required, but thats not a big deal ---> | |
<cfloop from="1" to="#arguments.numberOfIterations#" index="i"><!--- i is not var'd ---> | |
<!--- with this logic, you're going to do at least 2 checks on every number, | |
and if those pass, you'll do 4, regardless (just as a comparison) ---> | |
<cfif i MOD 3 EQ 0 OR i MOD 5 EQ 0> |
This file contains 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
<cfoutput> | |
<ol> | |
<cfloop from="1" to="1000" index="i"> | |
<li>#fizzbuzz(i)#</li> | |
</cfloop> | |
</ol> | |
</cfoutput> | |
<cffunction name="fizzbuzz" access="public" returntype="string" output="false"> | |
<cfargument name="input" type="numeric" required="True" /> |
This file contains 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> | |
<cffunction name="processFizz" access="remote" returntype="String"><!--- no output ---> | |
<cfargument name="input" type="numeric"><!--- no required ---> | |
<cfset var local = structNew()/> | |
<cfset local.result = ''/> | |
<cfif arguments.input MOD 3 EQ 0 AND arguments.input MOD 5 EQ 0> |
This file contains 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> | |
<cfset variables.settings = structNew() /> | |
<cfset variables.settings.cacheExpirationSeconds = 10 /> | |
<cfset variables.instance = structNew() /> | |
<cfset variables.instance.cacheExpirationTime = 0 /> | |
<cfset variables.instance.cache = queryNew("foo") /> | |
<cffunction name="init" access="public" returntype="any" output="false" hint=""> |
This file contains 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
WITH reserved AS ( | |
SELECT | |
COUNT(sectionID) reservedCount | |
, sectionID | |
FROM | |
enrollmentReservation | |
), enrolled AS ( | |
SELECT | |
COUNT(sectionID) enrolledCount | |
, sectionID |
This file contains 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> | |
// Converts a ColdFusion string in a java byte array | |
function createByteArray(string){ | |
var objString = createObject("Java", "java.lang.String").init(JavaCast("string", string)); | |
return objString.getBytes(); | |
} | |
</cfscript> | |
<cfset variables.myCFString = "Sally sells sea shells by the sea shore" /> |
This file contains 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
<!--- | |
--- NOTE: YOU NEED THE JAVA LIBRARY FROM HERE: http://www.rabbitmq.com/java-client.html | |
--- http://www.rabbitmq.com/tutorials/tutorial-one-java.html | |
--- https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/java/Recv.java | |
import com.rabbitmq.client.ConnectionFactory; | |
import com.rabbitmq.client.Connection; | |
import com.rabbitmq.client.Channel; |
This file contains 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
/* | |
// EXAMPLE USAGE | |
// copy this file to com/util/CFRemoteObjectFactory.as | |
import com.util.CFRemoteObjectFactory; | |
import mx.controls.Alert; | |
import mx.events.FlexEvent; | |
import mx.rpc.events.FaultEvent; | |
import mx.rpc.events.ResultEvent; |
OlderNewer