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

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

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

    posts - 22, comments - 8, trackbacks - 0, articles - 0
       :: 首頁 ::  :: 聯系 :: 聚合  :: 管理

    ajax巨好用,4級級聯菜單的解決

    Posted on 2006-12-29 19:37 路易 閱讀(227) 評論(0)  編輯  收藏 所屬分類: AJAX

    ?

    ??1 冒泡排序
    ??2
    ??3 using ?System;
    ??4
    ??5 namespace ?BubbleSorter?
    ??6
    ??7 {? public ? class ?BubbleSorter?
    ??8
    ??9 {? public ? void ?Sort( int ?[]?list)?
    ?10
    ?11 {? int ?i,j,temp;?
    ?12
    ?13 bool ?done = false ;?
    ?14
    ?15 j = 1 ;?
    ?16
    ?17 while ((j<list.Length) && ! done))?
    ?18
    ?19 {?done = true ;?
    ?20
    ?21 for (i = 0 ;i<list.Length - j;i ++ )?
    ?22
    ?23 {?
    ?24
    ?25 if (list[i]>list[i + 1 ])?
    ?26
    ?27 {?
    ?28
    ?29 done = false ;?
    ?30
    ?31 temp = list[i];?
    ?32
    ?33 list[i] = list[i + 1 ];?
    ?34
    ?35 list[i + 1 ] = temp;?
    ?36
    ?37 }
    ?}
    ?
    ?38
    ?39 j ++ ;?}
    ?
    ?40
    ?41 }
    ?}
    ?
    ?42
    ?43 public ? class ?MainClass?
    ?44
    ?45 {? public ? static ? void ?Main()?
    ?46
    ?47 {?
    ?48
    ?49 int []?iArrary = new ? int [] { 1 , 5 , 13 , 6 , 10 , 55 , 99 , 2 , 87 , 12 , 34 , 75 , 33 , 47 } ;?
    ?50
    ?51 BubbleSorter?sh = new ?BubbleSorter();?
    ?52
    ?53 sh.Sort(iArrary);?
    ?54
    ?55 for int ?m = 0 ;m<iArrary.Length;m ++ )?
    ?56
    ?57 Console.Write( " {0}? " ,iArrary[m]);?
    ?58
    ?59 Console.WriteLine();?
    ?60
    ?61 }
    ?}
    ?
    ?62
    ?63 }
    ?
    ?64 ?
    ?65
    ?66 ?
    ?67
    ?68 選擇排序?
    ?69
    ?70 using ?System;?
    ?71
    ?72
    ?73 namespace ?SelectionSorter?
    ?74
    ?75 {? public ? class ?SelectionSorter?
    ?76
    ?77 {? private ? int ?min;?
    ?78
    ?79 public ? void ?Sort( int ?[]?list)?
    ?80
    ?81 {? for int ?i = 0 ;i<list.Length - 1 ;i ++ )?
    ?82
    ?83 {?min = i;?
    ?84
    ?85 for int ?j = i + 1 ;j<list.Length;j ++ )?
    ?86
    ?87 {? if (list[j]<list[min])?
    ?88
    ?89 min = j;?
    ?90
    ?91 }
    ?
    ?92
    ?93 int ?t = list[min];?
    ?94
    ?95 list[min] = list[i];?
    ?96
    ?97 list[i] = t;?
    ?98
    ?99 }
    ?}
    ?
    100
    101 }
    ?
    102
    103 public ? class ?MainClass?
    104
    105 {? public ? static ? void ?Main()?
    106
    107 {?
    108
    109 int []?iArrary = new ? int [] { 1 , 5 , 3 , 6 , 10 , 55 , 9 , 2 , 87 , 12 , 34 , 75 , 33 , 47 } ;?
    110
    111 SelectionSorter?ss = new ?SelectionSorter();?
    112
    113 ss.Sort(iArrary);?
    114
    115 for int ?m = 0 ;m<iArrary.Length;m ++ )?
    116
    117 Console.Write( " {0}? " ,iArrary[m]);?
    118
    119 Console.WriteLine();?
    120
    121 }
    ?}
    ?
    122
    123 }
    ?
    124 ?
    125
    126 ?
    127
    128 插入排序?
    129
    130 using ?System;
    131
    132 namespace ?InsertionSorter?
    133
    134 {? public ? class ?InsertionSorter?
    135
    136 {? public ? void ?Sort( int ?[]?list)?
    137
    138 {? for int ?i = 1 ;i<list.Length;i ++ )?
    139
    140 {? int ?t = list[i];?
    141
    142 int ?j = i;?
    143
    144 while ((j> 0 && (list[j - 1 ]>t))?
    145
    146 {?list[j] = list[j - 1 ];?
    147
    148 -- j;?
    149
    150 }
    ?
    151
    152 list[j] = t;?}
    ?
    153
    154 }
    ?
    155
    156 }
    ?
    157
    158 public ? class ?MainClass?
    159
    160 {? public ? static ? void ?Main()?
    161
    162 {?
    163
    164 int []?iArrary = new ? int [] { 1 , 13 , 3 , 6 , 10 , 55 , 98 , 2 , 87 , 12 , 34 , 75 , 33 , 47 } ;?
    165
    166 InsertionSorter?ii = new ?InsertionSorter();?
    167
    168 ii.Sort(iArrary);?
    169
    170 for int ?m = 0 ;m<iArrary.Length;m ++ )?
    171
    172 Console.Write( " {0} " ,iArrary[m]);?
    173
    174 Console.WriteLine();?
    175
    176 }
    ?}
    ?
    177
    178 }
    ?
    179 ?
    180
    181 ?
    182
    183 希爾排序?
    184
    185  希爾排序是將組分段,進行插入排序.?
    186
    187 using ?System;?
    188
    189 namespace ?ShellSorter?
    190
    191 {?
    192
    193 public ? class ?ShellSorter?
    194
    195 {?
    196
    197 public ? void ?Sort( int ?[]?list)?
    198
    199 {?
    200
    201 int ?inc;?
    202
    203 for (inc = 1 ;inc< = list.Length / 9 ;inc = 3 * inc + 1 );?
    204
    205 for (;inc> 0 ;inc /= 3 )?
    206
    207 {?
    208
    209 for int ?i = inc + 1 ;i< = list.Length;i += inc)?
    210
    211 {?
    212
    213 int ?t = list[i - 1 ];?
    214
    215 int ?j = i;?
    216
    217 while ((j>inc) && (list[j - inc - 1 ]>t))?
    218
    219 {?
    220
    221 list[j - 1 ] = list[j - inc - 1 ];?
    222
    223 j -= inc;?
    224
    225 }
    ?
    226
    227 list[j - 1 ] = t;?
    228
    229 }
    ?}
    ?
    230
    231 }
    ?}
    ?
    232
    233 public ? class ?MainClass?
    234
    235 {? public ? static ? void ?Main()?
    236
    237 {?
    238
    239 int []?iArrary = new ? int [] { 1 , 5 , 13 , 6 , 10 , 55 , 99 , 2 , 87 , 12 , 34 , 75 , 33 , 47 } ;?
    240
    241 ShellSorter?sh = new ?ShellSorter();?
    242
    243 sh.Sort(iArrary);?
    244
    245 for int ?m = 0 ;m<iArrary.Length;m ++ )?
    246
    247 Console.Write( " {0}? " ,iArrary[m]);?
    248
    249 Console.WriteLine();?
    250
    251 }
    ?}
    ?
    252
    253 }
    ?

    http://www.uml.org.cn/net/200603242.htm
    主站蜘蛛池模板: 看亚洲a级一级毛片| baoyu122.永久免费视频| 国产亚洲精午夜久久久久久| 免费日本一区二区| 日本亚洲精品色婷婷在线影院| 亚洲高清成人一区二区三区| 无码国产精品一区二区免费3p| 国产亚洲精品VA片在线播放| 亚洲性久久久影院| 免费大片黄在线观看yw| 亚洲高清免费视频| 亚洲专区一路线二| 亚洲色中文字幕无码AV| 成人午夜视频免费| 日韩精品免费在线视频| 美女黄频免费网站| 亚洲天堂电影在线观看| 亚洲婷婷国产精品电影人久久| 国产在线jyzzjyzz免费麻豆| 中文字幕乱理片免费完整的| 亚洲一区二区三区在线观看网站| 国产亚洲一区二区在线观看| 日韩免费观看的一级毛片| 98精品全国免费观看视频| 九一在线完整视频免费观看| 亚洲一卡一卡二新区无人区| 亚洲精品免费在线观看| 国产日韩成人亚洲丁香婷婷| 成人免费视频小说| 国产精品免费观看| 精品国产污污免费网站| 四虎影视久久久免费| 亚洲熟妇久久精品| 亚洲依依成人精品| 中文字幕亚洲色图| 国产亚洲婷婷香蕉久久精品| 免费a在线观看播放| 成人免费无码大片A毛片抽搐| 免费成人福利视频| 久久精品无码专区免费东京热| 中文字幕永久免费视频|