<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
       :: 首頁 ::  :: 聯(lián)系 :: 聚合  :: 管理

    ajax巨好用,4級級聯(lián)菜單的解決

    Posted on 2006-12-29 19:37 路易 閱讀(226) 評論(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  希爾排序是將組分段,進(jìn)行插入排序.?
    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在线双飞| 久香草视频在线观看免费| 亚洲高清中文字幕综合网| 又粗又大又猛又爽免费视频| 亚欧免费一级毛片| 人碰人碰人成人免费视频| 亚洲精品国产免费| 国产中文在线亚洲精品官网| 手机看黄av免费网址| a级毛片免费全部播放| 亚洲国产一区二区三区在线观看| 久久久久亚洲av无码尤物| 国产成人免费片在线视频观看| 鲁大师在线影院免费观看| 夜夜爽妓女8888视频免费观看| 亚洲二区在线视频| 亚洲国产精品成人精品无码区| 国产亚洲福利一区二区免费看| 91av在线免费视频| 中文字幕无码免费久久9一区9| 精品亚洲av无码一区二区柚蜜| 亚洲视频在线观看| 亚洲人成中文字幕在线观看| 国产黄色片在线免费观看| 免费专区丝袜脚调教视频| 国产一区二区三区免费| 日韩免费在线中文字幕| 亚洲综合精品成人| 亚洲午夜电影在线观看| 久久夜色精品国产嚕嚕亚洲av| 亚洲精品乱码久久久久久不卡| 日本免费人成视频播放| 最近中文字幕无免费视频|