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

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

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

    posts - 89, comments - 241, trackbacks - 0, articles - 1
       :: 首頁(yè) ::  :: 聯(lián)系 :: 聚合  :: 管理

    2010年1月2日

         摘要: 代碼改編自 NetPuter 大大發(fā)布的 SDK,這份 SDK 是我用過(guò)的最好的 PHP SDK,修改了一些東西:1、增加了收到的訊息類(lèi)型 voice video2、收到text的時(shí)候,如果是 hello2bizuser 的話(huà),調(diào)用 onsubscribe 方法(微信4.x 以前貌似都還是發(fā)hello2bizuser 所以不得不兼容啊)Code highlighting produced by A...  閱讀全文

    posted @ 2013-08-24 16:02 saobaolu| 編輯 收藏

    <TABLE style="table-layout: auto | fixed">
    auto: 默認(rèn)值
    fixed: 寬度固定,截?cái)喑龅膬?nèi)容

    <TABLE style="word-break: normal | break-all | keep-all">
    normal: 默認(rèn)值,按字詞截?cái)鄵Q行
    break-all: 強(qiáng)行截?cái)嗖Q行
    keep-all: 不截?cái)嗖粨Q行

    使用:style="table-layout:fixed;"
    表示輸出停止,停留在設(shè)定的長(zhǎng)度內(nèi).

    使用:style="word-break : break-all;"
    表示對(duì)超長(zhǎng)部分,換行再繼續(xù)顯示.

    對(duì)于在英文中使用,請(qǐng)使用style="table-layout:fixed; word-wrap:break-word"
    推薦使用word-wrap:break-word;word-break:break-all;table-layout:fixed;

    ==============================================================================

    word-wrap同word-break的區(qū)別

    word-wrap:
    normal      Default. Content exceeds the boundaries of its container. 
    break-word Content wraps to next line, and a word-break occurs when necessary. 必要時(shí)會(huì)觸發(fā)word-break。

    word-break:
    normal      Default. Allows line breaking within words. 好像是只對(duì)Asian text起作用。
    break-all Behaves the same as normal for Asian text, yet allows the line to break arbitrarily for non-Asian text. This value is suited to Asian text that contains some excerpts of non-Asian text. 
    keep-all Does not allow word breaking for Chinese, Japanese, and Korean. Functions the same way as normal for all non-Asian languages. This value is optimized for text that includes small amounts of Chinese, Japanese, or Korean.

    總結(jié)如下:
    word-wrap是控制換行的。
    使用break-word時(shí),是將強(qiáng)制換行。中文沒(méi)有任何問(wèn)題,英文語(yǔ)句也沒(méi)問(wèn)題。但是對(duì)于長(zhǎng)串的英文,就不起作用。

    break-word是控制是否斷詞的。
    normal是默認(rèn)情況,英文單詞不被拆開(kāi)。
    break-all,是斷開(kāi)單詞。在單詞到邊界時(shí),下個(gè)字母自動(dòng)到下一行。主要解決了長(zhǎng)串英文的問(wèn)題。
    keep-all,是指Chinese, Japanese, and Korean不斷詞。即只用此時(shí),不用word-wrap,中文就不會(huì)換行了。(英文語(yǔ)句正常。)


    ie下:
    使用word-wrap:break-word;所有的都正常。

    ff下:
    如這2個(gè)都不用的話(huà),中文不會(huì)出任何問(wèn)題。英文語(yǔ)句也不會(huì)出問(wèn)題。但是,長(zhǎng)串英文會(huì)出問(wèn)題。
    為了解決長(zhǎng)串英文,一般用word-wrap:break-word;word-break:break-all;。但是,此方式會(huì)導(dǎo)致,普通的英文語(yǔ)句中的單詞會(huì)被斷開(kāi)(ie下也是)。

    目前主要的問(wèn)題存在于 長(zhǎng)串英文 和 英文單詞被斷開(kāi)。其實(shí)長(zhǎng)串英文就是一個(gè)比較長(zhǎng)的單詞而已。
    即英文單詞應(yīng)不應(yīng)該被斷開(kāi)那?那問(wèn)題很明顯了,顯然不應(yīng)該被斷開(kāi)了。
    對(duì)于長(zhǎng)串英文,就是惡意的東西,自然不用去管了。但是,也要想些辦法,不讓它把容器撐大。
    用:overflow:auto; ie下,長(zhǎng)串會(huì)自動(dòng)折行。ff下,長(zhǎng)串會(huì)被遮蓋。


    所以,綜上,最好的方式是word-wrap:break-word;overflow:hidden;而不是word-wrap:break-word;word-break:break-all;。
    word-wrap:break-word;overflow:auto;在ie下沒(méi)有任何問(wèn)題。在ff下,長(zhǎng)串會(huì)被遮住部分內(nèi)容。

    另,測(cè)試代碼如下:

    1.htm===================================================================

    <style>
    .c1{ width:300px;      border:1px solid red}
    .c2{ width:300px;word-wrap:break-word;      border:1px solid yellow}
    .c3{ width:300px;word-wrap:break-word;word-break:break-all;      border:1px solid green}
    .c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
    .c5{ width:300px;word-break:break-all;      border:1px solid black}
    .c6{ width:300px;word-break:keep-all;      border:1px solid red}
    .c7{ width:300px;word-wrap:break-word;overflow:auto;      border:1px solid yellow}
    </style>

    .c1{ width:300px;      border:1px solid red}
    <div class="c1">
    safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
    </div>
    <div class=c1>
    This is all English. This is all English. This is all English.
    </div>
    <div class=c1>
    全是中文的情況。全是中文的情況。全是中文的情況。
    </div>
    <div class=c1>
    中英文混排的情況。Chinese and English. 中英文混排的情況。Chinese and English. 
    </div>

    <br>
    .c2{ width:300px;word-wrap:break-word; border:1px solid yellow}
    <div class="c2">
    safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
    </div>
    <div class=c2>
    This is all English. This is all English. This is all English.
    </div>
    <div class=c2>
    全是中文的情況。全是中文的情況。全是中文的情況。
    </div>
    <div class=c2>
    中英文混排的情況。Chinese and English. 中英文混排的情況。Chinese and English. 
    </div>

    <br>
    .c3{ width:300px;word-wrap:break-word;word-break:break-all;      border:1px solid green}
    <div class="c3">
    safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
    </div>
    <div class=c3>
    This is all English. This is all English. This is all English.
    </div>
    <div class=c3>
    全是中文的情況。全是中文的情況。全是中文的情況。
    </div>
    <div class=c3>
    中英文混排的情況。Chinese and English. 中英文混排的情況。Chinese and English. 
    </div>

    <br>
    .c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
    <div class="c4">
    safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
    </div>
    <div class=c4>
    This is all English. This is all English. This is all English.
    </div>
    <div class=c4>
    全是中文的情況。全是中文的情況。全是中文的情況。
    </div>
    <div class=c4>
    中英文混排的情況。Chinese and English. 中英文混排的情況。Chinese and English. 
    </div>

    <br>
    .c5{ width:300px;word-break:break-all;      border:1px solid black}
    <div class="c5">
    safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
    </div>
    <div class=c5>
    This is all English. This is all English. This is all English.
    </div>
    <div class=c5>
    全是中文的情況。全是中文的情況。全是中文的情況。
    </div>
    <div class=c5>
    中英文混排的情況。Chinese and English. 中英文混排的情況。Chinese and English. 
    </div>

    <br>
    .c6{ width:300px;word-break:keep-all;      border:1px solid red}
    <div class="c6">
    safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
    </div>
    <div class=c6>
    This is all English. This is all English. This is all English.
    </div>
    <div class=c6>
    全是中文的情況。全是中文的情況。全是中文的情況。
    </div>
    <div class=c6>
    中英文混排的情況。Chinese and English. 中英文混排的情況。Chinese and English. 
    </div>

    <br>
    .c7{ width:300px;word-wrap:break-word;overflow:auto;      border:1px solid yellow}
    <div class="c7">
    safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
    </div>
    <div class=c7>
    This is all English. This is all English. This is all English.
    </div>
    <div class=c7>
    全是中文的情況。全是中文的情況。全是中文的情況。
    </div>
    <div class=c7>
    中英文混排的情況。Chinese and English. 中英文混排的情況。Chinese and English. 
    </div>

    posted @ 2010-07-06 22:43 saobaolu| 編輯 收藏

     1 import java.io.*;
     2 import java.util.Scanner;
     3 public class SortTest {
     4     public static void main(String[] args) throws IOException {
     5         int temp = 0;//臨時(shí)變量,用于冒泡交換        
     6         int[] num=new int[10];  //聲明一個(gè)空的數(shù)組  10個(gè)長(zhǎng)度
     7         Scanner sc = new Scanner(System.in);
     8         FileOutputStream out=new FileOutputStream("1.txt");
     9         PrintStream p=new PrintStream(out);
    10         //開(kāi)始循環(huán)賦值
    11         for(int i =0;i<num.length;i++){
    12             num[i]=sc.nextInt();
    13         }
    14         p.append("排序前為:");
    15         for (int i = 0; i <num.length; i++) {
    16             System.out.println(num[i]);
    17             p.append(num[i]+" , ");
    18         }
    19         // 用于排序
    20         for (int i = 0; i < num.length-1; i++) {
    21             for (int j = 0; j < num.length - i - 1; j++) {
    22                 if (num[j] > num[j + 1]) {
    23                     temp = num[j];
    24                     num[j] = num[j + 1];
    25                     num[j + 1= temp;
    26                 }
    27             }
    28         }
    29         //輸出文件
    30         p.append("\n");
    31         p.append("排序后為:");
    32         // 循環(huán)輸出
    33         System.out.println("排序后為:");
    34         for (int i = 0; i <num.length; i++) {
    35             System.out.println(num[i]);
    36             p.append(num[i]+" , ");
    37         }
    38     
    39         
    40     }
    41 }
    最后應(yīng)該把p給close了哈

    posted @ 2010-06-26 09:02 saobaolu| 編輯 收藏

    轉(zhuǎn)自:http://www.ry168.net/bbs/thread-226-1-1.html
    table不能換行問(wèn)題 一般是:一行里面全是數(shù)字或是字母或者結(jié)尾有多個(gè)感嘆號(hào)而導(dǎo)致 table不能換行,中文默認(rèn)的會(huì)自動(dòng)換行的,字母不能換行問(wèn)題:
    style="table-layout:fixed; word-break: break-all; overflow:hidden;"
    復(fù)制代碼在單元格屬性里加入上面這句,如:
    <td style="table-layout:fixed; word-break: break-all; overflow:hidden;">
    復(fù)制代碼用表格做網(wǎng)頁(yè)排版的時(shí)候,一般都能正常使用。偏偏有時(shí)會(huì)碰到一段連續(xù)的英文詞或者一堆感嘆號(hào)(!!!)把網(wǎng)頁(yè)就撐開(kāi)的現(xiàn)象。

    總結(jié)了一下,只要在CSS中定義了如下句子,可保網(wǎng)頁(yè)不會(huì)再被撐開(kāi)了。

    自動(dòng)換行問(wèn)題,正常字符的換行是比較合理的,而連續(xù)的數(shù)字和英文字符常常將容器撐大,挺讓人頭疼,下面介紹的是CSS如何實(shí)現(xiàn)換行的方法

    對(duì)于div,p等塊級(jí)元素

    正常文字的換行(亞洲文字和非亞洲文字)元素?fù)碛心J(rèn)的white-space:normal,當(dāng)定義的寬度之后自動(dòng)換行

    html
    <div id="wrap">正常文字的換行(亞洲文字和非亞洲文字)元素?fù)碛心J(rèn)的white-space:normal,當(dāng)定義</div>
    css
    #wrap{white-space:normal; width:200px; }

    IE瀏覽器

    連續(xù)的英文字符和阿拉伯?dāng)?shù)字,使用word-wrap: break-word ;或者word-break:break-all;實(shí)現(xiàn)強(qiáng)制斷行

    html
    <div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>

    css
    #wrap{word-break:break-all; width:200px;}
    或者
    #wrap{word-wrap:break-word; width:200px;}

    Firefox瀏覽器
    連續(xù)的英文字符和阿拉伯?dāng)?shù)字的斷行,Firefox的所有版本的沒(méi)有解決這個(gè)問(wèn)題,我們只有讓超出邊界的字符隱藏或者,給容器添加滾動(dòng)條

    html
    <div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>

    css
    #wrap{word-break:break-all; width:200px; overflow:auto;}

    對(duì)于table元素
    IE瀏覽器
    1. 使用 table-layout:fixed;強(qiáng)制table的寬度,多余內(nèi)容隱藏<table style="table-layout:fixed" width="200"><tr><td>abcdefghigklmnopqrstuvwxyz1234567890ssssssssssssss</td></tr></table>
    復(fù)制代碼2. 使用 table-layout:fixed;強(qiáng)制table的寬度,內(nèi)層td,th采用word-break : break-all;或者word-wrap : break-word ;換行 <table width="200" style="table-layout:fixed;"><tr><td width="25%" style="word-break : break-all; ">abcdefghigklmnopqrstuvwxyz 1234567890</td><td style="word-wrap : break-word ;">abcdefghigklmnopqrstuvwxyz 1234567890</td></tr></table>
    復(fù)制代碼3.在td,th中嵌套div,p等采用上面提到的div,p的換行方法

    Firefox瀏覽器

    1. 使用 table-layout:fixed;強(qiáng)制table的寬度,內(nèi)層td,th采用word-break : break-all;或者word-wrap : break-word ;換行,使用overflow:hidden;隱藏超出內(nèi),這里overflow:auto;無(wú)法起作用<table style="table-layout:fixed" width="200"><tr>

    <td width="25%"  style="word-break : break-all; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td>

    <td width="75%" style="word-wrap : break-word; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td>

    </tr></table>
    復(fù)制代碼2.在td,th中嵌套div,p等采用上面提到的對(duì)付Firefox的方法。

    最佳CSS定義換行代碼.wrap { table-layout:fixed; word-break: break-all; overflow:hidden; }
    復(fù)制代碼當(dāng)然,這種現(xiàn)象出現(xiàn)的幾率很小,但是不能排除網(wǎng)友的惡搞。

    posted @ 2010-06-25 14:06 saobaolu| 編輯 收藏

    網(wǎng)址是http://wp.qq.com
    發(fā)現(xiàn)這個(gè)玩意越來(lái)越強(qiáng)大了,就忍不住把官方的介紹搬過(guò)來(lái):
    代碼樣例
    <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d";target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="點(diǎn)擊這里給我發(fā)消息"></a>

    1)、sigkey為個(gè)人鑒權(quán)key,請(qǐng)勿修改,否則無(wú)法發(fā)起臨時(shí)會(huì)話(huà)。

    2)、臨時(shí)會(huì)話(huà)圖標(biāo)<img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="點(diǎn)擊這里給我發(fā)消息">

    SRC是圖標(biāo)鏈接,自定義圖標(biāo)中可以替換這一部分為自己圖片的鏈接,

    參數(shù):

    P=以冒號(hào)“:”分隔多個(gè)參數(shù)

    第一個(gè)參數(shù)為版本號(hào),目前為1;

    第二個(gè)為QQ/TM號(hào)碼;

    第三個(gè)參數(shù)為圖像風(fēng)格,支持多種狀態(tài)。

    alt是圖標(biāo)旁留言。

    3)、除了自定義圖標(biāo)需要修改臨時(shí)會(huì)話(huà)圖標(biāo)外,其他情況下建議不要修改代碼,因?yàn)橛锌赡軐?dǎo)致在不同的環(huán)境和瀏覽器下,無(wú)法發(fā)起臨時(shí)會(huì)話(huà)。


    自定義在線風(fēng)格圖片

    用JS實(shí)現(xiàn),具體步驟如下:

    1) 申請(qǐng)代碼

    <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="點(diǎn)擊這里給我發(fā)消息"></a>

    2) 定義online數(shù)組,必須是online命名

    <script>var online= new Array();</script>

    3) 獲取在線狀態(tài)

    <script src="http://webpresence.qq.com/getonline?Type=1&80000805:"></script>

    可以獲取多個(gè),必須以冒號(hào)分隔,以冒號(hào)結(jié)尾,比如:

    <script src="http://webpresence.qq.com/getonline?Type=1&80000805:10000:123456:"></script>

    online[0]=0,表示80000805離線

    online[1]=1,表示10000在線

    online[2]=1,表示123456在線

    填寫(xiě)號(hào)碼的先后順序,分別對(duì)應(yīng)數(shù)組online的0、1、2

    4) 添加代碼

    把SRC='http://wpa.qq.com/pa?p=1:80000805:1'替換為自己的圖片,比如:

    <script> if(online[0]==0) document.write("<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://xxxx/outline.jpg' alt="點(diǎn)擊這里給我發(fā)消息"></a>"); 
    else document.write("<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://xxxx/online.jpg' alt="點(diǎn)擊這里給我發(fā)消息"></a>"); </script> 

    我是這樣看的,用tx的方法得到某QQ號(hào)是否在線,用js判斷,顯示online.jpg或者outline.jpg這兩個(gè)圖片,其余不變。

    posted @ 2010-06-25 07:28 saobaolu| 編輯 收藏

     

    package myeclipsegen;

    import java.io.*;

    public class MyEclipseGen {
        
    private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";
        
    public String getSerial(String userId, String licenseNum) {
            java.util.Calendar cal 
    = java.util.Calendar.getInstance();
            cal.add(
    13);
            cal.add(
    6-1);
            java.text.NumberFormat nf 
    = new java.text.DecimalFormat("000");
            licenseNum 
    = nf.format(Integer.valueOf(licenseNum));
            String verTime 
    = new StringBuilder("-").append(new java.text.
                    SimpleDateFormat(
    "yyMMdd").format(cal.getTime())).append("0").
                             toString();
            String type 
    = "YE3MP-";
            String need 
    = new StringBuilder(userId.substring(01)).append(type).
                          append(
    "300").append(licenseNum).append(verTime).toString();
            String dx 
    = new StringBuilder(need).append(LL).append(userId).toString();
            
    int suf = this.decode(dx);
            String code 
    = new StringBuilder(need).append(String.valueOf(suf)).
                          toString();
            
    return this.change(code);
        }

        
    private int decode(String s) {
            
    int i;
            
    char[] ac;
            
    int j;
            
    int k;
            i 
    = 0;
            ac 
    = s.toCharArray();
            j 
    = 0;
            k 
    = ac.length;
            
    while (j < k) {
                i 
    = (31 * i) + ac[j];
                j
    ++;
            }
            
    return Math.abs(i);
        }

        
    private String change(String s) {
            
    byte[] abyte0;
            
    char[] ac;
            
    int i;
            
    int k;
            
    int j;
            abyte0 
    = s.getBytes();
            ac 
    = new char[s.length()];
            i 
    = 0;
            k 
    = abyte0.length;
            
    while (i < k) {
                j 
    = abyte0[i];
                
    if ((j >= 48&& (j <= 57)) {
                    j 
    = (((j - 48+ 5% 10+ 48;
                } 
    else if ((j >= 65&& (j <= 90)) {
                    j 
    = (((j - 65+ 13% 26+ 65;
                } 
    else if ((j >= 97&& (j <= 122)) {
                    j 
    = (((j - 97+ 13% 26+ 97;
                }
                ac[i] 
    = (char) j;
                i
    ++;
            }
            
    return String.valueOf(ac);
        }

        
    public MyEclipseGen() {
            
    super();
        }

        
    public static void main(String[] args) {
            
    try {
                System.out.println(
    "please input register name:");
                BufferedReader reader 
    = new BufferedReader(new InputStreamReader(
                        System.in));
                String userId 
    = null;
                userId 
    = reader.readLine();
                MyEclipseGen myeclipsegen 
    = new MyEclipseGen();
                String res 
    = myeclipsegen.getSerial(userId, "20");
                System.out.println(
    "Serial:" + res);
                reader.readLine();
            } 
    catch (IOException ex) {
            }
        }
    }
    點(diǎn)此下載源文件和編譯好的class文件吧
    /Files/chenglu/MyEclipse61Gen.zip
    額,還有,MyEclipse6的下載地址是:請(qǐng)使用迅雷下載。。http://downloads.myeclipseide.com/downloads/products/eworkbench/6.0.1GA/MyEclipse_6.0.1GA_E3.3.1_FullStackInstaller.exe

    posted @ 2010-06-19 22:09 saobaolu| 編輯 收藏

    先來(lái)看html代碼
    <p>
      
    <label>選擇分類(lèi)</label>
        
    <select name="classId">
          
    <option value="1">企業(yè)動(dòng)態(tài)</option>
          
    <option value="2">最新活動(dòng)</option>
        
    </select>
    </p>
    在純struts2中獲取用戶(hù)選擇值直接
    private String classId;
     
    public void setTitle(String title) {
      
    this.title = title;
     }
     
    public String getClassId() {
      
    return classId;
     }
    就可以,需要注意的是select一定要帶name,option取到的是value

    posted @ 2010-06-17 07:12 saobaolu| 編輯 收藏

     

    import java.io.UnsupportedEncodingException;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import sun.misc.BASE64Encoder;

        
    public String EncoderByMd5(String str) throws NoSuchAlgorithmException, UnsupportedEncodingException {
            
    //確定計(jì)算方法
            MessageDigest md5=MessageDigest.getInstance("MD5");
            BASE64Encoder base64en 
    = new BASE64Encoder();
            
    //加密后的字符串
            String newstr=base64en.encode(md5.digest(str.getBytes("utf-8")));
            
    return newstr;
        }
     u錯(cuò)了,這不是md5的算法,是md5+base64加密,,

    posted @ 2010-06-16 09:09 saobaolu| 編輯 收藏

    1
    2if(rs.isAfterLast()==rs.isBeforeFirst()){
    3    out.print("您所查找的信息不存在,請(qǐng)確認(rèn)后再查找!");
    4    }
    else{
    5
    6}

    posted @ 2010-03-22 21:24 saobaolu| 編輯 收藏

    posted @ 2010-01-26 11:17 saobaolu| 編輯 收藏

    r(Read,讀取):對(duì)文件而言,具有讀取文件內(nèi)容的權(quán)限;對(duì)目錄來(lái)說(shuō),具有瀏覽目錄的權(quán)限。
    w(Write,寫(xiě)入):對(duì)文件而言,具有新增、修改文件內(nèi)容的權(quán)限;對(duì)目錄來(lái)說(shuō),具有刪除、移動(dòng)目錄內(nèi)文件的權(quán)限。
    x(eXecute,執(zhí)行):對(duì)文件而言,具有執(zhí)行文件的權(quán)限;對(duì)目錄了來(lái)說(shuō)該用戶(hù)具有進(jìn)入目錄的權(quán)限。
    e.g.  -rw-r--r--
    1.去掉第一個(gè)- 后面三個(gè)三個(gè)為一組 rw-/r--/r--  (所有者權(quán)限/組用戶(hù)權(quán)限/其他用戶(hù)權(quán)限)
    2.解析:所有者權(quán)限:讀取、寫(xiě)入、不可執(zhí)行;本組用戶(hù)權(quán)限:讀取、不可寫(xiě)入、不可執(zhí)行;其他用戶(hù)權(quán)限:讀取、不可寫(xiě)入、不可執(zhí)行。
    3.兩種方式去解析成數(shù)字表示法:
        3.1:r: 對(duì)應(yīng)數(shù)值4  w: 對(duì)應(yīng)數(shù)值2  x:對(duì)應(yīng)數(shù)值1,則:4+2+1=7/4+0+0=4/4+0+0=4:744權(quán)限
        3.2:將其轉(zhuǎn)換成二進(jìn)制數(shù),有值就是1,沒(méi)值就是0,則:110/100/100,轉(zhuǎn)換成十進(jìn)制:110=7/100=4/110=4:744權(quán)限

    posted @ 2010-01-08 04:36 saobaolu| 編輯 收藏

         摘要:   《Linux(第1—4章)總結(jié)》 1.       linux操作系統(tǒng)的特點(diǎn):開(kāi)放性,多用戶(hù),多任務(wù),良好的用戶(hù)界面,設(shè)備獨(dú)立性,出色的速度性能,豐富的網(wǎng)絡(luò)功能,可靠的安全性,可移植性強(qiáng),安全符合POSIX標(biāo)準(zhǔn),UNIX的完整實(shí)現(xiàn),開(kāi)發(fā)功能強(qiáng)。 2.     &nbs...  閱讀全文

    posted @ 2010-01-08 02:45 saobaolu| 編輯 收藏

         摘要:   1.       基本的 HTML 標(biāo)簽 標(biāo)簽 描述 ...  閱讀全文

    posted @ 2010-01-07 16:31 saobaolu| 編輯 收藏

    Spring的applicationContext.xml文件

    想必用過(guò)Spring的程序員們都有這樣的感覺(jué),Spring把邏輯層封裝的太完美了(個(gè)人感覺(jué)View層封裝的不是很好)。以至于有的初學(xué)者 都不知道Spring配置文件的意思,就拿來(lái)用了。所以今天我給大家詳細(xì)解釋一下Spring的applicationContext.xml文件。 Ok,我還是通過(guò)代碼加注釋的方式為大家演示: 以下是詳解Spring的applicationContext.xml文件代碼:
    <!-- 頭文件,主要注意一下編碼 -->
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    <!-- 建立數(shù)據(jù)源 -->
     <bean >
    <!-- 數(shù)據(jù)庫(kù)驅(qū)動(dòng),我這里使用的是Mysql數(shù)據(jù)庫(kù) -->
      <property >
       <value>com.mysql.jdbc.Driver</value>
      </property>
    <!-- 數(shù)據(jù)庫(kù)地址,這里也要注意一下編碼,不然亂碼可是很郁悶的哦! -->
      <property >
       <value>
           jdbc:mysql://localhost:3306/tie?useUnicode=true&characterEncoding=utf-8
       </value>
      </property>
    <!-- 數(shù)據(jù)庫(kù)的用戶(hù)名 -->
      <property >
       <value>root</value>
      </property>
    <!-- 數(shù)據(jù)庫(kù)的密碼 -->
      <property >
       <value>123</value>
      </property>
     </bean>
    <!-- 把數(shù)據(jù)源注入給Session工廠 -->
     <bean
      class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
      <property >
       <ref bean="dataSource" />
      </property>
    <!-- 配置映射文件 -->
      <property >
       <list>
        <value>com/alonely/vo/User.hbm.xml</value>
       </list>
      </property>
     </bean>
    <!-- 把Session工廠注入給hibernateTemplate -->
     <!-- 解釋一下hibernateTemplate:hibernateTemplate提供了很多方便的方法,在執(zhí)行時(shí)自動(dòng)建立 HibernateCallback 對(duì)象,例如:load()、get()、save、delete()等方法。 -->
     <bean
      class="org.springframework.orm.hibernate3.HibernateTemplate">
      <constructor-arg>
       <ref local="sessionFactory" />
      </constructor-arg>
     </bean>
    <!-- 把DAO注入給Session工廠 -->
     <bean >
      <property >
       <ref bean="sessionFactory" />
      </property>
     </bean>
    <!-- 把Service注入給DAO -->
     <bean >
      <property >
       <ref local="userDAO" />
      </property>
     </bean>
    <!-- 把Action注入給Service -->
     <bean >
      <property >
       <ref bean="userService" />
      </property>
     </bean>
    </beans>
    以上Spring的applicationContext.xml文件我是用的SSH架構(gòu),如果您用Spring的MVC架構(gòu),其原理也是一樣的。

    posted @ 2010-01-02 23:42 saobaolu| 編輯 收藏

    主站蜘蛛池模板: 6080午夜一级毛片免费看| 一级成人a免费视频| 1000部夫妻午夜免费| 亚洲AV日韩精品久久久久| 美女在线视频观看影院免费天天看| 国产AV无码专区亚洲AV漫画| 一二三四在线观看免费中文在线观看| 波多野结衣久久高清免费| 亚洲欧美综合精品成人导航| 日韩一区二区免费视频| 国产成人亚洲精品蜜芽影院| 亚洲一级黄色视频| 99免费精品视频| 久久精品国产亚洲AV无码偷窥| 成人免费观看一区二区| 亚洲性无码AV中文字幕| 亚洲国产精品成人久久蜜臀| 国产在线观看无码免费视频| 亚洲精品综合一二三区在线| aa级一级天堂片免费观看| 亚洲gay片在线gv网站| 亚洲国产人成精品| 3344在线看片免费| 亚洲中文字幕久在线| 免费在线视频一区| 日韩电影免费观看| 久久亚洲精品国产精品婷婷| 亚洲第一永久AV网站久久精品男人的天堂AV | a级毛片在线免费| 亚洲国产一区在线| 啦啦啦在线免费视频| 国产vA免费精品高清在线观看| 亚洲宅男永久在线| 日韩一品在线播放视频一品免费| 中文字幕在线免费观看视频| 亚洲特级aaaaaa毛片| 免费永久看黄在线观看app| 免费观看久久精彩视频| 亚洲精品乱码久久久久久V | 91亚洲精品第一综合不卡播放| 天天干在线免费视频|