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

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

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

    隨筆-77  評論-5  文章-2  trackbacks-0
      2019年12月31日
    class Square{
    public:
     Square(int x ) :value(x*x){
     }

    Square(const Square& other) = delete;//rule 1

    const Square & operator = (const Square& other) == delete;//rule 2
    const Square & operator = (Square&& other) = delete;//rule3 

    ..
    }

    Square s = 9; //因為s沒有初始化,會先用9 調(diào)用構(gòu)造函數(shù) Square(int x ) , 然后調(diào)用Square(const Square& other),和rule1 違背
    Square s2(8);
     s= s2;//對應(yīng)rule 2
     s= Square(9);//對應(yīng) rule3 
    posted @ 2019-12-31 21:11 huohuo 閱讀(1058) | 評論 (0)編輯 收藏
      2014年7月7日
    其實一直想學ruby,總是拖拖拉拉推了幾年。 很多ruby的教材要么老厚一本 要么是東一榔頭西一斧頭,邏輯性不清楚 ruby語法還沒說清楚就上rails了 這個教材挺好。 今天才發(fā)現(xiàn)argument 是實參,parameter是形參
    posted @ 2014-07-07 22:20 huohuo 閱讀(239) | 評論 (0)編輯 收藏
      2014年1月20日
    小新看到媽媽用訂書機訂了一個盒子,他就從打印機上面拿了幾張a4紙,釘了一個像盒子的東西,當作他的百寶箱,把他的一些零零碎碎的東西放到他的百寶箱中。 有一天他看到了媽媽的首飾盒,他覺得很漂亮,就和媽媽說:媽媽,我把你這個盒子里面的東西放到我的那個百寶箱里面,你這個盒子給我當百寶箱吧。 媽媽當然不同意。小新很希望要個百寶箱,爸爸就問他:“你需要一個多大的百寶箱?” 小新比劃了一個大小,他希望大一點,能裝很多東西。爸爸問他是不是希望箱子能有很多分隔? 小新說不要分隔,但是百寶箱要有鎖。 爸爸明白了---你就是要個能鎖住的箱子嘛,我給你找個皮箱,帶密碼鎖的。 第二天,爸爸上班回來,發(fā)現(xiàn)他平時用的筆記本電腦被小新鎖在他的"新百寶箱"----密碼鎖皮箱里面了,密碼是小新設(shè)的。 爸爸不知道密碼,打不開皮箱,爸爸就和小新說:"幫爸爸把電腦拿出來,爸爸要給你查一個睡覺前講的故事,不然今天就沒故事聽了"。 小新說:“你用手機也可以查的嘛,別以為我不知道”
    posted @ 2014-01-20 21:49 huohuo 閱讀(225) | 評論 (0)編輯 收藏
      2013年8月18日
    1 解析utf-8的中文字符問題,我修改了 ReportTask類里面的一個方法,增加了一個getJava().setVmArgs("-Dfile.encoding=utf-8")
    2.覆蓋率出不了數(shù)據(jù)   一方面注意制定datafile,把cubertura-instrument和cobertura-report的datafile設(shè)置為一個,另外junit里面也要設(shè)置一個系統(tǒng)屬性,制定cubertura的datafile屬性.  不制定datafile時,可能生成文件在當前運行ant的目錄.但是我們ant任務(wù)中的junit測試任務(wù),可能會使用不同的目錄來作工作路徑.這樣會導致datafile不一致.

    另外一個是要記得將javac 任務(wù)的debug="yes" ,因為只有debug =yes時,編譯的代碼才帶有行信息,能顯示覆蓋.  當然常見的問題是junit的classpath中的instrument class目錄放到原來被測class之前.




    posted @ 2013-08-18 22:37 huohuo 閱讀(500) | 評論 (0)編輯 收藏
      2012年3月4日
    下載putty的安裝版本,安裝之后有一個plink pscp程序。
    plink程序負責調(diào)用ssh命令
    pscp負責上傳文件。

    plink -l user -pw pass   hostname

    但是因為plink會提示是否要保存密碼,不能保證自動批處理運行,此時利用管道的能力來輸入提示的結(jié)果

    echo Y >yes.txt
    plink -l user -pw pass   hostname <yes.txt
    posted @ 2012-03-04 06:31 huohuo 閱讀(602) | 評論 (0)編輯 收藏
      2011年12月20日
    kafka pdf

    /Files/lijinglin/F_1330_Narkhede_Kafka.pptx
    posted @ 2011-12-20 22:53 huohuo 閱讀(320) | 評論 (0)編輯 收藏
      2011年12月19日
    /Files/lijinglin/stormsrc.rar
    posted @ 2011-12-19 02:15 huohuo 閱讀(245) | 評論 (0)編輯 收藏
      2011年12月16日

    zookeeper集群安裝

    測試環(huán)境redhat5.5:
    vmware建兩臺虛擬機(btw,似乎雙核系統(tǒng)只能建倆,3個就死掉了)
    192.168.229.129
    192.168.229.130


    下載2011年12月15日的最新zookeeper
    加壓到
    /opt/zookeeper-3.4.0/
    配置/opt/zookeeper-3.4.0/conf/zoo.cfg
    可以把那個例子考過來
    Java代碼 復制代碼 收藏代碼
    1. # The number of milliseconds of each tick   
    2. tickTime=2000  
    3. # The number of ticks that the initial    
    4. # synchronization phase can take   
    5. initLimit=10  
    6. # The number of ticks that can pass between    
    7. # sending a request and getting an acknowledgement   
    8. syncLimit=5  
    9. # the directory where the snapshot is stored.   
    10. do not use /tmp for storage, /tmp here is just    
    11. # example sakes.   
    12. dataDir=/opt/zookeeper-3.4.0/data/zookeeper   
    13. dataLogDir=/opt/zookeeper-3.4.0/data/log   
    14. # the port at which the clients will connect   
    15. clientPort=2181  
    16. #   
    17. # Be sure to read the maintenance section of the    
    18. # administrator guide before turning on autopurge.   
    19. #   
    20. # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance   
    21. #   
    22. # The number of snapshots to retain in dataDir   
    23. #autopurge.snapRetainCount=3  
    24. # Purge task interval in hours   
    25. # Set to "0" to disable auto purge feature   
    26. #autopurge.purgeInterval=1  
    27. server.1=192.168.229.129:2888:3888  
    28. server.2=192.168.229.130:2888:3888  

    修改/opt/zookeeper-3.4.0/bin/zkServer.sh
    Java代碼 復制代碼 收藏代碼
    1. status)   
    2.     # -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output   
    3.     #STAT=`echo stat | nc -q 1 localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//'2> /dev/null| grep Mode`   
    4.     STAT=`echo stat | nc localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//'2> /dev/null| grep Mode`  

    以上這些多臺機器一樣

    log和data都在dataDir下面
    如果找不到log了用大招:
    ps -ef|grep zookeeper
    ls -l /proc/123123/fd
    其中有一個是log
    然后dataDir建立一個文件myid
    在192.168.229.129上
    echo 1 >/opt/zookeeper-3.4.0/data/zookeeper/myid
    在192.168.229.130上
    echo 2 >/opt/zookeeper-3.4.0/data/zookeeper/myid
    對應(yīng)zoo.cfg里面的
    注意一定是數(shù)字


    然后zkServer.sh start 
    啟動
    zkServer.sh status
    看狀態(tài)
    echo ruok|nc localhost 2181         
    //are you ok?
    echo dump|nc localhost 2181
    echo stat|nc localhost 2181
    echo srst|nc localhost 2181
    zkServer.sh stop
    posted @ 2011-12-16 03:48 huohuo 閱讀(1333) | 評論 (0)編輯 收藏
    僅列出標題  下一頁
    主站蜘蛛池模板: 亚洲av无码片区一区二区三区| 久久免费视频精品| 亚洲精品中文字幕乱码影院 | 亚洲av永久无码精品国产精品| 毛片免费观看的视频在线| 久久久久久影院久久久久免费精品国产小说 | 亚洲美女一区二区三区| 亚洲色欲久久久久综合网| 日韩午夜免费视频| 永久免费毛片在线播放| 日日麻批免费40分钟无码| 三级网站免费观看| 香蕉97碰碰视频免费| 亚洲一区二区三区深夜天堂| 亚洲一卡2卡三卡4卡有限公司| 国产亚洲AV夜间福利香蕉149| 吃奶摸下高潮60分钟免费视频| 成人免费视频88| 人妻视频一区二区三区免费| 18女人水真多免费高清毛片| 久久伊人免费视频| 高清一区二区三区免费视频| 大妹子影视剧在线观看全集免费| 牛牛在线精品观看免费正| 国产亚洲综合精品一区二区三区| 亚洲精品无播放器在线播放| 久久久久亚洲国产| 国产精品亚洲综合五月天| 久久亚洲精品专区蓝色区| 日本亚洲精品色婷婷在线影院| 亚洲va在线va天堂va手机| 亚洲免费一级视频| 亚洲综合av一区二区三区| 亚洲香蕉在线观看| 亚洲熟妇无码八V在线播放 | 午夜神器成在线人成在线人免费 | 自拍偷自拍亚洲精品偷一| 国产成人 亚洲欧洲| 青娱乐在线视频免费观看| 一级毛片在线免费播放| 中国一级特黄高清免费的大片中国一级黄色片 |