码迷,mamicode.com
首页 >  
搜索关键字:switch    ( 6374个结果
swift基础语法(控制流、可选类型、switch、循环、开闭空间)
1 // Playground - noun: a place where people can play 2 3 import Cocoa 4 5 //控制流 6 7 //Swift的条件语句包括if和switch,循环语句包含for-in、for、while和do-while,循环/判断...
分类:编程语言   时间:2015-04-02 10:19:44    阅读次数:295
Cisco 2960 限速
1、限制用户的下载5m(1)、针对一个class限速switch(config)#access-list101permitipanyhost10.10.10.100switch(config)#class-mapmatch-alldown1switch(config-cmap)#matchaccess-group101switch(config)#policy-mapdownswitch(config-pmap)#classdown1switch(config-pmap-c)#p..
分类:系统相关   时间:2015-04-02 06:46:44    阅读次数:280
cpp反汇编之控制结构
控制结构主要是关于  if/else   switch/case 废话不多说。。献上代码及反汇编分析。。 #include int main(int argc , char *argv[]) { int nInt = 9; // if(0 == nInt) __asm { cmp DWORD PTR [EBP - 4h] , 0 ; jle __exit; } // __...
分类:其他好文   时间:2015-04-01 23:52:29    阅读次数:177
cisco 2960限速
1、限制用户的下载5m(1)、针对一个class限速switch(config)#access-list101permitipanyhost10.10.10.100switch(config)#class-mapmatch-alldown1switch(config-cmap)#matchaccess-group101switch(config)#policy-mapdownswitch(config-pmap)#classdown1switch(config-pmap-c)#p..
分类:系统相关   时间:2015-04-01 20:15:40    阅读次数:241
JavaScript的流程控制语句switch
switch 语句是多重条件判断,用于多个值相等的比较。 var box = 1; switch (box) { //用于判断 box 相等的多个值 case 1 : alert('one'); b...
分类:编程语言   时间:2015-04-01 19:44:58    阅读次数:153
201306114357—实验2
#include#include #include main(){int a,b,c,sum=0,u;float resultTrue=0,n;char op;srand(time(NULL));do{a=rand()%10+1;b=rand()%10+1;c=rand()%4+1;switch(c...
分类:其他好文   时间:2015-04-01 17:36:57    阅读次数:129
201306114357-实验1
#include#include #include main(){int a,b,c;float resultTrue=0,n;char op;srand(time(NULL));do{a=rand()%10+1;b=rand()%10+1;c=rand()%4+1;switch(c%4){case...
分类:其他好文   时间:2015-04-01 17:03:08    阅读次数:86
作业一
#include#include#includeint i;void main(){char s;double deshu,daan;srand(time(0));int a=rand()%1000+1;int b=rand()%1000+1;int c=rand()%4+1;switch(c){c...
分类:其他好文   时间:2015-04-01 16:57:43    阅读次数:138
Java switch-case
首先从原理上来阐述这个问题:switch(表达式){case 常量表达式1:语句1;....case 常量表达式2:语句2;default:语句;}1.default就是如果没有符合的case就执行它,default并不是必须的.2.case后的语句可以不用大括号.3.switch语句的判断条件可以...
分类:编程语言   时间:2015-04-01 14:51:36    阅读次数:107
使用状态模式来重构Switch语句
【使用状态模式来重构Switch语句】 以下代码在一个Switch中处理了多个情况,当case越来越多或每个case逻辑越来越多时,会产生臃肿难以维护的代码。 状态模式常用于优化Switch的此种弊病。重构手段一,使用继承。 继续优化,使用状态模式。 这里使用的重构技术叫 Rep...
分类:其他好文   时间:2015-04-01 12:48:50    阅读次数:135
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!