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
/** | |
* @author Eric McCormick | |
* src: https://edm00se.io/xpages/consistent-multivalue-formatting/ | |
* @param java.util.Object to examine | |
* @return java.util.Vector of values from originating Object | |
**/ | |
var util = { | |
asVec: function(obj){ | |
switch(typeof obj){ | |
case "java.util.Vector": //it's already a Vector, just return it |
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
// forces IE9 and below to not use compatibility mode, and forces any registered as IE >=10 to act like 9 | |
if(context.getUserAgent().isIE()&&context.getUserAgent().getBrowserVersionNumber()<10) { | |
var exCon = facesContext.getExternalContext(); | |
var response = exCon.getResponse(); | |
response.setHeader("X-UA-Compatible", "IE=Edge"); | |
}else if(context.getUserAgent().isIE()&&context.getUserAgent().getBrowserVersionNumber()>9 || (context.getUserAgent().getUserAgent().indexOf('Trident/7') > -1 && context.getUserAgent().getUserAgent().indexOf('rv:11')){ | |
var exCon = facesContext.getExternalContext(); | |
var response = exCon.getResponse(); | |
response.setHeader("X-UA-Compatible", "IE=9"); | |
} |
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
//set up the app | |
var express = require('express'); | |
var app = express(); | |
//enables express-toobusy, which keeps it from melting under HIGH pressure | |
//app.use(require('express-toobusy')()); | |
//enables compress and prerender-node | |
//app.use(express.compress()); | |
//app.use(require('prerender-node')); |
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
.gist, .file-data { | |
width: 80% !important; | |
height: 300px !important; | |
} |
NewerOlder