<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
       :: 首頁 ::  :: 聯系 :: 聚合  :: 管理

    2010年6月26日

         摘要: 代碼改編自 NetPuter 大大發布的 SDK,這份 SDK 是我用過的最好的 PHP SDK,修改了一些東西:1、增加了收到的訊息類型 voice video2、收到text的時候,如果是 hello2bizuser 的話,調用 onsubscribe 方法(微信4.x 以前貌似都還是發hello2bizuser 所以不得不兼容?。〤ode highlighting produced by A...  閱讀全文

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

    <TABLE style="table-layout: auto | fixed">
    auto: 默認值
    fixed: 寬度固定,截斷超出的內容

    <TABLE style="word-break: normal | break-all | keep-all">
    normal: 默認值,按字詞截斷換行
    break-all: 強行截斷并換行
    keep-all: 不截斷不換行

    使用:style="table-layout:fixed;"
    表示輸出停止,停留在設定的長度內.

    使用:style="word-break : break-all;"
    表示對超長部分,換行再繼續顯示.

    對于在英文中使用,請使用style="table-layout:fixed; word-wrap:break-word"
    推薦使用word-wrap:break-word;word-break:break-all;table-layout:fixed;

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

    word-wrap同word-break的區別

    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. 必要時會觸發word-break。

    word-break:
    normal      Default. Allows line breaking within words. 好像是只對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.

    總結如下:
    word-wrap是控制換行的。
    使用break-word時,是將強制換行。中文沒有任何問題,英文語句也沒問題。但是對于長串的英文,就不起作用。

    break-word是控制是否斷詞的。
    normal是默認情況,英文單詞不被拆開。
    break-all,是斷開單詞。在單詞到邊界時,下個字母自動到下一行。主要解決了長串英文的問題。
    keep-all,是指Chinese, Japanese, and Korean不斷詞。即只用此時,不用word-wrap,中文就不會換行了。(英文語句正常。)


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

    ff下:
    如這2個都不用的話,中文不會出任何問題。英文語句也不會出問題。但是,長串英文會出問題。
    為了解決長串英文,一般用word-wrap:break-word;word-break:break-all;。但是,此方式會導致,普通的英文語句中的單詞會被斷開(ie下也是)。

    目前主要的問題存在于 長串英文 和 英文單詞被斷開。其實長串英文就是一個比較長的單詞而已。
    即英文單詞應不應該被斷開那?那問題很明顯了,顯然不應該被斷開了。
    對于長串英文,就是惡意的東西,自然不用去管了。但是,也要想些辦法,不讓它把容器撐大。
    用:overflow:auto; ie下,長串會自動折行。ff下,長串會被遮蓋。


    所以,綜上,最好的方式是word-wrap:break-word;overflow:hidden;而不是word-wrap:break-word;word-break:break-all;。
    word-wrap:break-word;overflow:auto;在ie下沒有任何問題。在ff下,長串會被遮住部分內容。

    另,測試代碼如下:

    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;//臨時變量,用于冒泡交換        
     6         int[] num=new int[10];  //聲明一個空的數組  10個長度
     7         Scanner sc = new Scanner(System.in);
     8         FileOutputStream out=new FileOutputStream("1.txt");
     9         PrintStream p=new PrintStream(out);
    10         //開始循環賦值
    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         // 循環輸出
    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 }
    最后應該把p給close了哈

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

    主站蜘蛛池模板: 亚洲av无码一区二区乱子伦as| 国产91在线免费| 久久亚洲春色中文字幕久久久| h视频在线观看免费| 亚洲区日韩区无码区| 国产免费内射又粗又爽密桃视频 | 日本一区免费电影| 亚洲avav天堂av在线网毛片| 国产精品高清全国免费观看| 大桥未久亚洲无av码在线| 亚洲精品视频在线看| baoyu777永久免费视频| 亚洲欧洲日产国码久在线观看| 日韩精品内射视频免费观看 | 国产免费毛不卡片| 亚洲色无码国产精品网站可下载| 超pen个人视频国产免费观看| 在线视频精品免费| 亚洲中文字幕日本无线码| 国产又长又粗又爽免费视频| 又粗又长又爽又长黄免费视频| 亚洲Av永久无码精品三区在线| 69式互添免费视频| 色天使色婷婷在线影院亚洲| 在线A亚洲老鸭窝天堂| **aaaaa毛片免费同男同女| 亚洲色中文字幕在线播放| 亚洲乱码日产精品a级毛片久久| 久久青青草原国产精品免费| 亚洲专区一路线二| gogo全球高清大胆亚洲| 亚洲精品免费视频| 亚洲成av人片在www鸭子| 99视频在线精品免费观看6| 一本一道dvd在线观看免费视频| 亚洲欧洲一区二区| 国产男女猛烈无遮挡免费视频| 精品亚洲永久免费精品| AV激情亚洲男人的天堂国语| 久久精品国产精品亚洲蜜月| 日韩免费视频播播|