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
cfsqltype(\s)?(=|:)(\s)?('|")(?!(cf_sql_bigint|cf_sql_bit|cf_sql_char|cf_sql_blob|cf_sql_clob|cf_sql_date|cf_sql_decimal|cf_sql_double|cf_sql_float|cf_sql_idstamp|cf_sql_integer|cf_sql_longnvarchar|cf_sql_longvarchar|cf_sql_money|cf_sql_money4|cf_sql_nchar|cf_sql_nclob|cf_sql_nvarchar|cf_sql_numeric|cf_sql_real|cf_sql_refcursor|cf_sql_smallint|cf_sql_sqlxml|cf_sql_time|cf_sql_timestamp|cf_sql_tinyint|cf_sql_varchar|bigint|bit|char|blob|clob|date|decimal|double|float|idstamp|integer|longnvarchar|longvarchar|money|money4|nchar|nclob|nvarchar|numeric|real|refcursor|smallint|sqlxml|time|timestamp|tinyint|varchar)('|")) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<ul> | |
<!-- If date is from a specific timezone to your local --> |
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> | |
headerList = "Sec-CH-UA-Arch,Sec-CH-UA-Full-Version,Sec-CH-UA-Mobile,Sec-CH-UA-Model,Sec-CH-UA-Platform-Version,Sec-CH-UA-Platform,Sec-CH-UA"; | |
cfheader(name:"Accept-CH",value:headerList); | |
for ( key in headerList ) | |
writeOutput(key & " : " & cgi[lcase(key)] & "<br />"); | |
</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
// requires moment.js and jQuery | |
/** | |
* @value A datetime string value formatted as 01/01/01 12:00:00 AM | |
*/ | |
function convertDateToLocal( value ){ | |
return moment( value.replace(/\s(GMT|UTC)/,'') ) | |
.add( moment().utcOffset(),'m' ) | |
.format( 'MM/DD/YYYY hh:mm:ss A' ); | |
} |
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
try{ | |
ftpsClient = CreateObject("java","org.apache.commons.net.ftp.FTPSClient").init(JavaCast("boolean",true)); | |
// set server address to connect to and begin | |
ftpsClient.connect("yourserver.com",990); | |
// set credentials | |
loggedIn = ftpsClient.login("username","password"); | |
if (loggedIn){ | |
//enter passive mode | |
ftpsClient.enterLocalPassiveMode(); | |
// Set protection buffer size |
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
// this is for example purpose only. Not actual values used | |
today = "01/01/2019"; | |
// use to work but generates an error now | |
createODBCDateTime(today & "23:59:59"); | |
// throws 01/01/201923:59:59 is an invalid date or time string. | |
// required fix ( add the required space ) | |
createODBCDateTime(today & " 23:59:59"); |
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
let _year = new Date().getYear()-100; | |
let _regex = new RegExp(`/${_year}$`); | |
document.querySelectorAll('.retableRow').forEach(a => { | |
let _date = a.querySelector('.date'); | |
if( !_regex.test(_date.innerText) ) | |
a.querySelector('.deleteBtn').click() | |
}) |
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
string function cleanEmoji(required string value){ | |
var gotourl = "/clean_emoji.php"; | |
var php = new http(url:gotourl,method:"post"); | |
php.addParam(type:"formfield",name:"value",value:arguments.value); | |
// Return trimmed response | |
return trim(php.send().getPrefix().fileContent); | |
} |
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
public string function cleanEmojiWithColdFusion(required string value){ | |
// Match Emoticons | |
var regexEmoticons = "[\x{1F600}-\x{1F64F}]"; | |
// Match Miscellaneous Symbols and Pictographs | |
var regexSymbols = "[\x{1F300}-\x{1F5FF}]"; | |
// Match Transport And Map Symbols | |
var regexTransport = "[\x{1F680}-\x{1F6FF}]"; | |
// Return cleaned and trimmed string | |
return arguments.value | |
.replaceAll(regexEmoticons,"") |
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
<?php | |
function removeEmoji($text) { | |
$clean_text = ""; | |
// Match Emoticons | |
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u'; | |
$clean_text = preg_replace($regexEmoticons, '', $text); | |
// Match Miscellaneous Symbols and Pictographs |
NewerOlder