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

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

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

    隨筆-124  評論-194  文章-0  trackbacks-0
     
         摘要: 本文說明了 Linux 系統的配置文件,在多用戶、多任務環境中,配置文件控制用戶權限、系統應用程序、守護進程、服務和其它管理任務。這些任務包括管理用戶帳號、分配磁盤配額、管理電子郵件和新聞組,以及配置內核參數。本文還根據配置文件的使用和其所影響的服務的情況對目前 Red Hat Linux 系統中的配置文件進行了分類。
      閱讀全文
    posted @ 2007-09-10 18:24 我愛佳娃 閱讀(448) | 評論 (0)編輯 收藏

     

    posted @ 2007-09-10 17:54 我愛佳娃 閱讀(514) | 評論 (0)編輯 收藏

    今天被SWFObject困擾一天,發現:

    1. SWFObject通過本地HTML用不成功,必須通過WEB在線方式取。
    2. 直接用ADOBE的OBJECT標簽都可以。但是如果一旦加入EXT-YUI的使用,在IE下不行,FF可以。所以還是用SWFObject穩妥些。
    3. 就算是在線取,如果在嵌套IE的瀏覽工具里(如TT)也會不成功,FF沒有問題。
    4. 用SWFObject時還要注意,如果要訪問FLASH的函數,輸出完FLASH后,并不能馬上取得指針使用,而要在其它函數中使用,比如:通過某個按鈕事件激發。

    也就是,把這部分放在初始化中:

    var so = new SWFObject(format_path ("swf/hehe.swf"), "mytopo", "800", "600", "8", "#FFFFFFFF");
    so.write("flashcontent");
    this._topo = thisMovie("mytopo");

     

    使用的語句放在另一處:

    _topo.setBK(format_path ("images/pic3.jpg"));

     

    歸根結底,FLASH函數調用的調試,目前實驗成功的:一是要用SWF,二是要在線調試。

    posted @ 2007-09-08 22:02 我愛佳娃 閱讀(898) | 評論 (0)編輯 收藏
    上一篇文章中的問題,今天又再試了下,居然解決了,看來把遇到問題放一放是有好處的。

    第一,是要用對CXF的庫,在一行代碼未變的情況下,只要使用最新的庫。看來在最新庫里解決了數組問題:
    2.1-incubator-SNAPSHOT
    就沒問題,如果是用:
    2.0-incubator
    就會出現上篇文章的情況。我使用MAVEN2,就寫成:
          <!--for cxf-->
        
    <dependency>
            
    <groupId>org.apache.cxf</groupId>
            
    <artifactId>cxf-rt-frontend-jaxws</artifactId>
            
    <version>2.1-incubator-SNAPSHOT</version>
            
    <!-- version>2.0-incubator</version-->
        
    </dependency>
        
    <dependency>
            
    <groupId>org.apache.cxf</groupId>
            
    <artifactId>cxf-rt-transports-http</artifactId>
            
    <version>2.1-incubator-SNAPSHOT</version>
        
    </dependency>
        
    <dependency>
            
    <groupId>org.apache.cxf</groupId>
            
    <artifactId>cxf-rt-databinding-aegis</artifactId>
            
    <version>2.1-incubator-SNAPSHOT</version>
        
    </dependency>


    第二,對SOAP::Lite的改變,SOAP::Lite不支持doc/literal,但通過閱讀
    "NET-based Web Service Using the SOAP::Lite Perl Library".
    我的上篇文章有鏈接,我寫的PERL程序在某些情況下依然不行。
    這次再加了兩處改動后就可以了:(注意:CXF里不要使用aegisDatabinding,用默認的即可)
    my $soap = SOAP::Lite
           
    -> uri('http://magic.nms.exchangebit.com/')
           
    -> on_action( subjoin '/', 'http://www.alfredbr.com', $_[1] })
           
    -> proxy('http://127.0.0.1:8080/ebnms/NotifyService')
               
    ->autotype(0);


    其中的autotype(0)非常重要。另外一處改動是,程序中的根變量名改成"arg0",即與WSDL中定義一致。
    實驗發現,帶不帶attr中的xmlns都可以。完整代碼如下:
     use SOAP::Lite ( +trace => all, maptype => {} );

    my $soap = SOAP::Lite
           
    -> uri('http://magic.nms.exchangebit.com/')
           
    -> on_action( subjoin '/', 'http://www.alfredbr.com', $_[1] })
           
    -> proxy('http://127.0.0.1:8080/ebnms/NotifyService')
               
    ->autotype(0);

    #$soap->sendAlarmString ("good");

    #$soap->sendAlarm (SOAP::Data->name(arg0=>{devName=>"hehe", devIp=>"ip1"}));


    {
    # call send alarm
        my @params = (
        
    #   $header,
           SOAP::Data->name(arg0 => goodhehe) 
        );
        
        
    my $method = SOAP::Data->name('ns1:sendAlarmString')
           
    ->attr({"xmlns:ns1" => 'http://magic.nms.exchangebit.com/'});
        
        
    my $result = $soap->call($method => @params);
        
        
    print "\nsend string alarm result:\n";
        
    if ($result->fault)
        {
           
    print $result->faultstring;
        }
        
    else
        {
           
    print $result->result;
        }
        
    print "\nn";
    }

    {
    # call send dev alarm
        my @params = (SOAP::Data->name(arg0=>{devName=>"hehe", devIp=>"ip1"}));
        
        
    my $method = SOAP::Data->name('sendAlarm');
    #       ->attr({"xmlns:ns1" => 'http://magic.nms.exchangebit.com/'});
        
        
    my $result = $soap->call($method => @params);
        
        
    print "\nsend string alarm result:\n";
        
    if ($result->fault)
        {
           
    print $result->faultstring;
        }
        
    else
        {
           
    print $result->result;
        }
        
    print "\n\n";
    }

    {
    # call send arr alarm
        my @params = (
           SOAP
    ::Data->name(arg0 => [
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe1", devIp=>"ip1"}, 
           {devName
    =>"hehe2", devIp=>"ip2"}])
        );
        
        
    my $method = SOAP::Data->name('sendAlarmArr');
        
        
    my $result = $soap->call($method => @params);
        
        
    print "\nsend string alarm result:\n";
        
    if ($result->fault)
        {
           
    print $result->faultstring;
        }
        
    else
        {
           
    my @a = @{$result->result->{item}};
           
    foreach $i (@a) {
                   
    print "ele: $i->{devName}, $i->{devIp}\n";
           }
        }
        
    print "\n\n";
    }
    posted @ 2007-08-23 14:13 我愛佳娃 閱讀(1444) | 評論 (1)編輯 收藏
         摘要: 最近需要一個能根據請求數變化的線程池,JAVA有這樣的東西,可是C++下好像一般只是固定大小的線程池。所以就基于ACE寫了個,只做了初步測試。 主要思想是:1. 重載ACE_Task,這相當于是個固定線程池,用一個信號量(ACE_Thread_Semaphore)來記數空閑線程數。2. 初始化時根據用戶的輸入,確定最少線程數minnum和最大線程數maxnum,當多個請求到來,并且無空閑線程(信...  閱讀全文
    posted @ 2007-08-14 17:56 我愛佳娃 閱讀(6093) | 評論 (4)編輯 收藏

    編譯指南:

    http://support.hyperic.com/confluence/display/DOCSHQ30/Build+Instructions

     

    直接按照這個走,設置一些變量:

    JBOSS_HOME=C:\Program Files\server-3.1.0\hq-engine

     

    JAVA_HOME = %SDKS_HOME%\jdk1.5.0_04

    JAVA_OPTS = "-ea"

     

    ANT_HOME = %TOOLS_HOME%\apache-ant-1.6.5

    ANT_OPTS = -Xmx256M -XX:MaxPermSize=128m

     

     

    發現SERVER起不來,后來不用自己下載的JBOSS,而是直接下載個可以直接解壓的HQ安裝包,然后把JBOSS_HOME改到安裝目錄(如上)。然后再運行ant deploy就安過去了。

    AGENT沒有發現問題,編譯出來的直接運行就好了,在build/agent目錄下。

    posted @ 2007-08-12 15:59 我愛佳娃 閱讀(500) | 評論 (0)編輯 收藏
         摘要: 最近因為用HYPERIC產品,裝了一下Postgres數據庫,下面簡說下在WINDOWS下安裝的情況。   下載那個直接解壓版,解壓 在"$PG"目錄下創建一個rootpass.txt文件,內容為數據庫的超級用戶密碼。可以填個“p”,方便后面登陸。準備工作到此結束,下面的步驟以管理員身份執行。 移動DLL文件[8.1.5及以上版本不需要這一步驟]: cd...  閱讀全文
    posted @ 2007-08-12 15:56 我愛佳娃 閱讀(5780) | 評論 (0)編輯 收藏
    最近想用PERL通過SOAP與JAVA通信,想到了XFIRE,現在叫CXF提供的服務。但總是差一點成功。

    第一步,
    由于用了SPRING,所以最先看了這篇文章:Writing a service with Spring
    服務是建成功了,PERL和JAVA是可以正常通信了,詳見上篇文章
    可是CXF自己的CLIENT生成代碼卻訪問“自定義結構數組”的函數不成功:
     public List<DeviceValue> sendAlarmArr (List<DeviceValue> arr);

    第二步,
    左試右試不成功,甚至去試了Axis2,但那個生成的WSDL把上面的結構變成AnyType,估計不對。
    又回來,看了Aegis綁定,我還找到將它用到SPRING里的方法:
    <beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:jaxws
    ="http://cxf.apache.org/jaxws"
     xsi:schemaLocation
    ="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
    >

     
    <import resource="classpath:META-INF/cxf/cxf.xml" />
     
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
     
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

       
    <bean id="serviceClass" class="com.exchangebit.nms.magic.NotifyServiceImpl"/>
      
        
    <bean id="aegisDatabinding" class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
              
        
    <bean id="serviceFactory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
            
    <property name="dataBinding" ref="aegisDatabinding"/>
        
    </bean>
        
        
    <bean id="serverBeanFactory" class="org.apache.cxf.frontend.ServerFactoryBean" init-method="create">
            
    <property name="address" value="/NotifyService"/>
            
    <property name="bindingId" value="http://schemas.xmlsoap.org/soap/"/>
            
    <property name="serviceBean" ref="serviceClass"/>
            
    <property name="serviceFactory" ref="serviceFactory"/>
        
    </bean>

        
    <jaxws:endpoint 
          
    id="notifyService" 
          implementor
    ="com.exchangebit.nms.magic.NotifyServiceImpl" 
          address
    ="/NotifyService">
             
    <!--jaxws:serviceFactory>
                <ref bean="serviceFactory"/>
             </jaxws:serviceFactory
    -->
         
    </jaxws:endpoint>
       
    </beans>


    其實,跟前一種JAX-WS的方式轉換非常簡單,把其中的注釋去掉就是Aegis綁定,注釋掉就是JAX-WS。
    客戶端沒有在SPRING里試成功,但寫代碼也相當簡單,Aegis真好:
            getBean ("notifyClient");
            
            ClientProxyFactoryBean factory 
    = new ClientProxyFactoryBean();
            factory.setServiceClass(NotifyService.
    class);
            factory.setAddress(
    "http://127.0.0.1:8080/ebnms/NotifyService");
            factory.getServiceFactory().setDataBinding(
    new AegisDatabinding());
            NotifyService client 
    = (NotifyService) factory.create();
            DoTest (client);


    這次,到是CXF的SERVER和CLIENT都可以正常通信了。但我不說也知道啦,PERL又出問題了!

     

    第三步,
    又進一步搜,才知道Document, Literal, RPC, Encoding對SOAP消息的影響,這篇文章(中文的)相當好!
    大義是RPC/Encoding將方法名稱放入了operation節中,并且消息里含有類型信息,不方便檢驗。
    而Document/Literal通過增加WSDL復雜度,將方法名、參數類型全部放入了types一節,方便了處理。
    而SOAP::Lite只支持RPC/Encoding的方式,但也有辦法讓它形成Doc/Lit的消息:點這里
    但,這種方法只支持JAX-WS的服務,Aegis的PERL就會出錯了。

    所以,不管用哪種要么JAVA的CLIENT和SERVER通信有問題,不然就是把PERL拒之門外。我懷疑是不是CXF的JAX-WS的數組處理有問題,不然Aegis為何不出錯?另外,Aegis對PERL的消息不夠寬容,本已是Doc/Lit格式,只是帶有TYPE信息也會出錯。
    不知如何解,先記在此,以后回過頭來再研究了。
    posted @ 2007-08-07 21:39 我愛佳娃 閱讀(2929) | 評論 (1)編輯 收藏
         摘要: SOAP::Lite的Lite是說其好用,其實它的實現并不“輕量”,功能也非常強大,所以我們要用好它。 在調用服務時,有時遇到有復雜結構或者數組時,還是有點小麻煩,下面以調用以下三個函數為例分別寫出SOAP::Lite如何組合它們的參數,其它情況也應該能迎刃而解。 public class DeviceValue {  &nbs...  閱讀全文
    posted @ 2007-08-03 22:37 我愛佳娃 閱讀(2891) | 評論 (0)編輯 收藏

    一般bat只能運行一個程序,有時需要在電腦啟動或者自己有多個程序要啟動時,編輯一個bat實現一組程序的啟動。可以使用start語句。

    它不支持帶空格的目錄名,可以先CD到程序目錄,再start,舉例如下:

    cd "C:\Program Files\Tor\"
    start tor.exe
    cd "C:\Program Files\Privoxy\"
    start privoxy.exe
    cd "C:\Program Files\Mozilla Firefox\"
    start firefox.exe

    posted @ 2007-07-29 10:36 我愛佳娃 閱讀(4553) | 評論 (0)編輯 收藏
    僅列出標題
    共13頁: First 上一頁 4 5 6 7 8 9 10 11 12 下一頁 Last 
    主站蜘蛛池模板: 亚洲人成人无码网www国产| 野花高清在线电影观看免费视频 | 四虎1515hh永久久免费| 亚洲精品无码专区久久久| eeuss影院免费92242部| 亚洲婷婷国产精品电影人久久| 一级免费黄色毛片| 中文亚洲AV片不卡在线观看| aa在线免费观看| 亚洲AV无码第一区二区三区 | jzzijzzij在线观看亚洲熟妇| 国产精品公开免费视频| 麻豆一区二区三区蜜桃免费| 亚洲AV无码一区二区三区国产| EEUSS影院WWW在线观看免费| 亚洲AV综合色区无码一区 | 亚洲精品国产av成拍色拍| 精品国产免费观看一区| 国产大陆亚洲精品国产| 国产亚洲精品线观看动态图| 免费视频精品一区二区三区| 久久精品国产亚洲AV久| 最近免费中文字幕视频高清在线看| 激情无码亚洲一区二区三区| 色噜噜AV亚洲色一区二区| 无码av免费网站| 久久夜色精品国产噜噜亚洲a| 免费99热在线观看| 99精品视频免费| 亚洲图片中文字幕| 免费人成视频在线观看视频| 久久国产乱子精品免费女| 中文字幕在线观看亚洲视频| 亚洲精品国产综合久久一线| 67194成手机免费观看| 日韩国产精品亚洲а∨天堂免| 国产亚洲精品久久久久秋霞| 青草草色A免费观看在线| 国产成人免费爽爽爽视频 | 成在人线av无码免费高潮水| 亚洲成a人片7777|