2010年10月17日 星期日

用CSS改變滑鼠指標

<span style="cursor:hand">手形</span>
<span style="cursor:crosshair">十字</span>
<span style="cursor:text" >文字游標</span>
<span style="cursor:wait" >等待</span>
<span style="cursor:default" >預設</span>
<span style="cursor:help" >問號</span>
<span style="cursor:e-resize" >左右箭頭</span>
<span style="cursor:s-resize" >上下箭頭</span>
<span style="cursor:auto" >系統自動給出效果</span>

2010年5月18日 星期二

Programmatic hot deploy with Jetty

  1. Create the server:
    Server jetty = new Server();

     

  2. Create a handlerCollection with a ContextHandlerCollection in it:
    HandlerCollection hc = new HandlerCollection ();
    ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection();
    hc.setHandlers(new Handler[]{contextHandlerCollection});
    jetty.setHandler(hc);

     

  3. Start the server:
    server.start();

     

  4. Hot deploy your web application:
    WebAppContext warWebappContext = new WebAppContext();
    //configure it ...
    contextHandlerCollection.addHandler(warWebappContext);
    warWebappContext.start();

     

  5. Hot undeploy your application:
    //get the WebAppContext to undeploy...
    WebAppContext toUndeploy = getWebAppContextToUndeploy();
    //stop it
    toUndeploy.stop();
    //and remove it from the handler collection
    contextHandlerCollection.removeHandler(toUndeploy);

    In a nutshell, the trick is to use a HandlerCollection for your WebAppContextHandler.
    source: http://www.bonitasoft.org/blog/tutorial/programmatic-hot-deploy-with-jetty/

2010年3月23日 星期二

Gigaspaces Notes

JVM fine-tune

http://www.gigaspaces.com/wiki/display/XAP7/Tuning+Java+Virtual+Machines

GigaSpaces fine-tune

http://www.gigaspaces.com/wiki/display/XAP7/Tuning+GigaSpaces+Performance

Windows network fine-tune

http://www.gigaspaces.com/wiki/display/XAP7/Tuning+Infrastructure

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"KeepAliveInterval"="1000"
"KeepAliveTime"="1000"

Rapid loading to address the CSV file loading performance.

http://www.gigaspaces.com/wiki/display/SBP/Rapid+Data+Load

First of all, please let your team to read http://www.gigaspaces.com/wiki/display/XAP7/Polling+Container . For your case, please read "Concurrent Consumers" session to configuration it work with more threads and it will increase the performance.

And also, the below links are useful since you are talking about GuangZhou business today:

Eucaplyptus

http://open.eucalyptus.com

Nati's blog are related to cloud computing

http://natishalom.typepad.com/nati_shaloms_blog/2010/01/the-missing-piece-in-the-virtualization-stack-part-1.html

http://natishalom.typepad.com/

Webinar - On Demand Middleware Services for the Enterprise - Coming Up in 2010

http://www.gigaspaces.com/resource/video

Please follow Nati's blog, from there you will learn more basic concepts of cloud computing not only GigaSpaces.

1. How to get the number of web request.

instance.getStatistics().getWebRequests().getTotal();

    instance is a jetty PU.

2. http://www.gigaspaces.com/wiki/display/XAP7/Administration+and+Monitoring+API

    To get the memory statistics ( Virtual machine and physical machine)

And also you can use this sample(Petclinic) codes:

http://www.openspaces.org/display/DAE/Project+Downloads

2009年11月6日 星期五

Change user profile path in windows xp

Changing the ProfileImagePath value in the registry
ProfileImagePath registry value
The ProfileList registry key contains some sub-keys, which are nothing but the list of User Account Security Identifiers (SID). Each of the SID represents an Account. The key is located here:

HKEY_LOCAL_MACHINE \ SOFTWARE\ Microsoft\ Windows NT \ CurrentVersion \ ProfileList

2009年7月20日 星期一

How to change JBoss default port

1. Open the JBoss Folder

2. Goto its Deploy folder.

3. Goto the jbossweb-tomcat55.sar

4. Find out the server.xml inside that folder. Actually this is the server configure file of the BuildIn Tomcat.

5. Find the folowing Tag

<Connector port="8080" address="${jboss.bind.address}"…….

6. Change the port number here.

7. Restart the server.

Jboss預設只能以127.0.0.1本機存取,如要改變binding address,啟動時指令如下:

run -c default -Djboss.bind.address=0.0.0.0

用run -h可查看help

2009年7月19日 星期日

Install PAE enabled kernel in 32 bit Ubuntu to use 4GB RAM

$ sudo apt-get update
$ sudo sudo apt-get install linux-headers-server linux-image-server linux-server
$ sudo reboot