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
//encode HTML markup-significant characters | |
// keepCharacterReferences: if true, the ampersands of HTML5 character references will not be encoded | |
function encodeHTML(str, keepCharacterReferences){ | |
"use strict"; | |
var namedChars, rxp; | |
if(keepCharacterReferences){ | |
//see http://www.w3.org/TR/html5/syntax.html#named-character-references | |
//this list excludes: AMP amp LT lt GT gt QUOT quot apos | |
namedChars = "Aacute|aacute|Abreve|abreve|ac|acd|acE|Acirc|acirc|acute|Acy|acy|AElig|aelig|af|Afr|afr|Agrave|agrave|alefsym|aleph|Alpha|alpha|Amacr|amacr|amalg|And|and|andand|andd|andslope|andv|ang|ange|angle|angmsd|angmsdaa|angmsdab|angmsdac|angmsdad|angmsdae|angmsdaf|angmsdag|angmsdah|angrt|angrtvb|angrtvbd|angsph|angst|angzarr|Aogon|aogon|Aopf|aopf|ap|apacir|apE|ape|apid|ApplyFunction|approx|approxeq|Aring|aring|Ascr|ascr|Assign|ast|asymp|asympeq|Atilde|atilde|Auml|auml|awconint|awint|backcong|backepsilon|backprime|backsim|backsimeq|Backslash|Barv|barvee|Barwed|barwed|barwedge|bbrk|bbrktbrk|bcong|Bcy|bcy|bdquo|beca |
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.multiColumnSelect optgroup, select.multiColumnSelect option { | |
font-family:"Courier New", Courier, monospace; | |
font-style:normal; | |
padding-left:3px; | |
} | |
select.multiColumnSelect optgroup { | |
font-weight:bold; | |
text-decoration:underline; | |
} |
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Encoder</title> | |
<script type="text/javascript" src="encoder.js"></script> |
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
Function TradRound(val As Double, Optional places As Integer) As Double | |
Dim divisor As Double | |
Dim val2 As Double | |
If IsMissing(places) Then places = 0 | |
divisor = 10 ^ places | |
val2 = val * divisor - Int(val * divisor) |
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
Function CDecForQuery(val) | |
CDecForQuery = CDec(val) | |
End Function |
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
Function max(ParamArray ListItems() As Variant) | |
Dim i As Integer | |
If UBound(ListItems) >= 0 Then | |
max = ListItems(0) | |
For i = 1 To UBound(ListItems) | |
If ListItems(i) > max Then max = ListItems(i) | |
Next i | |
End If |
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
'Get the value of the autonumber field for the last record inserted into an Access database via the current connection. | |
set rst = objConn.Execute("SELECT @@IDENTITY") | |
id = rst(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
//Regular Expressions for U.S. Phone Numbers | |
// | |
//See http://en.wikipedia.org/wiki/North_American_Numbering_Plan | |
// | |
//Spaces, dashes, or periods are allowed as separators. | |
//Extensions can be recognized by several strings: #, x, x., ext, ext., extension | |
// | |
//Area code: $1$2 | |
//Exchange code: $3 | |
//Station code: $4 |
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
.modalMask { | |
display:none; | |
} | |
.modalMask.active { | |
display:block; | |
position:fixed; | |
top:0; | |
left:0; | |
bottom:0; | |
right: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
/* just add either class .peel-br or .peel-tr to your bookmarklet link */ | |
a.peel-br, a.peel-tr { | |
display:inline-block; | |
position:relative; | |
padding:0.4em 0.6em; | |
border:1px solid #B4B4B4; | |
border-radius:5px; | |
background-color:#E6E6E6; | |
color:#333; |