<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| 編輯 收藏

    主站蜘蛛池模板: 国产精品亚洲美女久久久| 亚洲国产精品国自产电影| 亚洲w码欧洲s码免费| 嘿嘿嘿视频免费网站在线观看| 久久精品国产亚洲夜色AV网站| 免费91麻豆精品国产自产在线观看 | 久久国产亚洲精品麻豆| 韩国免费a级作爱片无码| 亚洲色大成网站www永久一区| 999zyz**站免费毛片| 亚洲精品卡2卡3卡4卡5卡区| 丁香花在线视频观看免费| 亚洲大尺度无码无码专区| 91成人免费观看| 在线观看亚洲AV每日更新无码| 成人免费毛片观看| 国产成人亚洲精品电影| 亚洲片国产一区一级在线观看| 一级特黄录像免费播放肥| 亚洲人成在线播放网站岛国| 黄页免费的网站勿入免费直接进入| 国产精品亚洲四区在线观看| 午夜老司机免费视频| 曰批全过程免费视频观看免费软件| 亚洲综合日韩久久成人AV| 免费91最新地址永久入口 | 亚洲视频在线免费看| 亚洲AV成人影视在线观看| 五月婷婷亚洲综合| 大地资源网高清在线观看免费| 亚洲一卡2卡4卡5卡6卡在线99 | 久香草视频在线观看免费| 日韩亚洲欧洲在线com91tv| 日韩不卡免费视频| 一级毛片a女人刺激视频免费| 亚洲gv猛男gv无码男同短文| 成人毛片免费视频| a成人毛片免费观看| 亚洲日韩精品国产一区二区三区| 久久久久国产亚洲AV麻豆| 国产92成人精品视频免费|