- http://blogs.esri.com/esri/arcgis/2010/06/23/five-things-to-consider-when-securing-arcgis-server/
- http://geochalkboard.wordpress.com/2010/12/13/using-a-proxy-page-with-the-arcgis-server-api-for-javascript/
- http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp/ags_proxy.htm#webprint
Tuesday, May 15, 2012
Secure the ArcGIS Server
References for securing the ArcGIS server:
Saturday, April 28, 2012
Small HTTP servers for Windows
Some mini size HTTP server software for Windows:
So what about ProxyPass in nginx? I will try on it tomorrow. Keep update soon.
For nginx, if you want to add an alias which point to another location which is not under the root directory, you can put the following in the nginx.conf:
location /web {
alias d:/Code/nginx_web;
}
This means for locations http://yourhost/web, it is pointing to d:\Code\nginx_web actually.
So what about ProxyPass in nginx? I will try on it tomorrow. Keep update soon.
Thursday, March 29, 2012
Java encoding : UTF-8, Big5, x-MS950-HKSCS
Suppose you got a file in Big5 containing some HKSCS characters (e.g. 深水埗, 赤鱲角, etc). When your environment (Ref: Charset.defaultCharset( ) ) is either UTF-8 / Big5, you will never get the things work.
The proper encoding should be "x-MS950-HKSCS"
This situation happens when I'm try the same pieces of code in Java console / Eclipse console and JSP @ Tomcat. While JSP works fine, but sucks in console mode. Finally I found the JSP is actually using encoding "x-MS950-HKSCS".
To set environment charset in Eclipse:
Right click on the file that you are going to execute (e.g. Testing.java), then "Properties" → "Run/Debug Settings" → "Common" → "Encoding". Type "x-MS950-HKSCS" in the field.
What a pity!
Monday, March 19, 2012
YUI LayoutUnit collapse
One can use layout.getUnitByPosition('left').collapse() and layout.getUnitByPosition('left').expand() to the layout units (except 'center' layout unit) in YUI's Layout.
Once the layout unit is collapsed, the size is determined by the attribute 'collapseSize'.
Anyway, YUI is something historical now.
Friday, March 9, 2012
Change Windows Update Server URL
Modify the Windows Registry to change the WSUS URL:
\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUServer
Ref: http://technet.microsoft.com/en-us/library/cc708554(v=ws.10).aspx
\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUServer
Ref: http://technet.microsoft.com/en-us/library/cc708554(v=ws.10).aspx
Regexp match with GenericValidator
Just a reminder to use GenericValidator for a quick way to do regexp matching in Java.
boolean rslt = org.apache.commons.validator.GenericValidator.matchRegexp(str, "(?i)abc|def|ghi");
boolean rslt = org.apache.commons.validator.GenericValidator.matchRegexp(str, "(?i)abc|def|ghi");
Wednesday, February 15, 2012
Using "define" function in Dojo
You may experienced an error message "define is not defined" when using Dojo I got this error when trying the dojo.i18n feature when I did a dojo.requireLocalization( ) call. In some occasions a pre-built version of Dojo just don't have the "define" function at all (sigh.. ridiculous!). To solve this problem, consider the following (Dojo 1.6):
<script>
dojo.ready(function() {
var currentModule;
define=function(d,b,c){function g(a){if(a.charAt(0)==="."){for(a=d.substring(0,d.lastIndexOf("/")+1)+a;b!==a;)var b=a,a=a.replace(/\/[^\/]*\/\.\.\//,"/");a=a.replace(/\/\.\//g,"/")}return a.replace(/\//g,".")}c||(b?(c=b,b=d):(c=d,b=typeof c=="function"?["require","exports","module"].slice(0,c.length):[]),d=currentModule?currentModule.replace(/\./g,"/"):"anon");var e=d.replace(/\//g,"."),h=dojo.provide(e);if(typeof c=="function"){for(var i=[],a,f=0;f<b.length;f++){a=g(b[f]);var j=a.indexOf("!");if(j> -1)a.substring(0,j)=="i18n"&&(a=a.match(/^i18n\!(.+)\.nls\.([^\.]+)$/),dojo.requireLocalization(a[1],a[2])),a=null;else switch(a){case "require":a=function(a){return dojo.require(g(a))};break;case "exports":a=h;break;case "module":var k=a={exports:h};break;case "dojox":a=dojo.getObject(a);break;case "dojo/lib/kernel":case "dojo/lib/backCompat":a=dojo;break;default:a=dojo.require(a)}i.push(a)}b=c.apply(null,i)}else b=c;b&&(dojo._loadedModules[e]=b,dojo.setObject(e,b));if(k)dojo._loadedModules[e]=k.exports; return b};define.vendor="dojotoolkit.org";define.version=dojo.version;define("dojo/lib/kernel",[],dojo);define("dojo/lib/backCompat",[],dojo);define("dojo",[],dojo);define("dijit",[],this.dijit||(this.dijit={}));
dojo.require("dojo.i18n");
dojo.registerModulePath("language", "/path_to/language");
</script>
Reference: http://dojo-toolkit.33424.n3.nabble.com/define-is-not-defined-in-dojo-build-tt3128408.html#a3241874
<script>
dojo.ready(function() {
var currentModule;
define=function(d,b,c){function g(a){if(a.charAt(0)==="."){for(a=d.substring(0,d.lastIndexOf("/")+1)+a;b!==a;)var b=a,a=a.replace(/\/[^\/]*\/\.\.\//,"/");a=a.replace(/\/\.\//g,"/")}return a.replace(/\//g,".")}c||(b?(c=b,b=d):(c=d,b=typeof c=="function"?["require","exports","module"].slice(0,c.length):[]),d=currentModule?currentModule.replace(/\./g,"/"):"anon");var e=d.replace(/\//g,"."),h=dojo.provide(e);if(typeof c=="function"){for(var i=[],a,f=0;f<b.length;f++){a=g(b[f]);var j=a.indexOf("!");if(j> -1)a.substring(0,j)=="i18n"&&(a=a.match(/^i18n\!(.+)\.nls\.([^\.]+)$/),dojo.requireLocalization(a[1],a[2])),a=null;else switch(a){case "require":a=function(a){return dojo.require(g(a))};break;case "exports":a=h;break;case "module":var k=a={exports:h};break;case "dojox":a=dojo.getObject(a);break;case "dojo/lib/kernel":case "dojo/lib/backCompat":a=dojo;break;default:a=dojo.require(a)}i.push(a)}b=c.apply(null,i)}else b=c;b&&(dojo._loadedModules[e]=b,dojo.setObject(e,b));if(k)dojo._loadedModules[e]=k.exports; return b};define.vendor="dojotoolkit.org";define.version=dojo.version;define("dojo/lib/kernel",[],dojo);define("dojo/lib/backCompat",[],dojo);define("dojo",[],dojo);define("dijit",[],this.dijit||(this.dijit={}));
dojo.require("dojo.i18n");
dojo.registerModulePath("language", "/path_to/language");
// OR you can try the following if you want a relative path
// dojo.registerModulePath("language", "../../../../../../language");
// Suppose you are using Main.js to define the language
dojo.requireLocalization("language","Main");
});
</script>
Reference: http://dojo-toolkit.33424.n3.nabble.com/define-is-not-defined-in-dojo-build-tt3128408.html#a3241874
Thursday, February 9, 2012
Solution for java.io.NotSerializableException error when Tomcat reloads
To solve the Tomcat restart error, add <Manager> setting in <Context> section:
<Manager className="org.apache.catalina.session.PersistentManager"
saveOnRestart="false">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>
References:
<Manager className="org.apache.catalina.session.PersistentManager"
saveOnRestart="false">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>
References:
Wednesday, February 8, 2012
JavaScript libraries list
Just wanna to find some list for JavaScript libraries collection, I only got one at this moment:
Thursday, February 2, 2012
HIde Account at Windows Login Screen
The following steps can hide user account in Windows login screen:
- Go to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList\, if key not exists, create them.
- Add DWORD registry
- Set name = User account name (e.g. demouser)
- Set value = 0
Done.
Subscribe to:
Posts (Atom)
Upgrade nodejs in conda (from v18 to v26)
If your conda env is nodejs v18, doing a conda install nodejs=26 is likely to create a lot of conflict. Consider remove those conflicting p...
-
When Office2003 couldn't find file SKU011.CAB: regedit -> [HKEY_LOCAL_MACHINE] -> [SOFTWARE] -> [Microsoft] -> [Office] -...
-
The resolution can be changed by editing the BlueStack's registry: HKLM\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0\Height and ...
-
Suppose you got a file in Big5 containing some HKSCS characters (e.g. 深水埗, 赤鱲角, etc). When your environment (Ref: Charset.defaultCharset( ) ...