posts - 25,comments - 0,trackbacks - 0
          http://hllvm.group.iteye.com/group/wiki?category_id=316 
          posted @ 2012-07-08 10:17 周磊 閱讀(297) | 評論 (0)編輯 收藏
          再看看<effective java> ,對前半年寫的代碼進行一下反思
          慢慢看《Hadoop實戰(zhàn)中文版》,了解分布式系統(tǒng)
          認真閱讀《設計模式之禪》,加深對自己已經(jīng)在實際項目中運用的模式的理解。
          閱讀《java解惑》的后半部分(2年前讀過前幾十條建議),了解編碼中的陷阱。
          posted @ 2012-06-29 15:07 周磊 閱讀(292) | 評論 (0)編輯 收藏

          State of the Lambda

          http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html 

          jdk快點出吧lambdba把,一直用op4j和lambdbaj這些jar包很蛋疼。。
          posted @ 2012-06-27 11:47 周磊 閱讀(315) | 評論 (0)編輯 收藏
          spring配置該方法只讀了。

          <bean id="txProxyTemplate" abstract="true"
                 class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
                 <property name="transactionManager" ref="transactionManager"/>
                 <property name="transactionAttributes">
                     <props>
                        <prop key="affirm*">PROPAGATION_REQUIRED</prop>
                        <prop key="gen*">PROPAGATION_REQUIRED</prop>
                         <prop key="save*">PROPAGATION_REQUIRED</prop>
                         <prop key="update*">PROPAGATION_REQUIRED</prop>
                         <prop key="create*">PROPAGATION_REQUIRED</prop>
                         <prop key="process*">PROPAGATION_REQUIRED</prop>                               
                         <prop key="delete*">PROPAGATION_REQUIRED</prop>               
                         <prop key="remove*">PROPAGATION_REQUIRED</prop>
                         <prop key="send*">PROPAGATION_REQUIRED</prop>
            <prop key="upload*">PROPAGATION_REQUIRED</prop>               
                         <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
                     </props>
                 </property></bean>

          posted @ 2012-05-24 09:59 周磊 閱讀(3362) | 評論 (0)編輯 收藏
          十進制轉成十六進制: 
          Integer.toHexString(int i) 
          十進制轉成八進制 
          Integer.toOctalString(int i) 
          十進制轉成二進制 
          Integer.toBinaryString(int i) 
          十六進制轉成十進制 
          Integer.valueOf("FFFF",16).toString() 
          八進制轉成十進制 
          Integer.valueOf("876",8).toString() 
          二進制轉十進制 
          Integer.valueOf("0101",2).toString() 

          有什么方法可以直接將2,8,16進制直接轉換為10進制的嗎? 
          java.lang.Integer類 
          parseInt(String s, int radix) 
          使用第二個參數(shù)指定的基數(shù),將字符串參數(shù)解析為有符號的整數(shù)。 
          examples from jdk: 
          parseInt("0", 10) returns 0 
          parseInt("473", 10) returns 473 
          parseInt("-0", 10) returns 0 
          parseInt("-FF", 16) returns -255 
          parseInt("1100110", 2) returns 102 
          parseInt("2147483647", 10) returns 2147483647 
          parseInt("-2147483648", 10) returns -2147483648 
          parseInt("2147483648", 10) throws a NumberFormatException 
          parseInt("99", throws a NumberFormatException 
          parseInt("Kona", 10) throws a NumberFormatException 
          parseInt("Kona", 27) returns 411787 

          進制轉換如何寫(二,八,十六)不用算法 
          Integer.toBinaryString 
          Integer.toOctalString 
          Integer.toHexString 


          例二 

          public class Test{ 
             public static void main(String args[]){ 

              int i=100; 
              String binStr=Integer.toBinaryString(i); 
              String otcStr=Integer.toOctalString(i); 
              String hexStr=Integer.toHexString(i); 
              System.out.println(binStr); 





          例二 
          public class TestStringFormat { 
             public static void main(String[] args) { 
              if (args.length == 0) { 
                 System.out.println("usage: java TestStringFormat <a number>"); 
                 System.exit(0); 
              } 

              Integer factor = Integer.valueOf(args[0]); 

              String s; 

              s = String.format("%d", factor); 
              System.out.println(s); 
              s = String.format("%x", factor); 
              System.out.println(s); 
              s = String.format("%o", factor); 
              System.out.println(s); 
             } 




          其他方法: 

          Integer.toHexString(你的10進制數(shù)); 
          例如 
          String temp = Integer.toHexString(75); 
          輸出temp就為 4b 



          //輸入一個10進制數(shù)字并把它轉換成16進制 
          import java.io.*; 
          public class toHex{ 

          public static void main(String[]args){ 

          int input;//存放輸入數(shù)據(jù) 
          //創(chuàng)建輸入字符串的實例 
          BufferedReader strin=new BufferedReader(new InputStreamReader(System.in)); 
          System.out.println("請輸入一個的整數(shù):"); 
          String x=null; 
          try{ 
          x=strin.readLine(); 
          }catch(IOException ex){ 
          ex.printStackTrace(); 

          input=Integer.parseInt(x); 
          System.out.println ("你輸入的數(shù)字是:"+input);//輸出從鍵盤接收到的數(shù)字 

          System.out.println ("它的16進制是:"+Integer.toHexString(input));//用toHexString把10進制轉換成16進制 
          posted @ 2012-04-29 12:10 周磊 閱讀(3171) | 評論 (0)編輯 收藏
          http://linbin007.iteye.com/blog/809759
          -noverify 
          -javaagent:D:/jrebel.jar
          -Drebel.dirs=E:\workspace\WantWant\webapp\WEB-INF\classes
          posted @ 2012-03-26 15:27 周磊 閱讀(812) | 評論 (0)編輯 收藏
          主站蜘蛛池模板: 务川| 宁乡县| 海阳市| 井研县| 桃园县| 上栗县| 类乌齐县| 无锡市| 临西县| 石嘴山市| 团风县| 江津市| 东乌| 大庆市| 临沂市| 清丰县| 云阳县| 宁都县| 苍山县| 嵊泗县| 湖州市| 尚义县| 麻栗坡县| 西贡区| 浠水县| 溧阳市| 白银市| 台南市| 洛隆县| 昆山市| 郴州市| 达拉特旗| 炉霍县| 星子县| 筠连县| 巴林左旗| 宁远县| 海南省| 都江堰市| 正宁县| 临夏市|