<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
    主站蜘蛛池模板: 日本一区免费电影| 午夜时刻免费入口| 中文字幕人成无码免费视频| AV免费网址在线观看| 波多野结衣中文一区二区免费| 亚洲午夜精品一级在线播放放| 亚洲欧洲免费视频| 亚洲精品天堂无码中文字幕| 2022国内精品免费福利视频| 24小时日本电影免费看| 国产大片免费观看中文字幕| 亚洲精品无码久久久久| 亚洲另类春色国产精品| 国产成人精品亚洲一区| 免费国产成人午夜在线观看| 最近高清国语中文在线观看免费| 亚洲熟妇少妇任你躁在线观看无码 | 精品特级一级毛片免费观看| 久青草视频97国内免费影视| 8x网站免费入口在线观看| 成人国产mv免费视频| 亚洲爆乳精品无码一区二区三区| 亚洲午夜久久久久久尤物| 一区二区三区免费视频播放器| 亚洲高清视频免费| 亚洲国产精品第一区二区三区| 久久亚洲精精品中文字幕| 国产成人高清亚洲一区久久| 久久久久久AV无码免费网站| 国产一级一片免费播放i| 亚洲成熟xxxxx电影| 国产精品亚洲综合一区在线观看| 久久综合九色综合97免费下载| 日本免费人成黄页在线观看视频 | 国产v片免费播放| 亚洲综合成人网在线观看| 黄色一级免费网站| 色se01短视频永久免费| 国产午夜亚洲精品午夜鲁丝片| 亚洲日本久久久午夜精品| 精品国产麻豆免费人成网站|