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
<cfscript> | |
public string function highlightKeywords(required string content,required array keywords,required array style){ | |
var replaceString = "<span style=""" & arraytolist(arguments.style,";") & """>\1</span>"; | |
var kwords = arraytolist(arguments.keywords, "\b|\b"); | |
kwords = "\b" & kwords & "\b"; | |
kwords = reReplacenocase(kwords,"(\%\\b|\\b\%)","","ALL"); | |
var resultString = reReplacenocase(arguments.content,"(#kwords#)",replaceString,"ALL"); | |
return resultString; | |
} | |
// input text |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UNLICENSE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; ToggleIconz is free and unencumbered software hereby released into the public domain on September 12, 2014 | |
; by the original developer, Steve Reich`r`n`r`nAnyone is free to copy`, modify`, publish`, use`, compile`, | |
; sell`, or distribute this software`, either in source code form or as a compiled binary`, for any purpose`, | |
; commercial or non-commercial`, and by any means. | |
; | |
; In jurisdictions that recognize copyright laws`, the author or authors of this software dedicate any and all | |
; copyright interest in the software to the public domain. We make this dedication for the benefit of the public | |
; at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of |
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
var WeatherAPI = function(){ | |
// create any default settings | |
var apiSettings = { | |
defaultIcons: 'f' | |
} | |
this.apiMethods = [ | |
'alerts', | |
'almanac', | |
'astronomy', | |
'conditions', |
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
:: This will enable/disable the Windows built-in administrator account. | |
:: Run this file as "Run as administrator", and then at the prompt, enter | |
:: one of the following options: y | n | yes | no ... the /i flag makes the | |
:: options case insensitive, so either capital or lower case is accepted. | |
:: Enter any other value, or no value at all, will return an error message | |
:: and not run the command. | |
ECHO OFF | |
SETLOCAL | |
SET /P doAdmin="Enable Windows built-in administrator account? (y/n) " | |
IF /i "%doAdmin%" EQU "n" SET doAdmin=no |
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
<cfscript> | |
private Array function sortHexColors(required Array colorArray) { | |
var valArray = []; | |
var sortArray = []; | |
for(var i=1;i<=arraylen(arguments.colorArray);i++) { | |
var color = replacenocase(arguments.colorArray[i], '##', '', 'ALL'); | |
if(len(color) == 6) { | |
var strRed = mid(color, 1, 2); | |
var strGreen = mid(color, 3, 2); | |
var strBlue = mid(color, 5, 2); |
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 output="false" { | |
public getQuery function init(required string dsn){ | |
variables.dsn = arguments.dsn; | |
return this; | |
} | |
// arg.sql String (required) - A SQL select statement to query | |
// arg.contentType Array (optional) - Array of obj with sqp query params having the keys name, value, and type. | |
// arg.label String (optional) - The label for the return (only applies if returnType is 'json'). Default is 'queryData' |
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 output='false' { | |
// init component | |
public callback_component function init(){ | |
return this; | |
}; | |
// this function implicitly takes 2 named arguments. In this case, the arguments scope | |
// can be treated as an object with name value pairs or an array with the index being | |
// equal to the position they are expected. This was probably part of the thinking when | |
// Jeremy and JJ Allaire decided not to use a zero index way back when... |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Auto Execute Section Starts Here;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;Allow only one instance to run | |
#SingleInstance force | |
#Persistent | |
;Set tray tip and tray menu |
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
<cfscript> | |
// serve content as mime type css | |
getPageContext().getResponse().setcontenttype('text/css;charset=utf-8'); | |
// supress whitespace with cfoutputonly | |
setting enablecfoutputonly="true"; | |
// example of url varialbe call: /rt.cfm?height=1.25&weight=bold | |
// structure of default values, if not received in url | |
variables.baseSize = { | |
lineHeight = (structkeyexists(url,'size')) ? url.height : 1.5, | |
fontWeight = (structkeyexists(url,'size')) ? url.weight : 'normal' |
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 (global) { | |
if ( !global.Event && !('keys' in Object) && !('bind' in Function) ) { return } | |
var eventProto = Event.prototype, | |
EVENTS = { | |
'mouse': [ 'click', 'dblclick', 'contextmenu', 'mousedown', 'mouseup', 'mouseover', 'mousemove', 'mouseout', 'drag', 'dragend', 'dragenter', 'dragleave', 'dragover', 'drop'], | |
'key': [ 'keydown', 'keypress', 'keyup', 'input'], | |
'res': [ 'load', 'unload', 'beforeunload', 'abort', 'error', 'resize', 'scroll', 'readystatechange' ], | |
'form': [ 'select', 'change', 'submit', 'reset', 'focus', 'blur' ], | |
'ui': [ 'DOMFocusIn', 'DOMFocusOut', 'DOMActivate', 'DOMCharacterDataModified', 'DOMNodeInserted', 'DOMNodeRemoved', 'DOMSubtreeModified' ], |