<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    當(dāng)幸福來(lái)敲門(mén)

    我就會(huì)牢牢抓住!
    隨筆 - 50, 文章 - 3, 評(píng)論 - 8, 引用 - 0
    數(shù)據(jù)加載中……

    2012年1月12日

    需求工程師的工作內(nèi)容

    1.和業(yè)務(wù)部門(mén) 、客戶(hù)溝通(溝通是整個(gè)需求設(shè)計(jì)到開(kāi)發(fā)使用為止);
    2.學(xué)習(xí)業(yè)務(wù);
    3.有意識(shí)聽(tīng)速求(客戶(hù)最急需的),也就是優(yōu)先級(jí)問(wèn)題;
    4.搜集需求,整合,提煉,完成分析;(考慮周全找關(guān)聯(lián) 找核心)
    5.編寫(xiě)需求產(chǎn)品文檔(文字和圖列、流程圖等相結(jié)合)
    6.掌握相關(guān)工具;(比如visio/axure)
    7.文檔系統(tǒng)講解(講解對(duì)象:開(kāi)發(fā)和測(cè)試)
    8.驗(yàn)證開(kāi)發(fā)完后的產(chǎn)品(驗(yàn)證結(jié)束后再測(cè)試);
    9.用戶(hù)培訓(xùn)(需求工程師主持);
    10.了解相關(guān)系統(tǒng)(了解整個(gè)業(yè)務(wù)面 而不是 內(nèi)部的功能點(diǎn));

    注意:數(shù)據(jù)表設(shè)計(jì)中盡量存可分析的信息代碼;

    posted @ 2014-03-05 15:23 wyx 閱讀(201) | 評(píng)論 (0)編輯 收藏

    面試題積累

    1. struts1和struts2的區(qū)別
    2. hibernate和ibatis的區(qū)別
    3. json和xml的區(qū)別
    4. ajax的原理
    5. ajax和iframe嵌套有什么區(qū)別
    6. gbk utf8 iso-8859-1都是多少字節(jié)
    7. extjs和jquery的區(qū)別
    8. js從前端如何解決跨域問(wèn)題
    9. 單例模式的優(yōu)點(diǎn),工廠模式的原理
    10. spring的mvc模式
    11. jdk1.7新功能
    12. 為什么會(huì)出現(xiàn)亂碼

    posted @ 2014-03-04 15:35 wyx 閱讀(229) | 評(píng)論 (0)編輯 收藏

    Hibernate 查詢(xún)有關(guān)in的查詢(xún)

    http://www.iteye.com/problems/74892

    List<Integer> ids = new ArrayList<Integer>();
    ids.add(3);
    ids.add(4);
    ids.add(5);
    Query query=session.createQuery(from document where id in (:ids)); 
    query.setParameterList("ids", ids);
    query.list();

    posted @ 2013-11-18 17:42 wyx 閱讀(627) | 評(píng)論 (0)編輯 收藏

    用hibernate插入數(shù)據(jù)保證插入數(shù)據(jù)ID同步 ,插入之后返回對(duì)象

    public FDataReport addFDataReport(FDataReport datareport);//數(shù)據(jù)新錄入返回對(duì)象,對(duì)應(yīng)的就會(huì)把ID也返回

    posted @ 2013-11-04 17:43 wyx 閱讀(255) | 評(píng)論 (0)編輯 收藏

    關(guān)于登錄界面 記住用戶(hù)名和密碼的一段代碼

    Cookie cookies[]=request.getCookies();
        Cookie stCookie=null;
        String password=null;
        String passwordvalue=null;
        String usernamevalue=null;
        String cookiename = null;
        String nameandpassword[]=new String[3];
        if (cookies != null) {
       for (int i = 0; i < cookies.length; i++) {
        stCookie = cookies[i];
        cookiename = stCookie.getName();
        if (cookiename!=null && cookiename.equalsIgnoreCase("db_password")) {
         passwordvalue = stCookie.getValue();
         password = passwordvalue;//.substring(8, passwordvalue.length()-3);
         nameandpassword[1] = password.trim();
        }
        if (cookiename!=null && cookiename.equalsIgnoreCase("db_username")) {
         usernamevalue = stCookie.getValue();
         nameandpassword[0] = usernamevalue.trim();
        }
        }
     }





    <body>
    <p>
           <label for="LoginName">
            用戶(hù)名 / 郵箱:
           </label>
           <input class="text" type="text" id="LoginName" name="LoginName"
            value="<%=nameandpassword[0]==null?"":nameandpassword[0] %>" />
          </p>
          <p>
           <label for="Password">
            密碼:
           </label>
           <input class="text" type="password" value="<%=nameandpassword[1]==null?"":nameandpassword[1] %>" name="Password" id="Password" />
          </p>


    </body>

    posted @ 2013-11-01 15:08 wyx 閱讀(311) | 評(píng)論 (0)編輯 收藏

    form表單提交兩次原因

    昨天做用戶(hù)注冊(cè),添加用戶(hù)時(shí)候總是提交兩次
    最后才找到原因 提交表單的按鈕就是設(shè)置成button的了 但是名稱(chēng)是submitButton也不可以 所以修改下按鈕名稱(chēng)就可以了!!!
    ⊙﹏⊙b汗

    posted @ 2013-10-18 09:21 wyx 閱讀(426) | 評(píng)論 (0)編輯 收藏

    關(guān)于安全問(wèn)題——用戶(hù)中心

    1.當(dāng)用戶(hù)操作用戶(hù)中心的信息,編碼獲取用戶(hù)對(duì)象應(yīng)該是通過(guò)該用戶(hù)登錄保存的session或者cookie獲得,
    而不是通過(guò)用戶(hù)ID獲得(否則當(dāng)有人知道通過(guò)ID傳值,容易輕易修改掉其他用戶(hù)的信息)

    2.前臺(tái)下載也需要通過(guò)后臺(tái)處理 放置業(yè)內(nèi)人士知道下載文件真實(shí)地址,獲得大量數(shù)據(jù)信息

    posted @ 2013-09-04 17:13 wyx 閱讀(210) | 評(píng)論 (0)編輯 收藏

    FCKeditor 取值

    《轉(zhuǎn)自http://blog.sina.com.cn/s/blog_5f66526e0100kf6b.html

    主要步驟:

    第一步:導(dǎo)入需要的js文件(根據(jù)實(shí)際情況修改相應(yīng)路徑)
    <script src="js/jquery.js" type=text/javascript></script>   
    <script src="fckeditor/fckeditor.js" type="text/javascript"></script>
    第二步:初始化(根據(jù)實(shí)際情況修改相應(yīng)路徑)   

    sBasePath    = '/duotunkf/fckeditor/' ;#編輯器所在文件夾;
    oFCKeditor    = new FCKeditor('content') ;
    oFCKeditor.BasePath = sBasePath ;
    oFCKeditor.Value = 'test' ;
    oFCKeditor.ToolbarSet = 'Basic' ;
    oFCKeditor.Create() ;

    其中content為頁(yè)面你所綁定的textArea的id或name

    第三步:取值

    var oEditor = FCKeditorAPI.GetInstance('content');  
    editorValue = oEditor.GetHTML();  
    第四步:賦值(更新的時(shí)候先把原有的值賦給textarea)

    var oEditor = FCKeditorAPI.GetInstance('content');  
    oEditor.SetHTML("value"); 

     

    下面是本人寫(xiě)的一個(gè)賦值測(cè)試程序,供大家參考。源碼如下:

    <html>
     <head>

         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <script src="js/jquery-1.3.2.min.js"></script>
            <script src="fckeditor/fckeditor.js"></script>
            <script>
            $(document).ready(function(){
              $("#test").click(function(){
        var oEditor = FCKeditorAPI.GetInstance('content');  
        oEditor.SetHTML($("#test option:selected" ).text());
        });
      });
            </script>
     </head>
     <body>
      
      <form action="" method="post">
            <script>
                sBasePath    = '/duotunkf/fckeditor/' ;#編輯器所在文件夾;
                oFCKeditor   = new FCKeditor('content') ;
                oFCKeditor.BasePath = sBasePath ;
                oFCKeditor.Value = 'test' ;
                oFCKeditor.ToolbarSet = 'Basic' ;
                oFCKeditor.Create() ;
      </script>
       <br>
                <label for="test">
          <select name="test" size="4" id="test">
            <option value="1">i.點(diǎn)擊這里改變編輯器的值</option>
            <option value="2">ii.點(diǎn)擊這里改變編輯器的值</option>
            <option value="3">iii.點(diǎn)擊這里改變編輯器的值</option>
               </select>
              </label>
      </form>
     </body>
    </html>


    posted @ 2013-07-31 14:19 wyx 閱讀(182) | 評(píng)論 (0)編輯 收藏

    關(guān)于數(shù)據(jù)表建設(shè)的int 和 number varchar和nvarchar的區(qū)別


    提交了,剛才修正了一些問(wèn)題;一主鍵需要設(shè)置number類(lèi)型同時(shí)告訴擴(kuò)充到10
    管華(管華) 10:44:15
    你剛才是int類(lèi)型,,int最大是到6萬(wàn)多吧,,如果你設(shè)置這個(gè),意味著到時(shí)你到6萬(wàn)多的會(huì)員后,系統(tǒng)出問(wèn)題,插入不進(jìn)去了,到時(shí)你還得改;
    管華(管華) 10:45:46
    第二,你用的是字符VARCHAR2類(lèi)型,這個(gè);類(lèi)型在oracle里不太好,會(huì)持久化占用一部分空間,比如你設(shè)置的VARCHAR2(1000),他不管你里面有沒(méi)有數(shù)據(jù),都會(huì)占用這1000個(gè)字符的空間;因此需要改為NVARCHAR2 ,他是自適應(yīng),當(dāng)你沒(méi)存儲(chǔ)值,他不占據(jù)空間


    另外根據(jù)有些字段,比如人名  name  NVARCHAR2(20)分配20個(gè)字符就可了,分配500個(gè),會(huì)浪費(fèi)多余的空間同時(shí)使得系統(tǒng)慢碎片多;因此根據(jù)實(shí)際情況,酌情分配

    posted @ 2013-07-12 10:49 wyx 閱讀(331) | 評(píng)論 (0)編輯 收藏

    sql語(yǔ)句特殊字符處理

    update tc_report t set xlsfile='ChinaLivestock'||chr(38)||'FeedWeeklyMarketReport20130703.doc' where t.xlsfile like 'China Livestock & Feed Weekly Market Report 20130703%'

    posted @ 2013-07-04 10:36 wyx 閱讀(274) | 評(píng)論 (0)編輯 收藏

    Tomcat修改文件重啟問(wèn)題

    將tomcat下的bin\startup.bat下的文件打開(kāi)后,最下面有一句話  call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%,,復(fù)制我這個(gè)替換你那個(gè),保存后,即可實(shí)現(xiàn)不重啟就編譯java

    posted @ 2013-07-01 11:32 wyx 閱讀(176) | 評(píng)論 (0)編輯 收藏

    JavaBean中打印信息到JSP頁(yè)面

    http://blog.csdn.net/sclxf/article/details/4654080

    posted @ 2013-05-16 17:47 wyx 閱讀(164) | 評(píng)論 (0)編輯 收藏

    JS 獲得系統(tǒng)當(dāng)前時(shí)間和未來(lái)一周時(shí)間

    例子:

    function getDate(day){
       var zdate=new Date();
       var sdate=zdate.getTime()-(1*24*60*60*1000);
       var edate=new Date(sdate-(day*24*60*60*1000)).format("yyyy-MM-dd");
       return edate;
    }

     function changevalue(obj){
           alert(obj);
           var a = getDate(+7);
           var b = getDate(+31);
           if(obj=="8"){
           document.getElementById("enddate").value=b;
           }else{
           document.getElementById("enddate").value=a;
           }
     }

    posted @ 2013-05-08 15:54 wyx 閱讀(384) | 評(píng)論 (0)編輯 收藏

    轉(zhuǎn)換PDF遇到的問(wèn)題java.lang.UnsatisfiedLinkError: no jcom in java.library.path

    java.lang.UnsatisfiedLinkError: no jcom in java.library.path
    將 jcom.dll 文件放在  C:\WINDOWS\system32 和jdk的bin   目錄下

    posted @ 2013-04-10 16:14 wyx 閱讀(426) | 評(píng)論 (0)編輯 收藏

    BUG 調(diào)試 加入斷點(diǎn)但是跳轉(zhuǎn)時(shí)候沒(méi)有走

    設(shè)置問(wèn)題  Debug model選中

    posted @ 2013-04-03 15:34 wyx 閱讀(203) | 評(píng)論 (0)編輯 收藏

    投研項(xiàng)目 文檔 總結(jié)

    1.下載模塊:年鑒、研究報(bào)告、企業(yè)榜單和行業(yè)數(shù)據(jù)(需要權(quán)限控制)
    2.FTP使用:

    posted @ 2013-03-27 11:09 wyx 閱讀(267) | 評(píng)論 (0)編輯 收藏

    2013-03-13 項(xiàng)目開(kāi)發(fā) 總結(jié) 連載記錄

    1.針對(duì)不同類(lèi)型跳轉(zhuǎn)不同的action方法 除了使用JS以外  還可以 使用參數(shù)獲得參數(shù)例如method=....不同值來(lái)跳轉(zhuǎn)像不同的方法
    例子:分國(guó)別 (method="showCountryList")  分地區(qū)(method="showAreaList")  
            后臺(tái) String method = request.getParameter("method");
                 request.setAttribute("method", method);
        if (method != null && method.equals("showCountryList")) {
         return showCountryList(map, form, request, response);//分國(guó)別
       } else if (method != null && method.equals("showAreaList")) {
         return showAreaList(map, form, request, response);//分地區(qū)
       }
    2.Jsp........記得使用IFram嵌套
    <iframe width="100%" height="800" class="share_self"  frameborder="0" scrolling="no" src="/tyreportAction.do?method=lookReportInfo&bid=${record.bid } "></iframe>
     總結(jié):思維要活躍些  往往一個(gè)問(wèn)題有很多種解決方法的

    posted @ 2013-03-13 09:38 wyx 閱讀(172) | 評(píng)論 (0)編輯 收藏

    大文本值CLOB取值 和 存值

    存值
     Clob  organdetail =Hibernate.createClob(request.getParameter("organdetail").equals("")?"":request.getParameter("organdetail").trim());// 機(jī)構(gòu)簡(jiǎn)介
       取值 顯示JSP
    <%=ToolsCommon.Clob2String(institutions.getOrgandetail())==null?"":ToolsCommon.Clob2String(institutions.getOrgandetail())%>


     public static String Clob2String(java.sql.Clob clob) {
      String s1 = "";
      char ac[] = new char[200];

      if (clob == null)
       return null;
      java.io.Reader reader = null;
      int i;
      try {
       reader = clob.getCharacterStream();
       while ((i = reader.read(ac, 0, 200)) != -1)
        s1 = s1 + new String(ac, 0, i);
      } catch (Exception exception1) {
       // throw new java.sql.SQLException(exception1.getMessage());
       System.out.println(exception1.toString());
      }

      finally {
       try {
        reader.close();
       } catch (Exception _ex) {
       }
      }
      return s1;

     }

    posted @ 2013-02-28 10:20 wyx 閱讀(361) | 評(píng)論 (0)編輯 收藏

    Java 刪除文件夾 和 文件 集合

    《此文拷貝自http://kxjhlele.iteye.com/blog/323657

    1,驗(yàn)證傳入路徑是否為正確的路徑名(Windows系統(tǒng),其他系統(tǒng)未使用)


    // 驗(yàn)證字符串是否為正確路徑名的正則表達(dá)式
    private static String matches = "[A-Za-z]:\\\\[^:?\"><*]*";
    // 通過(guò) sPath.matches(matches) 方法的返回值判斷是否正確
    // sPath 為路徑字符串

    2,通用的文件夾或文件刪除方法,直接調(diào)用此方法,即可實(shí)現(xiàn)刪除文件夾或文件,包括文件夾下的所有文件


        /**
         *  根據(jù)路徑刪除指定的目錄或文件,無(wú)論存在與否
         *@param sPath  要?jiǎng)h除的目錄或文件
         *@return 刪除成功返回 true,否則返回 false。
         */
        public boolean DeleteFolder(String sPath) {
            flag = false;
            file = new File(sPath);
            // 判斷目錄或文件是否存在
            if (!file.exists()) {  // 不存在返回 false
                return flag;
            } else {
                // 判斷是否為文件
                if (file.isFile()) {  // 為文件時(shí)調(diào)用刪除文件方法
                    return deleteFile(sPath);
                } else {  // 為目錄時(shí)調(diào)用刪除目錄方法
                    return deleteDirectory(sPath);
                }
            }
        }

    3,實(shí)現(xiàn)刪除文件的方法,

        /**
         * 刪除單個(gè)文件
         * @param   sPath    被刪除文件的文件名
         * @return 單個(gè)文件刪除成功返回true,否則返回false
         */
        public boolean deleteFile(String sPath) {
            flag = false;
            file = new File(sPath);
            // 路徑為文件且不為空則進(jìn)行刪除
            if (file.isFile() && file.exists()) {
                file.delete();
                flag = true;
            }
            return flag;
        }

    4,實(shí)現(xiàn)刪除文件夾的方法,

        /**
         * 刪除目錄(文件夾)以及目錄下的文件
         * @param   sPath 被刪除目錄的文件路徑
         * @return  目錄刪除成功返回true,否則返回false
         */
        public boolean deleteDirectory(String sPath) {
            //如果sPath不以文件分隔符結(jié)尾,自動(dòng)添加文件分隔符
            if (!sPath.endsWith(File.separator)) {
                sPath = sPath + File.separator;
            }
            File dirFile = new File(sPath);
            //如果dir對(duì)應(yīng)的文件不存在,或者不是一個(gè)目錄,則退出
            if (!dirFile.exists() || !dirFile.isDirectory()) {
                return false;
            }
            flag = true;
            //刪除文件夾下的所有文件(包括子目錄)
            File[] files = dirFile.listFiles();
            for (int i = 0; i < files.length; i++) {
                //刪除子文件
                if (files[i].isFile()) {
                    flag = deleteFile(files[i].getAbsolutePath());
                    if (!flag) break;
                } //刪除子目錄
                else {
                    flag = deleteDirectory(files[i].getAbsolutePath());
                    if (!flag) break;
                }
            }
            if (!flag) return false;
            //刪除當(dāng)前目錄
            if (dirFile.delete()) {
                return true;
            } else {
                return false;
            }
        }

    5,main() 方法


        public static void main(String[] args) {

            HandleFileClass hfc = new HandleFileClass();
            String path = "D:\\Abc\\123\\Ab1";
            boolean result = hfc.CreateFolder(path);
            System.out.println(result);
            path = "D:\\Abc\\124";
            result = hfc.DeleteFolder(path);
            System.out.println(result);

        }


    main() 方法只是做了一個(gè)簡(jiǎn)單的測(cè)試,建立文件夾和文件都是本地建立,情況考慮的應(yīng)該很全面了,包括文件夾包含文件夾、文件。文件的不同情況…………

     

    實(shí)現(xiàn)沒(méi)有問(wèn)題,可以正確刪除文件夾和文件。

     

    對(duì)于其他類(lèi)型文件的操作繼續(xù)學(xué)習(xí)…………




    posted @ 2013-01-18 15:58 wyx 閱讀(300) | 評(píng)論 (0)編輯 收藏

    JFreechar

    http://m.tkk7.com/amigoxie/archive/2007/09/30/149765.html

    posted @ 2012-12-26 15:51 wyx 閱讀(187) | 評(píng)論 (0)編輯 收藏

    orcle修改屬性字段 并且保留原有值

    1.原字段類(lèi)型是字符串 使用“||”連接
    update table1 set num = substr(num,0,instr(num,'-'))||(substr(num,instr(num,'-')+1) +9) 
    2.原字段是數(shù)字 使用+連接
    UPDATE table1SET num = num+10 
    3.截取 update tc_report t set xlsfile=substr(xlsfile,6) where xlsfile like '%uku\%'

    posted @ 2012-11-12 10:20 wyx 閱讀(329) | 評(píng)論 (0)編輯 收藏

    form表單 修改 多選框默認(rèn)選中

    1.放到HashMap中
      String varsort=exp.getVarsort();
       String vars[]=null;
       HashSet setvar = new HashSet();
       if(varsort!=null&&!varsort.trim().equals("")){
        vars=varsort.substring(0,varsort.length()-1).split(",");
        for(int i=0;i<vars.length;i++){
         setvar.add(vars[i].trim());
        }
       }
    2. contains比較是否包含
    <% if(varsorts!=null&&varsorts.size()>0){
               for(int j=0;j<varsorts.size();j++){
                TDictionarys td=varsorts.get(j);
                %>
             <input type="checkbox" value="<%=td.getDataid() %>" <%if(setvar.contains(String.valueOf(td.getDataid()).trim())){out.print("checked");} %> onclick="getBreeds()" name="varsort" id="varsort" />
             <label for="checkbox" class="font12">
             <%=td.getName() %>
                </label>
                <%
               }
              }
             %>
            

    posted @ 2012-09-21 18:03 wyx 閱讀(1328) | 評(píng)論 (1)編輯 收藏

    頁(yè)面級(jí)緩存處理

    前提  列表走了數(shù)據(jù)庫(kù)查詢(xún)
    1.引入架包  <%@ taglib uri="oscache" prefix="cache"%>
    2.包含要緩存的部分
    <cache:cache key="dbnewscache" time="3600">  
            <%List<Article> list=new CmsByMysql().getNews(); %>
              <c:forEach var="cu" items="<%=list%>">
                   <li>
              <a href="${cu.url}">${cu.titleContent} </a>
                </li>
              </c:forEach>
    </cache:cache>

    posted @ 2012-09-21 17:25 wyx 閱讀(226) | 評(píng)論 (0)編輯 收藏

    Ifram 父子頁(yè)面 JS調(diào)用

    <iframe marginwidth="0" framespacing="0" marginheight="0" frameborder="0"
    name="uploadframe" id="uploadframe" src="c.html" scrolling="no" width="100" height="100" ></iframe>
    如想在c.html 中寫(xiě)一些代碼去改變parent.html 中的一些內(nèi)容,以下代碼可作為參考:

    1、parent.window.frames 可返回parent.html 中所有的iframe;返回結(jié)果應(yīng)該是一個(gè)數(shù)組,用parent.window.frames[iframeId]可得到iframeId;

    2、用parent.document.getElementById('xxxx')可得到父里的xxxx,并改變相應(yīng)的值,例如:parent.document.getElementById('xxxx').className = 'test';

    3、如果我想在父中再創(chuàng)建一個(gè)元素,直接用parent.appendChild(yyyy)在firefox中是可以的,但在IE(最起碼IE6)是不行的; 所以,要把創(chuàng)建這個(gè)動(dòng)作放在父中來(lái)完成,在子中調(diào)用;

     parent.document.getElementById("pinming").innerHTML = retText2;

    posted @ 2012-07-24 15:29 wyx 閱讀(715) | 評(píng)論 (0)編輯 收藏

    jquery目錄樹(shù) js實(shí)現(xiàn) 目錄數(shù)插件

    2011-07-13 10:07

    jQuery 目錄樹(shù)插件介紹——ligerTree

     

     

    一,簡(jiǎn)介 

    ligerTree的功能列表:

    1,支持本地?cái)?shù)據(jù)和服務(wù)器數(shù)據(jù)(配置data或者url)

    2,支持原生html生成Tree

    3,支持動(dòng)態(tài)獲取增加/修改/刪除節(jié)點(diǎn)

    4,支持大部分常見(jiàn)的事件

    5,支持獲取選中行等常見(jiàn)的接口方法

     

    二,第一個(gè)例子

    引入庫(kù)文件

    遵循LigerUI系列插件的設(shè)計(jì)原則(插件盡量單獨(dú)),ligerTree是一個(gè)單獨(dú)的插件,也就是說(shuō)只需要引入plugins/ligerTree.js和樣式css文件就可以使用(當(dāng)然必須先引入jQuery),在這個(gè)例子中,我把tree用到的樣式和圖片分離了出來(lái),有興趣的朋友可以下載來(lái)看看

      

    <script src="lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <link href="lib/ligerUI/skins/Aqua/css/ligerui-tree.css" rel="stylesheet" type="text/css"/>
    <script src="lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>

    加入HTML

      

    <ul id="tree1">
    <li>
    <span>節(jié)點(diǎn)1</span>
    <ul>
    <li>
    <span>節(jié)點(diǎn)1.1</span>
    <ul>
    <li><span>節(jié)點(diǎn)1.1.1</span></li>
    <li><span>節(jié)點(diǎn)1.1.2</span></li>
    </ul>
    </li>
    <li><span>節(jié)點(diǎn)1.2</span></li>
    </ul>
    </li>
    </ul>

    調(diào)用ligerTree

    <table style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; outline-width: 0px !important; outline-style: initial !important; outline-color: initial !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; text-align: left !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: inherit !important; border-collapse: collapse !important; background-position: initial initial !important; background-repeat: initial initial !important; "><td style="font-size: 1em !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0.5em !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: initial !important; border-style: initial !important; border-color: initial !important; outline-width: 0px !important; outline-style: initial !important; outline-color: initial !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; text-align: left !important; float: none !important; vertical-align: top !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: normal !important; font-style: normal !important; min-height: inherit !important; border-left-style: none !important; border-left-color: initial !important; color: rgb(0, 0, 0) !important; background-position: initial initial !important; background-repeat: initial initial !important; ">$("#tree1").ligerTree();

    效果圖

    三,常用場(chǎng)景

    場(chǎng)景一:不使用復(fù)選框: 

    $("#tree2").ligerTree({ checkbox: false });

    場(chǎng)景二:不使用復(fù)習(xí)框和圖標(biāo): 

    $("#tree3").ligerTree({ checkbox: false, parentIcon: null, childIcon: null });

    效果如圖:

    ?

    append(parentNode, newdata)增加節(jié)點(diǎn)集合clear()清空collapseAll()全部節(jié)點(diǎn)都折疊demotion(treenode)降級(jí)為葉節(jié)點(diǎn)級(jí)別expandAll()全部節(jié)點(diǎn)都展開(kāi)getChecked()獲取選擇的行(復(fù)選框)getData()獲取樹(shù)的數(shù)據(jù)源getParentTreeItem(treenode, level)獲取父節(jié)點(diǎn)getSelected()獲取選擇的行hasChildren(treenode)是否包含子節(jié)點(diǎn) loadData(node, url, param)加載數(shù)據(jù)remove(node)刪除節(jié)點(diǎn)upgrade(treenode)升級(jí)為父節(jié)點(diǎn)級(jí)別

    posted @ 2012-07-04 16:59 wyx 閱讀(2096) | 評(píng)論 (1)編輯 收藏

    讀取 文本 文件內(nèi)容 FileInputStream 亂碼處理

      StringBuffer content = new StringBuffer();
    //  FileInputStream fis = null;
    //  byte[] b = new byte[2048];
    //  try {
    //    if(lang!=null&&lang.trim().equals("10")){
    //     fis = new FileInputStream(passwordTemplatePath);
    //     }else if(lang!=null&&lang.trim().equals("20")){
    //      fis = new FileInputStream(passwordTemplateEnPath);
    //     }else if(lang!=null&&lang.trim().equals("30")){
    //      fis = new FileInputStream(passwordTemplateChinaEnPath);
    //     }
    //     int m = 0;
    //   while ((m = fis.read(b)) != -1) {
    //    content.append(new String(b, 0, m));
    //   }
    //passwordTemplatePath 文本 文件地址
      BufferedReader br = null;
      try {
        if(lang!=null&&lang.trim().equals("10")){
             br =  new BufferedReader(new InputStreamReader(new FileInputStream(passwordTemplatePath), "utf-8"));
          }else if(lang!=null&&lang.trim().equals("20")){
           br =  new BufferedReader(new InputStreamReader(new FileInputStream(passwordTemplateEnPath), "utf-8"));
         }else if(lang!=null&&lang.trim().equals("30")){
            br =  new BufferedReader(new InputStreamReader(new FileInputStream(passwordTemplateChinaEnPath), "utf-8"));
          }
        String s = null;
        while ((s = br.readLine()) != null) {
        content.append(s);
       }
      } catch (Exception e) {
       e.printStackTrace();
      } finally {
       try {
        br.close();
       } catch (IOException e) {
        e.printStackTrace();
       }
      }

    posted @ 2012-06-26 17:15 wyx 閱讀(2111) | 評(píng)論 (2)編輯 收藏

    線程等待問(wèn)題處理

    class MyThread implements Runnable {
    @Override
    public void run() {
      System.out.println("1、進(jìn)入run()方法休眠");
      try {
       System.out.println("2、線程休眠20秒");
       Thread.sleep(20000);//這里休眠20秒
       System.out.println("3、線程正常休眠完畢");
      } catch (InterruptedException e) {
       System.out.println("4、線程發(fā)生異常休眠被中斷");
       return;//返回方法調(diào)用處
      }
      System.out.println("5、線程正常結(jié)束run()方法體");
    }
    }
    public class InterruptDemo {

    public static void main(String[] args) {
      MyThread mt = new MyThread();
      Thread t = new Thread(mt,"線程A");
      t.start();//啟動(dòng)線程
    //========================================================
      try {
       Thread.sleep(2000);  //保證線程至少執(zhí)行2秒
      } catch (InterruptedException e) {
       e.printStackTrace();
      }
    //========================================================
      t.interrupt();//中斷線程
    }
    }

    posted @ 2012-06-21 15:21 wyx 閱讀(197) | 評(píng)論 (0)編輯 收藏

    "Mon Dec 28 00:00:00 CST 2008"的格式字符串轉(zhuǎn)換 yyyy-MM-dd 格式

    public static void main(String[] args)
     {
       try {
          java.util.Date date;
          // 首先設(shè)置"Mon Dec 28 00:00:00 CST 2008"的格式,用來(lái)將其轉(zhuǎn)化為Date對(duì)象
          DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);

          //將已有的時(shí)間字符串轉(zhuǎn)化為Date對(duì)象
          date = df.parse("Tue Jun 19 00:00:00 CST 2012");// 那天是周一
          // 創(chuàng)建所需的格式
          df = new SimpleDateFormat("yyyy-MM-dd");
          String str = df.format(date);// 獲得格式化后的日期字符串
          System.err.println(str);// 打印最終結(jié)果
         } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
         }


     }

    posted @ 2012-06-19 16:12 wyx 閱讀(6981) | 評(píng)論 (1)編輯 收藏

    JAVA開(kāi)發(fā)者最常去的25個(gè)英文網(wǎng)站 (轉(zhuǎn)載http://handawei.iteye.com/blog/675034)

  • http://www.infoq.com/ - Info IT新聞
  • http://www.apache.org/ - Apache基金會(huì)
  • http://www.springsource.org/ - 廣大Java開(kāi)發(fā)者喜愛(ài)的Spring
  • http://www.hibernate.org/ - 開(kāi)源ORM框架
  • http://sourceforge.net/ - 開(kāi)源技術(shù)的集結(jié)地
  • http://www.javaalmanac.com – Java開(kāi)發(fā)者年鑒一書(shū)的在線版本. 要想快速查到某種Java技巧的用法及示例代碼, 這是一個(gè)不錯(cuò)的去處.
  • http://www.onjava.com – O’Reilly的Java網(wǎng)站. 每周都有新文章.
  • http://java.sun.com – 官方的Java開(kāi)發(fā)者網(wǎng)站 – 每周都有新文章發(fā)表.
  • http://www.developer.com/java – 由Gamelan.com 維護(hù)的Java技術(shù)文章網(wǎng)站.
  • http://www.java.net – Sun公司維護(hù)的一個(gè)Java社區(qū)網(wǎng)站.
  • http://www.builder.com – Cnet的Builder.com網(wǎng)站 – 所有的技術(shù)文章, 以Java為主.
  • http://www.ibm.com/developerworks/java – IBM的Developerworks技術(shù)網(wǎng)站; 這是其中的Java技術(shù)主頁(yè).
  • http://www.javaworld.com – 最早的一個(gè)Java站點(diǎn). 每周更新Java技術(shù)文章.
  • http://www.devx.com/java – DevX維護(hù)的一個(gè)Java技術(shù)文章網(wǎng)站.
  • http://www.fawcette.com/javapro – JavaPro在線雜志網(wǎng)站.
  • http://www.sys-con.com/java – Java Developers Journal的在線雜志網(wǎng)站.
  • http://www.javadesktop.org – 位于Java.net的一個(gè)Java桌面技術(shù)社區(qū)網(wǎng)站.
  • http://www.theserverside.com – 這是一個(gè)討論所有Java服務(wù)器端技術(shù)的網(wǎng)站.
  • http://www.jars.com – 提供Java評(píng)論服務(wù). 包括各種framework和應(yīng)用程序.
  • http://www.jguru.com – 一個(gè)非常棒的采用Q&A形式的Java技術(shù)資源社區(qū).
  • http://www.javaranch.com – 一個(gè)論壇,得到Java問(wèn)題答案的地方,初學(xué)者的好去處。
  • http://www.ibiblio.org/javafaq/javafaq.html – comp.lang.java的FAQ站點(diǎn) – 收集了來(lái)自comp.lang.java新聞組的問(wèn)題和答案的分類(lèi)目錄.
  • http://java.sun.com/docs/books/tutorial/ – 來(lái)自SUN公司的官方Java指南 – 對(duì)于了解幾乎所有的java技術(shù)特性非常有幫助.
  • http://www.javablogs.com – 互聯(lián)網(wǎng)上最活躍的一個(gè)Java Blog網(wǎng)站.
  • http://java.about.com/ – 來(lái)自About.com的Java新聞和技術(shù)文章網(wǎng)站.
  • posted @ 2012-06-15 15:44 wyx 閱讀(205) | 評(píng)論 (0)編輯 收藏

    EL表達(dá)式處理字符串 是否 包含 某字符串 截取 拆分...............

    JSP頁(yè)面頁(yè)頭添加
    <%@ taglib uri="/WEB-INF/taglib/c.tld" prefix="c"%>
    <%@ taglib prefix="fn" uri="頁(yè)面內(nèi)容如下: 

    <c:if test="${fn:contains(record.name,'樣例')==false}">
                                     <%
             if ((f != null && f.trim().equals("0"))&&name!=null&&!name.trim().equals("免費(fèi)報(bào)告")) {
            %><a
             href="javascript:void(0);alert('很抱歉,您無(wú)權(quán)訪問(wèn)!如需訪問(wèn)請(qǐng)購(gòu)買(mǎi)產(chǎn)品或聯(lián)系管理員...');">
             ${record.name} </a>
            <%
             } else {
            %>
            <a
             href="/tcreportAction.do?method=lookReportInfo&bid=${record.bid } ">${record.name}</a>
            <%
             }
            %>
             </c:if>
               <c:if test="${fn:contains(record.name,'樣例')}">
                                       <a
             href="/tcreportAction.do?method=lookReportInfo&bid=${record.bid } ">${record.name}</a>
           
                                     </c:if>



    ${wjcd.lrsj}原來(lái)得到的是如2006-11-12 11:22:22.0

    ${fn:substring(wjcd.lrsj, 0, 16)}

    使用functions函數(shù)來(lái)獲取list的長(zhǎng)度

    ${fn:length(list)}

     

     

     

    1. fn:contains(string, substring)   
    2. 假如參數(shù)string中包含參數(shù)substring,返回true   
    3.   
    4. fn:containsIgnoreCase(string, substring)   
    5. 假如參數(shù)string中包含參數(shù)substring(忽略大小寫(xiě)),返回true   
    6.   
    7. fn:endsWith(string, suffix)   
    8. 假如參數(shù) string 以參數(shù)suffix結(jié)尾,返回true   
    9.   
    10. fn:escapeXml(string)   
    11. 將有非凡意義的XML (和HTML)轉(zhuǎn)換為對(duì)應(yīng)的XML character entity code,并返回   
    12.   
    13. fn:indexOf(string, substring)   
    14. 返回參數(shù)substring在參數(shù)string中第一次出現(xiàn)的位置   
    15.   
    16. fn:join(array, separator)   
    17. 將一個(gè)給定的數(shù)組array用給定的間隔符separator串在一起,組成一個(gè)新的字符串并返回。   
    18.   
    19. fn:length(item)   
    20. 返回參數(shù)item中包含元素的數(shù)量。參數(shù)Item類(lèi)型是數(shù)組、collection或者String。假如是String類(lèi)型,返回值是String中的字符數(shù)。   
    21.   
    22. fn:replace(string, before, after)   
    23. 返回一個(gè)String對(duì)象。用參數(shù)after字符串替換參數(shù)string中所有出現(xiàn)參數(shù)before字符串的地方,并返回替換后的結(jié)果   
    24.   
    25. fn:split(string, separator)   
    26. 返回一個(gè)數(shù)組,以參數(shù)separator 為分割符分割參數(shù)string,分割后的每一部分就是數(shù)組的一個(gè)元素   
    27.   
    28. fn:startsWith(string, prefix)   
    29. 假如參數(shù)string以參數(shù)prefix開(kāi)頭,返回true   
    30.   
    31. fn:substring(string, begin, end)   
    32. 返回參數(shù)string部分字符串, 從參數(shù)begin開(kāi)始到參數(shù)end位置,包括end位置的字符   
    33.   
    34. fn:substringAfter(string, substring)   
    35. 返回參數(shù)substring在參數(shù)string中后面的那一部分字符串   
    36.   
    37. fn:substringBefore(string, substring)   
    38. 返回參數(shù)substring在參數(shù)string中前面的那一部分字符串   
    39.   
    40. fn:toLowerCase(string)   
    41. 將參數(shù)string所有的字符變?yōu)樾?xiě),并將其返回   
    42.   
    43. fn:toUpperCase(string)   
    44. 將參數(shù)string所有的字符變?yōu)榇髮?xiě),并將其返回   
    45.   
    46. fn:trim(string)   
    47. 去除參數(shù)string 首尾的空格,并將其返回 


    截取字符串!使用!

     
    <c:if test="${fn:length(onebeans.info)>100 }">${ fn:substring( onebeans.info ,0,100)} ...</c:if>
     <c:if test="${fn:length(onebeans.info)<=100 }">${  onebeans.info }</c:if>


    posted @ 2012-06-14 14:38 wyx 閱讀(29475) | 評(píng)論 (0)編輯 收藏

    Enter回車(chē) 鍵盤(pán)事件 終止提交表單方法 終止執(zhí)行submit

    終止執(zhí)行submit
    <form name="myf" action="/....."> 
    <input name="pmcode" id="pmcode" value="<%=pmcode%>"
                type="text" class="shuihao" onkeydown="if(event.keyCode==13){event.keyCode = 9 ;searchCodes();return false;}" size="20" maxlength="20" />
    </form>
     當(dāng)回車(chē)的時(shí)候 將鍵盤(pán)碼變成別的  例如 If( event.keyCode == 13) event.keyCode = 9 之類(lèi)。

    posted @ 2012-05-17 11:20 wyx 閱讀(293) | 評(píng)論 (0)編輯 收藏

    js傳以 0 開(kāi)頭的值問(wèn)題解決

      msg+="<li id=\""+codes[i].value+"\" name=\""+codes[i].value+"\" ><INPUT class=\"ac\" onclick=\"javascript:nextSetcode('"+codes[i].value+"');oper('"+codes[i].value+"');\" type=\"button\" name=\"codes\" value=\""+codes[i].value+"\" /></li>";
    動(dòng)態(tài)參數(shù)據(jù) JS方法加 單引號(hào)  方法如上

    posted @ 2012-05-11 10:37 wyx 閱讀(920) | 評(píng)論 (0)編輯 收藏

    JSP中實(shí)現(xiàn)添加一行,刪除一行操作

    <%@ page language="java" import="java.util.*" pageEncoding="GBK"%>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <SCRIPT type="text/javascript">
    function numberCells()
    {
        var count=0;
        for (i=0; i < document.all.Tab.rows.length; i++)
        {
            for (j=0; j < document.all.Tab.rows(i).cells.length; j++)
            {
                document.all.Tab.rows(i).cells(j).innerText = count;
                count++;
            }
        }
    }

    function tb_addnew()
    {
    var ls_t=document.all("Tab")
    maxcell=ls_t.rows(0).cells.length;
    mynewrow = ls_t.insertRow();
        for(i=0;i <maxcell;i++)
        {
    mynewcell=mynewrow.insertCell();
    mynewcell.innerText="a"+i;

        }
    }

    function tb_delete()
    {
    var ls_t=document.all("Tab");

    ls_t.deleteRow() ;
    }

    </SCRIPT>
    <html>
     <head>
     <script type="text/javascript">
      function addRow(TabId){
      //獲取要插入行的表格
      var table = document.getElementByIdx_x(TabId);
       //在最后一行插入一行
       var newRow = table.insertRow(table.rows.length);
        //在該行插入單元格
        var newCel1 = newRow.insertCell(0);
         var newCel2 = newRow.insertCell(1);
         var newCel3 = newRow.insertCell(2);
         newCel1.innerHTML = "第一列";
         newCel2.innerHTML = "第二列";
         newCel3.innerHTML = "第三列";
         }
         </script>
     </head>
     <body>
      <center>
       <table id="Tab" border="1" cellspacing="0" cellpadding="0">
        <tr>
         <td>
          第一列
         </td>
         <td>
          第二列
         </td>
         <td>
          第三列
         </td>
       </table>
       <br>
       <input type="button" onclick="addRow('Tab');" value="插入行"/>
       <input type="button" onclick="tb_delete();" value="刪除行"/>
       <input type="button" onclick="tb_addnew();" value="添加行"/>
       <input type="button" onclick="numberCells();" value="顯示單元個(gè)數(shù)"/>
       
      </center>
     </body>
    </html>

    posted @ 2012-03-21 16:52 wyx 閱讀(3077) | 評(píng)論 (1)編輯 收藏

    FineReport學(xué)習(xí)(一)

    設(shè)置單元格的顯示格式 :
      單擊單元格右鍵——樣式——自定義 就OK了
    輸出保存各種文件格式:導(dǎo)航欄,文件——輸出
    http://www.finereport.com/knowledge/faq

    posted @ 2012-03-12 16:06 wyx| 編輯 收藏

    A.jsp iframe B.jsp 子頁(yè)面調(diào)用父頁(yè)面控件

    parent.function()  就可以通過(guò)B.jsp去調(diào)用A。jsp的函數(shù)

    在B.jsp中通過(guò)javascript代碼中可以通過(guò)parent對(duì)象來(lái)訪問(wèn)A.jsp中的內(nèi)容。在A.jsp中寫(xiě)的代碼差不多,只要加上"parent."前綴就可以訪問(wèn)了。

    posted @ 2012-03-07 11:26 wyx 閱讀(851) | 評(píng)論 (1)編輯 收藏

    MyEclipse8.6 編輯JSP頁(yè)面卡 優(yōu)化

    步驟:
      1.windows--》preferences
        ——
    2.General——Editors
      ———

    3.File Associations


    將改圖的值設(shè)為默認(rèn)的

    posted @ 2012-03-07 09:49 wyx 閱讀(1507) | 評(píng)論 (0)編輯 收藏

    lucenes 查詢(xún)

    --分詞收索  
    創(chuàng)建
    String name = rs.getString("name");
        if (name != null && !name.equals(""))
         document.add(new Field("name", name, Field.Store.YES,
           Field.Index.UN_TOKENIZED));
    檢索
    query = new TermQuery(new Term("name", name));      
      booleanQuery.add(query, BooleanClause.Occur.MUST);

    posted @ 2012-02-22 12:29 wyx 閱讀(200) | 評(píng)論 (0)編輯 收藏

    java.util.Date和java.sql.Date 轉(zhuǎn)換問(wèn)題

    SimpleDateFormat bartDateFormat =   new SimpleDateFormat("yyyy-MM-dd");  
          java.sql.Date btime=null;;
          if(cdata.getBegintime()!=null){
          java.util.Date date = bartDateFormat.parse(cdata.getBegintime().toString()); 
            btime= new java.sql.Date(date.getTime());
           
          }else{
           java.util.Date date = bartDateFormat.parse("1970-01-01");
           btime= new java.sql.Date(date.getTime());
          }

    posted @ 2012-01-17 10:59 wyx 閱讀(213) | 評(píng)論 (0)編輯 收藏

    Mysql插入 關(guān)鍵字 屬性設(shè)置

    insert into v9_dataen_data (content, `from`, gengxin, danwei, btime, etime)values( '碳酸飲料 價(jià)格', 'BOABC','3', 'Yuan',1262275200, 1320076800)
    注意from的設(shè)置   `` 符號(hào)

    posted @ 2012-01-12 16:58 wyx 閱讀(209) | 評(píng)論 (0)編輯 收藏

    主站蜘蛛池模板: 久久精品亚洲一区二区三区浴池| 亚洲已满18点击进入在线观看| 国产福利电影一区二区三区,亚洲国模精品一区 | 亚洲精品国产精品国自产观看| 国产亚洲精久久久久久无码| 亚洲国产日韩精品| 国产在线精品观看免费观看| 成人爽a毛片免费| 在线观看亚洲免费视频| 久久亚洲精品成人av无码网站| 国产精品视频白浆免费视频| 国产一级淫片a免费播放口之| 久久久久亚洲av无码专区导航 | 国产午夜精品免费一区二区三区| 免费鲁丝片一级在线观看| 亚洲国产精品无码久久一线| 亚洲AV无码国产一区二区三区| 久久精品国产这里是免费| 99人中文字幕亚洲区| 国产成人精品免费午夜app| 亚洲人成人无码网www电影首页| 亚洲av永久中文无码精品| 四虎精品视频在线永久免费观看| 亚洲国产精品成人精品软件 | 人人公开免费超级碰碰碰视频| 一二三四影视在线看片免费| 亚洲伊人久久大香线蕉苏妲己| 亚洲毛片在线免费观看| 亚洲成色WWW久久网站| 亚洲免费在线视频| 精品久久香蕉国产线看观看亚洲| 91福利视频免费观看| 久久亚洲精品成人综合| 巨胸喷奶水视频www免费视频 | 亚洲影视自拍揄拍愉拍| 在线观看免费亚洲| 国产拍拍拍无码视频免费| 亚洲精品人成网在线播放影院| 久久精品国产亚洲AV不卡| 一级成人a免费视频| 亚洲精品偷拍视频免费观看|