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

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

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

    2011年9月13日

    Haddop 配置引起的
    WARN org.mortbay.log: /getimage: java.io.IOException: GetImage failed. java.io.IOException: Content-Length header is not provided by  the namenode when trying to fetch http://127.0.1.1:50090/getimage?getimage=1

    最近在翻看NameNode的log時(shí)發(fā)現(xiàn)經(jīng)常有這一段信息出現(xiàn):



    看來是SecondNameNode在向NameNode獲取Image時(shí)出的問題。雖然不影響hdfs使用,但是SecondName
    備份功能失效,任其下去萬一NameNode掛了那可就無處申冤了。
    經(jīng)過Google大神幫助,得知需要在hdfs-site.xml中手動(dòng)配置dfs.secondary.http.address,這個(gè)配置項(xiàng)的默認(rèn)值如下
    <property>
      
    <name>dfs.namenode.secondary.http-address</name>
      
    <value>0.0.0.0:50090</value>
      
    <description>
        The secondary namenode http server address and port.
        If the port is 
    0 then the server will start on a free port.
      
    </description>
    </property>
    需要明確指明SecondName,與conf/master里面的名稱一樣
    <property>
      
    <name>dfs.namenode.secondary.http-address</name>
      
    <value>test-dn2:50090</value>
      
    <description>
        The secondary namenode http server address and port.
        If the port is 
    0 then the server will start on a free port.
      
    </description>
    </property>
    posted @ 2011-09-13 11:44 Juliashine 閱讀(884) | 評論 (1)編輯 收藏

    2007年3月29日

    1、IE有全局event對象window.event,F(xiàn)F沒有,F(xiàn)F中的?event?只能在事件發(fā)生的現(xiàn)場使用,即必須通過事件綁定函數(shù)的參數(shù)來使用。
    <input?type="text"?name="input_content"?onkeydown="exeCode(event)"/>

    <script?language="javascript">
    function?exeCode()?{
    ??
    //取得事件對象
    ??var?event?=?arguments[0]?||?window.event;
    ??
    //取得事件的發(fā)生源對象
    ??var?element?=?event.srcElement?||?event.target;
    }

    </script>


    2、FireFox下沒有preserveWhiteSpace這個(gè)屬性,即:把空白也當(dāng)作一個(gè)節(jié)點(diǎn)。而IE則默認(rèn)為false,即把空白不看成一個(gè)節(jié)點(diǎn)。所以在FireFox下previousSibling可能是空白節(jié)點(diǎn),除非兩個(gè)HTML標(biāo)簽之間沒有任何形式的空格。

    3、IE下可以用document.frames("name").document的方式取得frame中所嵌頁面的document對象,F(xiàn)F下卻會得到null,解決的的辦法是document.getElementById(framename).contentWindow.document,也可以使用
    window.frames[frameName].document 直接獲取frame里的document對象


    最后推薦一篇文章:Javascript的IE和Firefox兼容性匯編
    posted @ 2007-03-29 15:06 Juliashine 閱讀(749) | 評論 (0)編輯 收藏

    2006年12月21日

    在Hibernate中配置Proxool連接池
    1:在applicationContext.xml中配置SessionFactory
    <bean?id="sessionfactory"?class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    ????<property?name="hibernateProperties">
    ????????<props>
    ????????????<prop?key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
    ????????????<prop?key="hibernate.show_sql">true</prop>
    ????????????<!--指定Proxool配置文件-->
    ????????????<prop?key="hibernate.proxool.properties">conf/proxool.properties</prop>
    ????????????<!--<prop?key="hibernate.proxool.xml">conf/proxool.xml</prop>-->
    ????????????<!--指定Proxool的alias,必須與Proxool的配置文件中的alias一致-->
    ????????????<prop?key="hibernate.proxool.pool_alias">hibernate-oracle</prop>
    ????????</props>
    ????</property>
    </bean>
    2:配置Proxool(conf/proxool.properties)
    #jdbc-0.proxool.alias=mysql
    #jdbc-0.proxool.driver-class=org.gjt.mm.mysql.Driver
    #jdbc-0.proxool.driver-url=jdbc:mysql://localhost:3306/contestdb?user=root&password=1234&useUnicode=true&characterEncoding=utf8
    #jdbc-0.user=root
    #jdbc-0.password=1234

    jdbc-0.proxool.alias=hibernatea-oracle
    jdbc-0.proxool.driver-class=oracle.jdbc.driver.OracleDriver
    jdbc-0.proxool.driver-url=jdbc:oracle:thin:@172.16.2.6:1521:dbname
    jdbc-0.user=username
    jdbc-0.password=username
    jdbc-0.proxool.maximum-connection-count=20
    jdbc-0.proxool.house-keeping-test-sql=SELECT?SYSDATE?FROM?DUAL;
    #DEBUG,?INFO,?WARN,?ERROR,?FATAL.
    jdbc-0.proxool.statistics-log-level=ERROR
    posted @ 2006-12-21 15:13 Juliashine 閱讀(428) | 評論 (0)編輯 收藏
     
    ???????? The?URL?extension?to?use?to?determine?if?the?request?is?meant?for?a?Struts?action?
    ???????????用URL擴(kuò)展名來確定是否這個(gè)請求是被用作Struts?action,其實(shí)也就是設(shè)置?action的后綴,例如login.do的'do'字。

    struts.configuration
    ??????????The?org.apache.struts2.config.Configuration?implementation?class
    ????????????org.apache.struts2.config.Configuration接口名

    struts.configuration.files
    ??????????A?list?of?configuration?files?automatically?loaded?by?Struts?
    ???????????struts自動(dòng)加載的一個(gè)配置文件列表

    struts.configuration.xml.reload
    ??????????Whether?to?reload?the?XML?configuration?or?not
    ???????????是否加載xml配置(true,false)

    struts.continuations.package
    ???????????The?package?containing?actions?that?use?Rife?continuations
    ???????????含有actions的完整連續(xù)的package名稱

    struts.custom.i18n.resources
    ??????????Location?of?additional?localization?properties?files?to?load?
    ???????????加載附加的國際化屬性文件(不包含.properties后綴)

    struts.custom.properties
    ??????????Location?of?additional?configuration?properties?files?to?load
    ???????????加載附加的配置文件的位置


    struts.devMode
    ??????????Whether?Struts?is?in?development?mode?or?not
    ???????????是否為struts開發(fā)模式

    struts.dispatcher.parametersWorkaround
    ??????????Whether?to?use?a?Servlet?request?parameter?workaround?necessary?for?some?versions?of?WebLogic
    ????????????(某些版本的weblogic專用)是否使用一個(gè)servlet請求參數(shù)工作區(qū)(PARAMETERSWORKAROUND)

    struts.enable.DynamicMethodInvocation
    ??????????Allows?one?to?disable?dynamic?method?invocation?from?the?URL
    ????????????允許動(dòng)態(tài)方法調(diào)用

    struts.freemarker.manager.classname
    ??????????The?org.apache.struts2.views.freemarker.FreemarkerManager?implementation?class?
    ???????????org.apache.struts2.views.freemarker.FreemarkerManager接口名

    struts.i18n.encoding
    ??????????The?encoding?to?use?for?localization?messages
    ???????????國際化信息內(nèi)碼

    struts.i18n.reload
    ??????????Whether?the?localization?messages?should?automatically?be?reloaded
    ???????????是否國際化信息自動(dòng)加載?

    struts.locale
    ??????????The?default?locale?for?the?Struts?application
    ???????????默認(rèn)的國際化地區(qū)信息

    struts.mapper.class
    ??????????The?org.apache.struts2.dispatcher.mapper.ActionMapper?implementation?class
    ????????????org.apache.struts2.dispatcher.mapper.ActionMapper接口

    struts.multipart.maxSize
    ??????????The?maximize?size?of?a?multipart?request?(file?upload)
    ???????????multipart請求信息的最大尺寸(文件上傳用)?

    struts.multipart.parser
    ??????????The?org.apache.struts2.dispatcher.multipart.
    ??????????MultiPartRequest?parser?implementation?for?a?multipart?request?(file?upload)?
    ??????????專為multipart請求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上傳用)


    struts.multipart.saveDir
    ??????????The?directory?to?use?for?storing?uploaded?files?
    ???????????設(shè)置存儲上傳文件的目錄夾

    struts.objectFactory
    ??????????The?com.opensymphony.xwork2.ObjectFactory?implementation?class
    ???????????com.opensymphony.xwork2.ObjectFactory接口(spring)

    struts.objectFactory.spring.autoWire
    ??????????Whether?Spring?should?autoWire?or?not
    ???????????是否自動(dòng)綁定Spring

    struts.objectFactory.spring.useClassCache
    ??????????Whether?Spring?should?use?its?class?cache?or?not
    ???????????是否spring應(yīng)該使用自身的cache?

    struts.objectTypeDeterminer
    ??????????The?com.opensymphony.xwork2.util.ObjectTypeDeterminer?implementation?class
    ????????????com.opensymphony.xwork2.util.ObjectTypeDeterminer接口

    struts.serve.static.browserCache
    ??If?static?content?served?by?the?Struts?filter?should?set?browser?caching?header?properties?or?not?
    ???????????是否struts過濾器中提供的靜態(tài)內(nèi)容應(yīng)該被瀏覽器緩存在頭部屬性中

    struts.serve.static
    ??????????Whether?the?Struts?filter?should?serve?static?content?or?not?
    ???????????是否struts過濾器應(yīng)該提供靜態(tài)內(nèi)容

    struts.tag.altSyntax
    ??????????Whether?to?use?the?alterative?syntax?for?the?tags?or?not?
    ???????????是否可以用替代的語法替代tags

    struts.ui.templateDir
    ??????????The?directory?containing?UI?templates
    ???????????UI?templates的目錄夾?

    struts.ui.theme
    ??????????The?default?UI?template?theme
    ???????????默認(rèn)的UI?template主題

    struts.url.http.port
    ??????????The?HTTP?port?used?by?Struts?URLs
    ???????????設(shè)置http端口

    struts.url.https.port
    ??????????The?HTTPS?port?used?by?Struts?URLs?
    ???????????設(shè)置https端口

    struts.url.includeParams
    ??????????The?default?includeParams?method?to?generate?Struts?URLs?
    ??????????在url中產(chǎn)生?默認(rèn)的includeParams


    struts.velocity.configfile
    ??????????The?Velocity?configuration?file?path
    ???????????velocity配置文件路徑

    struts.velocity.contexts
    ??????????List?of?Velocity?context?names
    ???????????velocity的context列表


    struts.velocity.manager.classname
    ??????????org.apache.struts2.views.velocity.VelocityManager?implementation?class
    ???????????org.apache.struts2.views.velocity.VelocityManager接口名

    struts.velocity.toolboxlocation
    ??????????The?location?of?the?Velocity?toolbox
    ???????????velocity工具盒的位置?
    struts.xslt.nocache
    ??????????Whether?or?not?XSLT?templates?should?not?be?cached
    ???????????是否XSLT模版應(yīng)該被緩存
    posted @ 2006-12-21 15:11 Juliashine 閱讀(549) | 評論 (0)編輯 收藏

    2006年12月15日

    Struts2 發(fā)布已經(jīng)很長時(shí)間了,一直沒有顧得上學(xué)習(xí),本周工作比較輕松,花點(diǎn)時(shí)間照著例子做了一下,但是在與Spring 集成的時(shí)候出現(xiàn)問題,action找不到Spring中定義的bean,折騰了兩個(gè)多小時(shí)才最終搞定,決定把心得記錄下來。

    Struts2 集成 Spring 的 Web.xml 最簡配置

    <? xml?version="1.0"?encoding="UTF-8" ?>
    < web-app? id ="WebApp_9" ?version ="2.4" ?xmlns ="http://java.sun.com/xml/ns/j2ee" ?
    ????xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance"
    ?
    ????xsi:schemaLocation
    ="http://java.sun.com/xml/ns/j2ee?http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >


    ????
    < display-name > Struts?2.0 </ display-name >
    ????
    ????
    < filter >
    ????????
    < filter-name > struts </ filter-name > ????????
    ????????
    < filter-class > org.apache.struts2.dispatcher.FilterDispatcher </ filter-class >

    ????
    </ filter >
    ????
    < filter-mapping >
    ????????
    < filter-name > struts </ filter-name >
    ????????
    < url-pattern > /* </ url-pattern >
    ????
    </ filter-mapping >
    ????
    ????
    < listener >
    ????????
    < listener-class >
    ????????????org.springframework.web.context.ContextLoaderListener
    ????????
    </ listener-class >
    ????
    </ listener >
    ????
    ????
    < welcome-file-list >
    ????????
    < welcome-file > index.html </ welcome-file >
    ????
    </ welcome-file-list >
    </ web-app >

    此配置適用于將Spring 的配置文件放在與Web.xml同一目錄,即WEB-INF目錄下,且配置文件采用默認(rèn)命名applicationContext.xml,如果Spring配置文件沒有放在WEB-INF下或者采用了自定義名稱,則Web.xml應(yīng)該如下定義:

    <? xml?version="1.0"?encoding="UTF-8" ?>
    < web-app? id ="WebApp_9" ?version ="2.4" ?xmlns ="http://java.sun.com/xml/ns/j2ee" ?
    ????xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance"
    ?
    ????xsi:schemaLocation
    ="http://java.sun.com/xml/ns/j2ee?http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >


    ????
    < context-param >
    ????????
    < param-name > contextConfigLocation </ param-name >
    ????????
    < param-value > classpath*:applicationContext*.xml </ param-value >
    ????
    </ context-param >
    ????
    < filter >
    ????????
    < filter-name > struts </ filter-name > ????????
    ????????
    < filter-class > org.apache.struts2.dispatcher.FilterDispatcher </ filter-class >

    ????
    </ filter >
    ????
    < filter-mapping >
    ????????
    < filter-name > struts </ filter-name >
    ????????
    < url-pattern > /* </ url-pattern >
    ????
    </ filter-mapping >
    ????
    ????
    < listener >
    ????????
    < listener-class >
    ????????????org.springframework.web.context.ContextLoaderListener
    ????????
    </ listener-class >
    ????
    </ listener >
    ????
    ????
    < welcome-file-list >
    ????????
    < welcome-file > index.html </ welcome-file >
    ????
    </ welcome-file-list >
    </ web-app >

    注意這里比上個(gè)配置多出的項(xiàng)

    ???< context-param >
    ??????< param-name > contextConfigLocation </ param-name >
    ??????< param-value > classpath*:applicationContext*.xml </ param-value >
    ???</ context-param >

    表示Spring配置文件放在CLASSPATH目錄下,即WEB-INF/classes目錄下,名稱為applicationContext*.xml,其中“*”為任意字符

    注意,這還沒完,CLASSPATH下有個(gè)struts.property文件,必須在里面添加一行內(nèi)容:
    (我就是缺了這個(gè)導(dǎo)致action找不到bean)

    struts.objectFactory?=?spring??

    給Spring配置文件的<beans>元素加上如下屬性

    <beans?default-autowire="autodetect">???

    ??……?……

    OK,配置完畢!可以使用了

    posted @ 2006-12-15 17:04 Juliashine 閱讀(429) | 評論 (0)編輯 收藏

    2006年12月12日

    ROC曲線(Receiver Operating Characteeristic Curve)是顯示Classification模型真正率和假正率之間折中的一種圖形化方法。

    解讀ROC圖的一些概念定義::

    真正(True Positive , TP)被模型預(yù)測為正的正樣本
    假負(fù)(False Negative , FN)被模型預(yù)測為負(fù)的正樣本
    假正(False Positive , FP)被模型預(yù)測為正的負(fù)樣本
    真負(fù)(True Negative , TN)被模型預(yù)測為負(fù)的負(fù)樣本

    真正率(True Positive Rate , TPR)或靈敏度(sensitivity)?
    ???TPR = TP /(TP + FN)?
    ???正樣本預(yù)測結(jié)果數(shù) / 正樣本實(shí)際數(shù)
    假負(fù)率(False Negative Rate , FNR)?
    ???FNR = FN /(TP + FN)?
    ???被預(yù)測為負(fù)的正樣本結(jié)果數(shù) / 正樣本實(shí)際數(shù)
    假正率(False Positive Rate , FPR)?
    ???FPR = FP /(FP + TN)?
    ???被預(yù)測為正的負(fù)樣本結(jié)果數(shù) /負(fù)樣本實(shí)際數(shù)
    真負(fù)率(True Negative Rate , TNR)或特指度(specificity)?
    ???TNR = TN /(TN + FP)?
    ???負(fù)樣本預(yù)測結(jié)果數(shù) / 負(fù)樣本實(shí)際數(shù)

    目標(biāo)屬性的被選中的那個(gè)期望值稱作是“正”(positive)

    ROC曲線上幾個(gè)關(guān)鍵點(diǎn)的解釋:

    ( TPR=0,FPR=0 ) 把每個(gè)實(shí)例都預(yù)測為負(fù)類的模型
    ( TPR=1,FPR=1 ) 把每個(gè)實(shí)例都預(yù)測為正類的模型
    ( TPR=1,FPR=0 ) 理想模型

    此處圖像以后再補(bǔ)

    一個(gè)好的分類模型應(yīng)該盡可能靠近圖形的左上角,而一個(gè)隨機(jī)猜測模型應(yīng)位于連接點(diǎn)(TPR=0,FPR=0)和(TPR=1,FPR=1)的主對角線上。

    ROC曲線下方的面積(AUC)提供了評價(jià)模型平均性能的另一種方法。如果模型是完美的,那么它的AUG = 1,如果模型是個(gè)簡單的隨機(jī)猜測模型,那么它的AUG = 0.5,如果一個(gè)模型好于另一個(gè),則它的曲線下方面積相對較大。

    Oracle 論壇上對ROC 的解釋
    http://forums.oracle.com/forums/thread.jspa?threadID=415870&tstart=15
    posted @ 2006-12-12 14:25 Juliashine 閱讀(1840) | 評論 (0)編輯 收藏
    僅列出標(biāo)題  
     
    主站蜘蛛池模板: 亚洲人成网站色在线观看| 日韩精品人妻系列无码专区免费| 亚洲精品第五页中文字幕 | 国产v亚洲v天堂无码网站| 精品免费国产一区二区| 亚洲毛片免费视频| a在线免费观看视频| 亚洲AV网一区二区三区| 亚洲一线产区二线产区区| 亚洲国产精品一区二区久久| 中文字幕亚洲专区| 四虎影视在线永久免费看黄| 成年美女黄网站18禁免费| 亚洲免费观看在线视频| 日本人成在线视频免费播放| 久久99精品免费一区二区| 老外毛片免费视频播放| 噜噜综合亚洲AV中文无码| 亚洲欧美日韩自偷自拍| ww亚洲ww在线观看国产| 亚洲人成网站在线观看播放动漫 | 一级一级一级毛片免费毛片| 亚洲αⅴ无码乱码在线观看性色| 亚洲AV一二三区成人影片| 亚洲男女一区二区三区| 亚洲视频精品在线观看| 久久亚洲综合色一区二区三区| 国产亚洲美女精品久久久| 亚洲成网777777国产精品| 免费一级特黄特色大片在线观看| 在线观看免费大黄网站| 国外成人免费高清激情视频| 两个人的视频高清在线观看免费 | 亚洲视频一区在线观看| 亚洲欧洲日韩综合| 亚洲一区二区三区免费观看| 国产99在线|亚洲| 亚洲欧美成人一区二区三区| 激情小说亚洲图片| 日日摸夜夜添夜夜免费视频| 国产成人1024精品免费|