Monday, September 29, 2008

Javascript editor for Eclipse

Recently I was searching for a plug-in for Javascript in Eclipse. And I come up find out a very good plug-in call: Skyway builder. It looks very promising to me. Some feature I like are Code-formating, auto-completion with diff js library such as JQuery, ExtJS...
The plug-in is free from non-commercial use and it is relatively cheap for commercial user.
It could be download at: Ext智能提示 - Eclipse 3.2

Monday, September 22, 2008

Calling a scripting function from .bash_login

This rather a very simple issue that i have encounter couple days ago. Yeah, I don't consider myself a console scripting guru. So don't sunrise if you see me to post this. ^_^.
So I have a function "conn_remote" define inside my .bash_login file, when started up the a terminal, I see that the .bash_login file is actually gotten read as it print "Welcome to to bash" (which I defined it in the .bash_login file); however, when i try to call the "conn_remote" function, it said "command not defined".
After some chatting with ppl in IRC, I realize the cause to this is because my .bash_login not defined as the source. So to solve this issue, I put a command "source .bash_login" whenever a new terminal is fired up, and after this is defined, i was able to call my function freely.

Thursday, September 11, 2008

Refresh a treepanel

An easy way to updatte a treepanel in Ext:

Ext.getCmp('treepanel_id'). getRootNode().reload();

Refer to:http://extjs.com/forum/showthread.php?t=23441 to get more info

Monday, September 08, 2008

Wednesday, September 03, 2008

Prototype: How to truncate a string

A very nice utility to truncate a string in prototype:

var test_string = "this is a test string/0";
var new_string = test_string.truncate(test_string.length- 2, '');

So the new_string should be "this is a test string. Remember though, don't ignore the second paremeter, which now specify there will not be any suffix.