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 method of a query of queries | |
// there seems to be no supported way to create a qoq using the more common queryNew() cfscript | |
local.qoqObj = new Query(dbtype='query', sql="select * from qrySource where [sql conditional] ") ; // qrySource is an attribute set below | |
local.qoqObj.setAttributes(qrySource=local.actualSourceQuery) ; // | |
local.qryQoqResults = local.qoqObj.execute().getResult() ; | |
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
UPDATE destTable d | |
SET d.column = (select column from sourceTable where id = [id]) | |
WHERE [id] = 1 | |
; |
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
CREATE OR REPLACE TRIGGER TIUD_BACKGROUND_INV | |
AFTER DELETE OR INSERT OR UPDATE | |
ON BACKGROUND_INV REFERENCING NEW AS NEW OLD AS OLD | |
FOR EACH ROW | |
DECLARE | |
v_new_updated_by := background_inv.updatedby%type ; | |
BEGIN | |
IF updating THEN |
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> | |
currentDir = getDirectoryFromPath(getTemplatePath()) ; | |
currentfile = lcase(getFileFromPath(getTemplatePath())); | |
fileList = directoryList(currentDir,false,'query','*.jpg','asc') ; | |
</cfscript> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>PhotoSwipe</title> |
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
img.resize{height:80px;width:auto;} | |
img.resize{height:auto;width:80px;} |
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> | |
param name='arguments.length' default=10 ; | |
pool = 'abcdefghjkmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ; | |
newTicket = '' ; | |
for (i=1 ; i lte arguments.length; i=i+1) { | |
newTicket &= mid(pool, randRange(1, len(pool)),1); | |
} | |
</cfscript> |
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> | |
randssn = ''; | |
seed = timeformat(now(),'hhmmssl'); | |
Randomize(seed); | |
randssn = randrange(1,9) ; // make it so the first digit is never a 0. in case it is going into a spreadsheet. | |
for (i = 1; i LTE 8 ; i++){ | |
randssn = randssn & randrange(0,9) ; | |
} | |
</cfscript> |
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
$("#clear").click(function(e){ | |
$('#contactForm')[0].reset(); | |
}); |
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
//here's our players array from exercise 1 | |
var players = []; | |
players[0] = {'name': 'Robert', hand: []}; | |
players[1] = {'name': 'Joe', hand: []}; | |
//here's our code to create the deck | |
var suits = ['clubs','diamonds','hearts','spades']; | |
var ranks = [2,3,4,5,6,7,8,9,10,'J','Q','K','A']; | |
var deck = []; | |
for (var i=0;i<suits.length;i++) { |
OlderNewer