Posts

Showing posts from February, 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...

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: http://blog.csdn.net/forandever/article/details/4553447 http://stackoverflow.com/questions/4232222/cannot-resolve-this-error-notserializableexception

JavaScript libraries list

Just wanna to find some list for JavaScript libraries collection, I only got one at this moment: JS Dev Tools -- A roundup of Javascript development tools and libraries

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.