Tue 24 Jun 2008

    Extjs Tree通过递归删除子节点

    Extjs Tree通过递归删除子节点信息:

    function removeChildrenRecursively(node) {
        if (!node) return;
        while (node.hasChildNodes()) {
            removeChildrenRecursively(node.firstChild);
            node.removeChild(node.firstChild);
        }
    }
    

    参考: http://www.realcoding.net/article/view/4557

    (Read more...)

    Tags: web, javascript, Extjs 评论(1) 阅读(576)

    Tue 17 Jun 2008

    javascript对时间格式化

    JavaScript通过原型函数的封装对時間格式化函數:

    <script>
        Date.prototype.format = function(format)
        {
            var o = {
                "M+" : this.getMonth()+1, //month
                "d+" : this.getDate(),    //day
                "h+" : this.getHours(),   //hour
                "m+" : this.getMinutes(), //minute
                "s+" : this.getSeconds(), //second
                "q+" : Math.floor((this.getMonth()+3)/3), //quarter

    (Read more...)

    Tags: web, javascript 评论(1) 阅读(526)

    Tue 03 Jun 2008

    Oracle-ORA-01045-错误

    1. 问题:
        在用PL/SQL进行登录时,出现:"ora-01045 :user system lacks create session privilege; logon denied"。
        
    2. 原因:没有权限
        在Google找到这段的说明:
        What does "ORA-01045: user USERNAME lacks CREATE SESSION privilege;
       logon denied" mean?
       
        It means that the username and password with which you tried to login are known and accepted by the oracle server, but that the usernam

    (Read more...)

    Tags: Oracle 评论(1) 阅读(328)

    Tue 03 Jun 2008

    Oracle计算时间差的方法

    Oracle计算时间差的方法。总结了一下:
    天:
    ROUND(TO_NUMBER(END_DATE - START_DATE))
    小时:
    ROUND(TO_NUMBER(END_DATE - START_DATE) * 24)
    分钟:
    ROUND(TO_NUMBER(END_DATE - START_DATE) * 24 * 60)
    秒:
    ROUND(TO_NUMBER(END_DATE - START_DATE) * 24 * 60 * 60)
    毫秒:
    ROUND(TO_NUMBER(END_DATE - START_DATE) * 24 * 60 * 60 * 60)

    --EOF--

    (Read more...)

    Tags: Oracle 评论(1) 阅读(548)