爪哇之家

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            35 隨筆 :: 29 文章 :: 8 評論 :: 0 Trackbacks

          2006年3月16日 #

          JDK6----/etc/profile.d/java

          JAVA_HOME = /usr/java/jdk6
          PATH
          = $JAVA_HOME/bin:$PATH
          CLASSPATH
          = .:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
          export?JAVA_HOME?PATH?CLASSPATH
          TOMCAT6,jsvc-src/native/Tomcat5.sh --> /etc/init.d/tomcat
          JAVA_HOME=/usr/java/jdk6
          CATALINA_HOME
          =/usr/java/tomcat6
          DAEMON_HOME
          =$CATALINA_HOME/bin/jsvc-src
          TOMCAT_USER
          =tomcat

          #?for?multi?instances?adapt?those?lines.
          TMP_DIR
          =/var/tmp
          PID_FILE
          =/var/run/jsvc.pid
          CATALINA_BASE
          =$CATALINA_HOME

          CATALINA_OPTS
          ="-Djava.library.path=/usr/local/apr/lib"
          CATALINA_OPTS
          ="$CATALINA_OPTS?-Xms512m?-Xmx1024m?$JPDA_OPTS"
          CLASSPATH
          =\
          $JAVA_HOME/lib/tools.jar:\
          $CATALINA_HOME/bin/commons-daemon.jar:\
          $CATALINA_HOME/bin/bootstrap.jar
          安裝tomcat-native,arp等
          posted @ 2008-12-17 02:18 爪哇之家 閱讀(392) | 評論 (0)編輯 收藏

          環境:使用fm是2.3.9,webwork2.2.4(使用切換語法):
          一:作為components組件的參數如果值為字符串,則需要在字符串上加上單引號。
          <ww:component template="checkboxlist_portraitCols.ftl">
          ?<ww:param name="name" value="'test'" /><!--注意單引號-->
          ?<ww:param name="colCnt" value="4" />
          ?<ww:param name="list" value="{'1','2','3','4','5','6'}" />
          </ww:component>

          二:終于理解freemaker的多值類型。

          <#if (parameters.list?size%parameters.colCnt)?int==0>:求余數是否為0,必須加上內置方法int。

          freemaker內置了chunk分塊的方法,但是我始終沒有想到怎么將這個快按縱向進行排列。橫向好說,直接按行輸出。因此寫下列模板代碼來實現。


          <#assign itemCount = 0/>
          <#if parameters.list??>?
          ?<#assign width=(100/parameters.colCnt)?int>
          ?
          ?<#assign itemCount = itemCount + 1/>

          ?<#assign rowCnt=0/>
          ?<#assign colCnt=0/>
          ?<#list parameters.list?chunk(parameters.colCnt) as row>
          ??<#assign rowCnt=rowCnt+1/>
          ??<tr>
          ??<#list row as cell>
          ???<#assign itemCount = itemCount + 1/>
          ???<#assign colCnt=colCnt+1/>
          ???<#if rowCnt==0 && col<parameters.colCnt-1 >
          ????<td width='${width}%'>
          ???<#else>
          ????<td>
          ???</#if>
          ???<#if parameters.listKey??>
          ????<#assign itemKey = cell[parameters.listKey]/>
          ???<#else>
          ???? <#assign itemKey = cell/>
          ???</#if>
          ???
          ???<#if parameters.listValue??>
          ???? <#assign itemValue = cell[parameters.listValue]/>
          ???<#else>
          ???? <#assign itemValue = cell/>
          ???</#if>
          ???<#assign itemKeyStr=itemKey.toString() />
          ????<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}" id="${parameters.name?html}-${itemCount}"<#rt/>
          ???<#if tag.contains(parameters.nameValue, itemKey)>
          ????checked="checked"<#rt/>
          ???</#if>
          ???<#if parameters.disabled!(false)>
          ????disabled="disabled"<#rt/>
          ???</#if>
          ???/>
          ???<label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
          ???</td>???
          ??</#list>
          ?</#list>?
          <#else>
          ? &nbsp;
          </#if>

          jsp引用頁面測試代碼:
          <table width="80%">
          <ww:component template="checkboxlist_landscapeCols.ftl">
          ?<ww:param name="name" value="'test'" />
          ?<ww:param name="colCnt" value="4" />
          ?<ww:param name="list" value="{'1','2','3','4','5','6'}" />
          </ww:component>
          </table>
          posted @ 2008-05-31 08:31 爪哇之家| 編輯 收藏

          http://www.ccw.com.cn/htm/center/prog/02_3_8_3.asp
          posted @ 2008-03-27 15:24 爪哇之家| 編輯 收藏

          1. 地址碼:表示編碼對象常住戶口所在縣(市、旗、區)的行政區劃代碼,按GB/T2260的規定執行。

            2. 出生日期碼:表示編碼對象出生的年、月、日,按GB/T7408的規定執行,年、月、日分別用4位、2位、2位數字表示,之間不用分隔符。

            3. 順序碼:表示在同一地址碼所標識的區域范圍內,對同年、同月、同日出生的人編定的順序號,順序碼的奇數分配給男性,偶數分配給女性。

            校驗的計算方式:

            1. 對前17位數字本體碼加權求和
            公式為:S = Sum(Ai * Wi), i = 0, ... , 16
            其中Ai表示第i位置上的身份證號碼數字值,Wi表示第i位置上的加權因子,其各位對應的值依次為: 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2

            2. 以11對計算結果取模
            Y = mod(S, 11)

            3. 根據模的值得到對應的校驗碼
            對應關系為:
            ?? Y值: 0 1 2 3 4 5 6 7 8 9 10
            校驗碼: 1 0 X 9 8 7 6 5 4 3 2

          posted @ 2007-12-22 23:03 爪哇之家| 編輯 收藏

          用ADO控件讀EXCEL或DBF文件

          用ADO連接Excel
          設置屬性ConnetionString
          選擇 Microsoft Jet 4.0 OLE DB provider
          Select or enter a datasorce name -> 選擇你要打開Excel文件
          User name默認是Admin 密碼默認為空,可以不用理會
          Extended properties 設為:Excel 8.0
          sql語句 select * from [yourtablename] (注意要有[])

          更詳細的請看這一篇:

          在DELPHI中使用ADO直接訪問Excel數據文件


          摘 要:在DELPHI中使用ADO直接訪問Excel數據文件
          關鍵字:ADO Excel
          類 別:數據庫

            要用DELPHI中的ADO系列控件訪問Excel數據文件,首先應該建立一些基本概念。你需要將一個Excel數據文件想象
          為一個關系數據庫,Excel文件中的每個工作表就對應該數據庫中的一個表,而工作表中的每一列當然就是表的列了。
          然后,按照下列面的秘訣進行就可以。
            
            1.設置ADOConnection的ConnectionString
          構造ConnectionString時,OLE DB的提供者要選擇Microsoft Jet 4.0 OLE DB Provider作為ADO的驅動程序。
          這本來是用于連接Access數據庫的驅動程序,但也可打開Excel文件。
          連接的數據庫名稱當然就是你要打開的Excel文件,注意擴展名是*.xls,而不是*.mdb。
          最關鍵的一點是,還要設置擴展屬性Extended Properties為"Excel 8.0",否則,測試連接時會報告無法識別數據格式
          的錯誤。Extended Properties的屬性值在"所有"參數頁中輸入。
          最后,設置完成后的ConnectionString中的各項參數為:

          Provider=Microsoft.Jet.OLEDB.4.0
          Data Source=MyExcelFile.xls
          Extended Properties=Excel 8.0
          Persist Security Info=False



            2.設置ADODataSet或ADOTable
          1將ADODataSet或ADOTable連接到剛才的ADOConnection。如果不用ADOConnection,也可以參照上面的方法直接設置
          ADODataSet或ADOTable的ConnectionString屬性。
          2對于ADODataSet,需要將CommandType屬性設置為cmdTableDirect,而對于ADOTable,則將TableDirect屬性設置為True。
          因為,訪問Excel文件是直接的數據文件訪問,不是通過SQL語句來操作游標訪問的。如果不設置直接訪問,則系統會報告
          SQL語句格式錯誤等信息。
          然后,當你下拉ADODataSet中的CommandText屬性或ADOTable的TableName屬性時,就可以選擇到要打開的工作表了。
          注意,表名后面多了加一個$符號。
          3.打開ADODataSet或ADOTable


          連接DBF數據
          構造ado connection string
          提供者選擇 Microsoft Jet 4.0 OLEDB Provider
          "所有"那里編輯 Extended Properties,
          dbf文件的話設置為dBase 5.0(注意dBase和5.0之間必須有空格,最好拷貝過去粘貼)
          db文件的話設置為Paradox 7.X
          (dbf就是dbase或Vfox數據庫,db就是paradox數據庫)
          "連接"那里的"數據庫名稱"輸入的是目錄名,不能包含文件名,
          比如你的文件是 c:tempaaa.dbf ,那么輸入c:temp
          同時CursorLocation 設置為: clUseServer

          還可以:
          如果直接連的話,ADO的連接字串設為:

          adoConnection1.ConnectionString:='Provider=MSDASQL.1;Extended Properties="Driver={Microsoft Visual Foxpro Driver};SourceType=DBF;SourceDB=c:mydb"';


          如果是用ODBC,先在ODBC中設一個DSN連接到該DBF庫,然后,在ADOConnection中設置連接ODBC的連接字串即可(可以用向導幫助完成)

          posted @ 2007-11-23 12:45 爪哇之家| 編輯 收藏

          1、允許匿名評論,注釋掉batch.comment.php中的
          ?if(empty($_SCONFIG['allowguest'])) {
          ???????? //hszdz:jsmessage('error', 'no_login', geturl('action/login'));
          ?}這個方法,后來發現有"允許匿名評論"的選項
          2、tag比較混亂,用固定下拉選擇框:修改xspace/admin/spaceap/common.js的addMouseEvent部分
          var inputname=inputs[i].name;
          ??? ??? if(inputname=='tagname'){
          ??? ??? ??? if(inputs[i].style.display!='none'){??? ??? ???
          ??? ??? ??? ??? inputs[i].style.display='none';
          ??? ??? ??? ??? var hack = document.getElementById('tagnametips');??? ??? ??? ???
          ??? ??? ??? ??? hack.innerHTML="<select name='tagname' id='tagname'><option value='情感' selected>情感</option><option value='論文'>論文</option><option value='心理'>心理</option><option value='寫作'>寫作</option></select>";
          ??? ??? ??? ??? hack.className='';
          ??? ??? ??? ??? hack.style.display='block';??? ??? ??? ???
          ??? ??? ??? }
          ??? ??? }
          3、

          刪除X-Space SuperSite 個人空間下方版權方法

          修改/css/space.css找到以下代碼:
          CODE:

          /*頁腳*/
          #xspace-footer { text-align : center; margin: 1em 0 0 0; }
          ? ?? ???#xspace-footer p { margin: 0.3em 0; }
          ? ?? ???#xspace-copyright { font: 10px Verdana, Arial, Helvetica, sans-serif; margin: 0; padding-bottom: 2em; }
          ? ?? ?? ?? ?? ? #xspace-copyright strong { color: #036; font-weight:bold; }
          ? ?? ?? ?? ?? ? #xspace-copyright em { color: #FF9900; font-weight:bold; font-style: normal; }
          修改為:
          CODE:

          /*頁腳*/
          #xspace-footer { text-align : center; margin: 1em 0 0 0; }
          ? ?? ???#xspace-footer p { margin: 0.3em 0; }
          ? ?? ???#xspace-copyright { font: 10px Verdana, Arial, Helvetica, sans-serif; margin: 0; padding-bottom: 2em; display:none; }
          ? ?? ?? ?? ?? ? #xspace-copyright strong { color: #036; font-weight:bold; }
          ? ?? ?? ?? ?? ? #xspace-copyright em { color: #FF9900; font-weight:bold; font-style: normal; }
          不會改的話,下載我的CSS吧,地址是:



          刪除X-Space個人空間標題方法:

          找到/include/js/common.js再里面加入以下代碼
          CODE:

          function title_powered(str2) {
          ? ?? ???var str1 = document.title;
          ? ?? ???var str2 = str1.indexOf(" - powered by X-Space");

          ? ?? ???if (str2 != -1) {
          ? ?? ?? ?? ?? ? document.title=document.title.substring(0,str2);
          ? ?? ???}

          }
          title_powered();
          方法二:
          CODE:

          document.title = document.title.replace(' - powered by X-Space', '');




          刪除X-Space個人空間管理版權方法:

          修改admin/spacecp/style.css找到以下代碼:

          CODE:

          .copyright { font-size: 12px; margin: 0; }
          改為
          CODE:

          .copyright { display:none; }


          posted @ 2007-11-04 20:07 爪哇之家| 編輯 收藏

          http://www.javaeye.com/topic/137798
          posted @ 2007-11-04 01:12 爪哇之家| 編輯 收藏

          http://…/test.php/%22%3E%3Cscrīpt%3Ealert(’xss’)%3C/scrīpt%3E%3Cfoo
          posted @ 2007-10-28 21:18 爪哇之家| 編輯 收藏

          計算機dos中的net命令
          ----------------------------------------------------------------
          net?use?\\ip\ipc$?"?"?/user:"?"?建立IPC空鏈接?
          net?use?\\ip\ipc$?"密碼"?/user:"用戶名"?建立IPC非空鏈接?
          net?use?h:?\\ip\c$?"密碼"?/user:"用戶名"?直接登陸后映射對方C:到本地為H:?
          net?use?h:?\\ip\c$?登陸后映射對方C:到本地為H:?
          net?use?\\ip\ipc$?/del?刪除IPC鏈接?
          net?use?h:?/del?刪除映射對方到本地的為H:的映射?
          ----------------------------------------------------------------
          net?user?用戶名 密碼 /add?建立用戶?
          net?user?guest?/active:yes?激活guest用戶?
          net?user?查看有哪些用戶?
          net?user?帳戶名?查看帳戶的屬性
          ----------------------------------------------------------------?
          net?localgroup administrators?用戶名?/add?把“用戶”添加到管理員中使其具有管理員權限,注意:***istrator后加s用復數?
          net?start?查看開啟了哪些服務?
          net?start?服務名 ?開啟服務;(如:net?start?telnet,?net?start?schedule)?
          ----------------------------------------------------------------
          net?stop?服務名?停止某服務?
          net?time?\\目標ip?查看對方時間?
          net?time?\\目標ip?/set?設置本地計算機時間與“目標IP”主機的時間同步,加上參數/yes可取消確認信息
          shutdown/r 重新啟動
          posted @ 2007-09-05 23:26 爪哇之家| 編輯 收藏

          CREATE DATABASE IF NOT EXISTS my_db default charset utf8 COLLATE utf8_general_ci;
          createdatabase dbname character set utf8;
          solaris安裝:pkgadd -d ./gcc-2.7.2.1
          posted @ 2007-05-12 17:10 爪哇之家| 編輯 收藏

          新機器,sata硬盤裝win98+winxp雙系統出死活裝不上去
          沒辦法,裝vmware,fdisk后死活說不可以讀C盤,abort進入A盤后格式化后可以安裝了

          posted @ 2007-02-27 22:28 爪哇之家 閱讀(283) | 評論 (0)編輯 收藏

          錯誤:Starting MySQLCouldn't find MySQL manager or server
          www kernel: audit(1145177979.106:127549): avc:? denied? { search } for? pid=27355 co
          mm="mysqld" name="/" dev=sdb7 ino=2 scontext=root:system_r:mysqld_t tcontext=system_u:object_r:file_
          t tclass=dir

          建目錄/var/run/mysqld不存在
          setsebool -P mysqld_disable_trans=1
          posted @ 2007-01-18 10:36 爪哇之家 閱讀(347) | 評論 (0)編輯 收藏

          正常的cookie只能在一個應用中共享,即一個cookie只能由創建它的應用獲得。
          1.可在同一應用服務器內共享方法:設置cookie.setPath("/");
          本機tomcat/webapp下面有兩個應用:cas和webapp_b,
          1)原來在cas下面設置的cookie,在webapp_b下面獲取不到,path默認是產生cookie的應用的路徑。
          2)若在cas下面設置cookie的時候,增加一條cookie.setPath("/");或者cookie.setPath("/webapp_b/");就可以在webapp_b下面獲取到cas設置的cookie了。
          3)此處的參數,是相對于應用服務器存放應用的文件夾的根目錄而言的(比如tomcat下面的webapp),因此cookie.setPath ("/");之后,可以在webapp文件夾下的所有應用共享cookie,而cookie.setPath("/webapp_b/");是指cas應 用設置的cookie只能在webapp_b應用下的獲得,即便是產生這個cookie的cas應用也不可以。
          4)設置cookie.setPath("/webapp_b/jsp")或者cookie.setPath("/webapp_b/jsp/")的時 候,只有在webapp_b/jsp下面可以獲得cookie,在webapp_b下面但是在jsp文件夾外的都不能獲得cookie。
          5)設置cookie.setPath("/webapp_b");,是指在webapp_b下面才可以使用cookie,這樣就不可以在產生cookie的應用cas下面獲取cookie了
          6)有多條cookie.setPath("XXX");語句的時候,起作用的以最后一條為準。
          6)設置多個path的方法???
          2.跨域共享cookie的方法:設置cookie.setDomain(".jszx.com");
          A機所在的域:home.langchao.com,A有應用cas
          B機所在的域:jszx.com,B有應用webapp_b
          1)在cas下面設置cookie的時候,增加cookie.setDomain(".jszx.com");,這樣在webapp_b下面就可以取到cookie。
          2)這個參數必須以“.”開始。
          3)輸入url訪問webapp_b的時候,必須輸入域名才能解析。比如說在A機器輸入:http://lc-bsp.jszx.com: 8080/webapp_b,可以獲取cas在客戶端設置的cookie,而B機器訪問本機的應用,輸入:http://localhost: 8080/webapp_b則不可以獲得cookie。
          4)設置了cookie.setDomain(".jszx.com");,還可以在默認的home.langchao.com下面共享。
          5)設置多個域的方法???
          posted @ 2006-11-16 16:35 爪哇之家| 編輯 收藏

          http://www.cnnb.com.cn/new-gb/xwzxzt/ndzt/fashion10/
          http://www.chinahongyi.cn/newEbiz1/EbizPortalFG/portal/html/index.html
          http://www.gmzs.com/高明市
          http://www.dayic.com/data/firework/24.html--firework教程
          http://www.68design.net/?網站設計,好多酷站
          http://www.swedu.or.kr/swpr/Index.jsp
          http://www.68design.net/designweb/
          http://www.java-asp.net/
          http://net.nen.com.cn/admin/index.php wangsm2/wangsm,szexpert
          posted @ 2006-11-03 16:41 爪哇之家| 編輯 收藏

          awk 'length($1)==10 {system("postsuper -d "$1)}'刪除郵件隊列中的郵件
          make -f Makefile.init makefiles \
          'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -I/usr/include/sasl' \
          'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib -lsasl2',加-DUSE_CYRUS_SASL
          posted @ 2006-10-30 13:37 爪哇之家 閱讀(134) | 評論 (0)編輯 收藏

          moodle是個好東西,安裝也很順利,但是在centos4.2+apache2+php4下出現了一些問題:
          1、不能登陸,說是cookie沒有開啟,原因是在setCookie之前有header輸出
          在index.php的最前面加上
          ?require_once('lib/moodlelib.php');
          ?if (get_moodle_cookie() == '') {
          ???? set_moodle_cookie('nobody');
          ?}
          2、文件不能下載,原因同樣是在文件下載header之前有了輸出
          在lib/file.php第1行加ob_start()
          在send_file()之前加ob_end_clean()把緩沖清除掉
          3、上傳文件不能有中文文件名
          在config.php里加$CFG->unicodecleanfilename = true;
          4、下載文件中中文文件名亂碼(不是很好的解決方案,不能滿足國外用戶訪問了)
          在lib/filelib.php的send_file中對$filename做utf8->gbk的轉碼


          posted @ 2006-10-26 08:33 爪哇之家 閱讀(1376) | 評論 (3)編輯 收藏

          chcon -R -t httpd_user_content_t /web
          system-config-securitylevel
          sestatus

          zend:? chcon -t texrel_shlib_t xxxxx.so
          posted @ 2006-10-20 10:48 爪哇之家| 編輯 收藏

          要實現這個文字在圖片右側的環繞效果,需要自己給圖片加入如下代碼,因為很多象本站一樣的blog默認編輯中是沒有支持文字環繞功能的選項的。
          (p style="clear:right ")……
          (img src="圖片實際地址" style="float:left"?width="xxx" height="xxx" )(/p)
          這樣可以實現左環繞,把Clear設為Left,Float設為Right,可實現右環繞。
          posted @ 2006-10-07 17:58 爪哇之家 閱讀(415) | 評論 (0)編輯 收藏

          查看磁盤 df -h , du -hs /var
          tcpdump port 80
          vmstat -n 2
          squidclient -p3128 cache_object://localhost/info 
          查看連接命令???????? netstat -an|grep EST|awk "{print $3}"|awk -F":" "{print $1}"|sort|uniq -c|sort??? 
          封禁連入的ip????????? iptables -A INPUT -p tcp --dport 80 -s xxx.xxx.xxx.xxx -j DROP
          檢查named錯誤的命令???? ?grep named /var/log/messages | tail -n 20
          				跟蹤dns查詢      dig @202.103.0.117 www.hssygz.com
          				.
          				 +trace
          		
          posted @ 2006-09-02 14:13 爪哇之家| 編輯 收藏

          http://www.aygfsteel.com/thinkbase/archive/2006/06/05/50382.html
          posted @ 2006-06-05 02:08 爪哇之家 閱讀(326) | 評論 (1)編輯 收藏

          解決思路:
          配置web工程web.xml加上
          ? <mime-mapping>
          ??? <extension>doc</extension>
          ??? <mime-type>application/msword</mime-type>
          ? </mime-mapping>
          ? <mime-mapping>
          ??? <extension>xls</extension>
          ??? <mime-type>application/vnd.ms-excel</mime-type>
          ? </mime-mapping>
          修改后非常注意的要清空緩存這樣才會彈出保存還是打開的窗口否則打開還是亂碼.
          posted @ 2006-06-02 20:26 爪哇之家 閱讀(156) | 評論 (0)編輯 收藏

          function ubb($str) {??
          $color=Array('red','blue','green');
          $str=eregi_replace('\[url\]([a-zA-Z0-9@:%_.~#-\?&]+)\[\/url\]','<a href=http://\\1>\\1</a>',$str);//url
          $str=eregi_replace('\[url=http://([a-zA-Z0-9@:%_.~#-\?&]+)\](.+)\[\/url\]','<a href=\\1 target=_blank>\\2</a>',$str);
          $str=eregi_replace('\[url=([a-zA-Z0-9@:%_.~#-\?&]+)\](.+)\[\/url\]','<a href=http://\\1 target=_blank>\\2</a>',$str);
          $str=eregi_replace('\[img\]([a-zA-Z0-9@:%_.~#-\?&]+)\[\/img\]','<img src=http://\\1>\\1</img>',$str);//img
          $str=eregi_replace('\[h([1-6])\](.+)\[\/h[1-6]\]','<h\\1>\\2</h\\1>',$str);//h1-6
          $str=eregi_replace('\[email\]([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})\[\/email\]','<a href=mailto:\\1>\\1</a>',$str);//email
          $str=eregi_replace('\[email=([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})\](.+)\[\/email\]','<a href=mailto:\\1>\\2</a>',$str);
          $str=eregi_replace('\[b\](.+)\[\/b\]','<b>\\1</b>',$str);
          $str=eregi_replace('\[i\](.+)\[\/i\]','<i>\\1</i>',$str);
          $str=eregi_replace('\[size=(.+)\](.+)\[\/size\]','<font size=\\1>\\2</font>',$str);
          $str=eregi_replace('\[color=(.+)\](.+)\[\/color\]','<font color=\\1>\\2</font>',$str);
          $str=eregi_replace('\[sub\](.+)\[\/sub\]','<sub>\\1</sup>',$str);//下裱
          $str=eregi_replace('\[sup\](.+)\[\/sup\]','<sup>\\1</sup>',$str);//上標
          for($i=0;$i<=count($color);$i++)$str=eregi_replace('\['.$color[$i].'\](.+)\[\/'.$color[$i].'\]','<font color='.$color[$i].'>\\1</font>',$str);
          $str=preg_replace("/\[quote\](.+?)\[\/quote\]/is","<blockquote><font size='1' face='Courier New'>quote:</font><hr>\\1<hr></blockquote>", $str);
          $str=preg_replace("/\[code\](.+?)\[\/code\]/is","<blockquote><font size='1' face='Times New Roman'>code:</font><hr color='lightblue'><i>\\1</i><hr color='lightblue'></blockquote>", $str);
          $str=preg_replace("/\[sig\](.+?)\[\/sig\]/is","<div style='text-align: left;color: darkgreen;margin-left: 5%'><br><br>--------------------------<br>\\1<br>--------------------------</div>", $str);
          return $str;
          }
          posted @ 2006-05-19 02:48 爪哇之家 閱讀(183) | 評論 (0)編輯 收藏

          http://www.ajaxwing.com/
          posted @ 2006-05-06 18:36 爪哇之家 閱讀(397) | 評論 (0)編輯 收藏

          http://www.3doing.net/forums/printpage.asp?BoardID=48&ID=212
          posted @ 2006-04-29 16:11 爪哇之家 閱讀(121) | 評論 (0)編輯 收藏

          http://www.hibernate.org.cn/viewtopic.php?t=17939
          posted @ 2006-04-29 10:03 爪哇之家 閱讀(157) | 評論 (0)編輯 收藏

          打開開始--運行--鍵入gpedit.msc
          按回車后打開組策略編輯器,雙擊管理模版菜單--選擇系統下拉菜單,在工作區找到“顯示‘關閉事件跟蹤程序’”,雙擊“顯示‘關閉事件跟蹤程序’”項,在設置選項卡里把“已啟用”改為“已禁用”,確定完成。
          posted @ 2006-04-28 16:07 爪哇之家 閱讀(419) | 評論 (0)編輯 收藏

          網頁播放的視頻代碼
          第一種是通過調用window media player進行播放諸如:wmv,asf等格式文件:

          <object align=middle class=OBJECT classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 height=320 id=MediaPlayer width=356>
          <param name="ShowStatusBar" value="-1">
          <param name="Filename" value="電影地址">
          <embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=電影地址 width=356 height=320>
          </embed> 
          </object>


          第二種是通過調用replayer進行播放諸如:rm,ram等格式文件

          播放框:
          <object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=285 id=RAOCX name=rmplay width=356>
          <param name="SRC" value="影片地址">
          <param name="CONSOLE" value="Clip1">
          <param name="CONTROLS" value="imagewindow">
          <param name="AUTOSTART" value="true">
          <embed src="影片地址" autostart="true" controls="ImageWindow" console="Clip1" pluginspage="http://www.real.com"/’ target="_blank" >http://www.real.com"; width="356" height="285">
          </embed> 
          </object>
          控制框:可緊跟播放框一起
          <object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=27 id=video1 width=356>
          <param name="_ExtentX" value="7276">
          <param name="_ExtentY" value="1058">
          <param name="AUTOSTART" value="0">
          <param name="SHUFFLE" value="0">
          <param name="PREFETCH" value="0">
          <param name="NOLABELS" value="0">
          <param name="CONTROLS" value="ControlPanel">
          <param name="CONSOLE" value="Clip1">
          <param name="LOOP" value="0">
          <param name="NUMLOOP" value="0">
          <param name="CENTER" value="0">
          <param name="MAINTAINASPECT" value="0">
          <param name="BACKGROUNDCOLOR" value="#ffffff">
          <embed type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ControlPanel" height="27" width="356" autostart="0" _extentx="7276" _extenty="1058" shuffle="0" prefetch="0" nolabels="0" loop="0" numloop="0" center="0" maintainaspect="0" backgroundcolor="#ffffff">
          </embed>
          </object>


          第三種是通過調用flashplayer進行播放:swf類的flash文檔,分別如下:

          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="356" height=320>
          <param name="movie" value="flash地址">
          <param name="quality" value="high">
          <embed src="flash地址" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"’ target="_blank" >http://www.macromedia.com/go/getflashplayer"; type="application/x-shockwave-flash" width="356" height=320>
          </embed>
          </object>
          posted @ 2006-03-20 20:16 爪哇之家 閱讀(1627) | 評論 (1)編輯 收藏

          Description: The Error means The connection with the server has been terminated.

          If you check out the C:\Windows\system32\LogFiles\HTTPERR\httperr*.log files on the distribution server, you'll likely see either Timer_MinBytesPerSecond errors or Timer_ConnectionIdle errors. These are caused by IIS' default settings, contained within its metabase, which define the minimum traffic flow rate for a connection to be kept alive and the maximum idle time allowed before a connection is dropped. For some reason, SUS servers seem to take their good old time while downloading updates, and these parameters are exceeded and the distribution server drops 'em.

          1) From IIS Manager, right click on the Internet Information Server (IIS) Manager root level folder and go to Properties. Check the box to enable direct metabase editing. Click OK.

          2) Open the C:\Windows\system32\inetsrv\Me-taBase.xml file in Notepad. Do a search for "MinFileBytesPerSec". Change the setting for MinFileBytesPerSec from 240 to 0. Do another search, this time for "ConnectionTimeout" to be 600. Save changes and exit.

          3) Restart the IIS Admin service to effect the changes.
          posted @ 2006-03-16 10:49 爪哇之家 閱讀(3209) | 評論 (1)編輯 收藏

          主站蜘蛛池模板: 杭锦后旗| 西畴县| 连平县| 灵山县| 宝丰县| 彰化县| 沂南县| 竹山县| 鄱阳县| 沽源县| 安吉县| 巴里| 墨玉县| 仁化县| 交城县| 邵阳县| 达拉特旗| 沭阳县| 翁源县| 章丘市| 横山县| 天祝| 镇坪县| 萨迦县| 抚宁县| 包头市| 岢岚县| 兴城市| 万年县| 油尖旺区| 抚顺县| 淮滨县| 团风县| 清流县| 延寿县| 蓬溪县| 湖州市| 广南县| 黎城县| 双流县| 北京市|