大漠駝鈴

          置身浩瀚的沙漠,方向最為重要,希望此blog能向大漠駝鈴一樣,給我方向和指引。
          Java,Php,Shell,Python,服務器運維,大數據,SEO, 網站開發、運維,云服務技術支持,IM服務供應商, FreeSwitch搭建,技術支持等. 技術討論QQ群:428622099
          隨筆 - 238, 文章 - 3, 評論 - 117, 引用 - 0
          數據加載中……

          Java線程學習(2):關鍵字synchronized

               摘要: 有了synchronized關鍵字,多線程程序的運行結果將變得可以控制。synchronized關鍵字用于保護共享數據。請大家注意"共享數據",你一定要分清哪些數據是共享數據,JAVA是面向對象的程序設計語言,所以初學者在編寫多線程程序時,容易分不清哪些數據是共享數據。請看下面的例子:

          實例一:
          public class FirstThread implements Runnable{
          public synchronized void run(){
          for(int i=1;i<10;i++){
          System.out.println(""+i);
          }
          }
          public FirstThread(){
          }
          public static void main(String[] args){
          Runnable r1=new FirstThread();
          Runnable r2=new FirstThread();
          Thread t1=new Thread(r1);
          Thread   閱讀全文

          posted @ 2009-02-26 19:43 草原上的駱駝 閱讀(416) | 評論 (0)編輯 收藏

          Java 線程學習(1)

               摘要: 一、定義線程
          1、擴展java.lang.Thread類。
          此類中有個run()方法,應該注意其用法:
          public void run()
          如果該線程是使用獨立的 Runnable 運行對象構造的,則調用該 Runnable 對象的 run 方法;否則,該方法不執行任何操作并返回。
          Thread 的子類應該重寫該方法。
          2、實現java.lang.Runnable接口。
          void run()
          使用實現接口 Runnable 的對象創建一個線程時,啟動該線程將導致在獨立執行的線程中調用對象的 run 方法。
          二、實例化線程
          1 Thread類實例化
          直接new即可
          2 Runnable實例化
          需要用Thread的構造函數實例化
          Thread(Runnable target)
          Thread(Runnable target, String name)
          Thread(ThreadGroup group, Runnable target)
          Thread(Thr  閱讀全文

          posted @ 2009-02-26 19:26 草原上的駱駝 閱讀(490) | 評論 (0)編輯 收藏

          JPA annotation 筆記

               摘要: @Id 顧名思義,就不多說了。

          @GeneratedValue:主鍵的產生策略,通過strategy屬性指定。
          默認情況下,JPA自動選擇一個最適合底層數據庫的主鍵生成策略,如SqlServer對應identity,MySql對應auto increment。
          在javax.persistence.GenerationType中定義了以下幾種可供選擇的策略:
          1) IDENTITY:表自增鍵字段,Oracle不支持這種方式;
          2) AUTO: JPA自動選擇合適的策略,是默認選項;
          3) SEQUENCE:通過序列產生主鍵,通過@SequenceGenerator注解指定序列名,MySql不支持這種方式;
          4) TABLE:通過表產生主鍵,框架借由表模擬序列產生主鍵,使用該策略可以使應用更易于數據庫移植。   閱讀全文

          posted @ 2009-02-22 22:08 草原上的駱駝 閱讀(1660) | 評論 (0)編輯 收藏

          安裝卸載Windows服務,修改windows服務執行路徑!

               摘要: 辦法有兩個,一個是用sc命令修改, 另外一個是注冊表修改,注冊表修改地址為:

          [HKEY_LOCAL_MACHINE"SYSTEM"CurrentControlSet"Services"下找到你想改路徑的服務,有一鍵名是"ImagePath".
            閱讀全文

          posted @ 2009-02-20 12:30 草原上的駱駝 閱讀(1559) | 評論 (0)編輯 收藏

          天津最大的便民信息網-天津巴士網(www.tjzbus.cn)

               摘要:
          近日,天津最大的便民信息網-天津巴士網(www.tjzbus.cn),主要是信息咨詢以信息整合的巧妙方式,在互聯網上開始成長壯大。目的在于如何節省用戶的時間。簡直稱得上天津便民信息引擎的航空母艦。
          據了解, 天津最大的便民信息網-天津巴士網只是整合了各種網絡資源,傳統的資源方式想要更多的找到自己想要的更多的信息,就必須同時打開多個網站,需要多次輸入查詢信息,天津最大的便民信息網,天津巴士網將老百姓所需的信息集成在一個站內,這樣用戶只要輸入一次關鍵字就可以找到自己想要的信息。   閱讀全文

          posted @ 2009-02-19 12:24 草原上的駱駝 閱讀(327) | 評論 (0)編輯 收藏

          A Blog Application with Warp (continued)(3)

               摘要: A Blog Application with Warp (continued)

          First check out the previous tutorial on creating a Blog application to get yourself going. In that article, you saw how to add forms and a bit of interactivity. In this one, I'll demonstrate integration of Warp-persist, the JPA/Hibernate module. It is worthwhile reading the introduction to the Warp-persist module first. You will learn the following Warp concepts:

          * Persistence
          * Dynamic Finders
          * Declarative Transact  閱讀全文

          posted @ 2009-02-17 16:31 草原上的駱駝 閱讀(250) | 評論 (0)編輯 收藏

          A Blog Application with Warp (continued)(2)

               摘要: A Blog Application with Warp (continued)

          First check out the previous tutorial on creating a Blog application to get yourself going. In this article, I'll show you how to add forms and a bit of interactivity. You will learn the following Warp concepts:

          * Event Handling and Navigation
          * Events and the Button component
          * The TextField and TextArea components
          * Page scopes

          Continuing from the previous tutorial, let's now make a "compose new ent  閱讀全文

          posted @ 2009-02-17 16:30 草原上的駱駝 閱讀(212) | 評論 (0)編輯 收藏

          A Blog Application with Wideplay's Warp Framework(1)

               摘要: A Blog Application with Wideplay's Warp Framework

          First check out the Hello World example to get yourself going. In this article, I'll show you how to knock together a simple Blog application where you can browse and read blog entries. You will learn the following Warp concepts:

          * Page Injection
          * RESTful behavior and the HyperLink component
          * The Table and Column components
          * Simple Internationalization (i18n)

            閱讀全文

          posted @ 2009-02-17 16:29 草原上的駱駝 閱讀(275) | 評論 (0)編輯 收藏

          A Hello World Application in Warp

          posted @ 2009-02-17 16:28 草原上的駱駝 閱讀(294) | 評論 (0)編輯 收藏

          glassfish安裝配置

               摘要: glasshfish是和jboss同一級別的web服務器,與tomcat不同的是,glassfish有著較多的優點。Tomcat主要的缺點就是較弱的熱部署(hot deploy)能力. 修改一個Java類, 保存后, Tomcat會重新加載這個類, 但不久就要重新啟動Tomcat才能繼續開發. 在企業關鍵應用的場景下, 若發生急迫的程序缺陷更正, 讓眾多的用戶停止手頭的工作, 等待服務器重新啟動, 顯然十分不便.當GlassFish v2出來之后,其強大的功能讓tomcat6都黯然失色。  閱讀全文

          posted @ 2009-02-15 10:43 草原上的駱駝 閱讀(1435) | 評論 (0)編輯 收藏

          Struts2.0的Struts.properties(轉)

          posted @ 2009-02-14 21:09 草原上的駱駝 閱讀(394) | 評論 (0)編輯 收藏

          Struts2.0標簽庫(三)表單標簽

          posted @ 2009-02-14 21:07 草原上的駱駝 閱讀(3425) | 評論 (0)編輯 收藏

          Struts2.0標簽庫(二)數據標簽[轉]

          posted @ 2009-02-14 21:07 草原上的駱駝 閱讀(854) | 評論 (0)編輯 收藏

          struts2 標簽學習

               摘要: struts2 標簽

          用過struts1.x的人都知道,標簽庫有html、bean、logic、tiles,
          而struts2.0里的標簽卻沒有分類,只用在jsp頭文件加上
          <%@ taglib prefix="s" uri="/struts-tags" %>
          就能使用struts2.0的標簽庫

          下面就介紹下每個標簽的用法(有錯請指正):
            閱讀全文

          posted @ 2009-02-14 21:05 草原上的駱駝 閱讀(4869) | 評論 (3)編輯 收藏

          maven 中使用jetty原始文章

               摘要: 后半部分是eclipse中使用jetty,通過配置感覺非常好。希望能給大家有所幫助  閱讀全文

          posted @ 2009-02-14 17:37 草原上的駱駝 閱讀(1294) | 評論 (0)編輯 收藏

          僅列出標題
          共16頁: First 上一頁 8 9 10 11 12 13 14 15 16 下一頁 
          主站蜘蛛池模板: 清流县| 德令哈市| 沈阳市| 通江县| 南江县| 仙桃市| 阿克| 宝山区| 汤阴县| 大姚县| 蓝田县| 五指山市| 曲靖市| 察隅县| 西峡县| 肥东县| 崇文区| 西昌市| 大英县| 嫩江县| 石河子市| 玛曲县| 高要市| 临猗县| 贡觉县| 辽中县| 长葛市| 临夏市| 昌邑市| 聂拉木县| 贡觉县| 邯郸县| 辽阳市| 建始县| 雅安市| 喀什市| 出国| 新河县| 湘西| 祁连县| 台南市|