1:where和If最本质的区别,以及一些小的区别1.1:The WHERE statement examines what is in the input page buffer and selectsobservations before they are loaded in the progr...
分类:
其他好文 时间:
2014-11-30 15:22:33
阅读次数:
380
hanoi塔:
原题大意我就不说明了,大家懂得
#include
void move(int n,char x,char y)
{
printf("move %d from %c to %c\n",n,x,y);
}
int hanoi(int n,char x,char y,char z)
{
if(n==1)
move(1,x,z);
else
{
hanoi(n-1,x,z,y);
mo...
分类:
其他好文 时间:
2014-11-30 14:08:45
阅读次数:
125
完整的源代码及用法测试代码可以在我的资源中去下载.
C++语法不支持模板函数/模板成员函数作为回调函数,同时把运行期代码向编译期代码转换也只有switch...case或者if..else能够实现。
如果case比较多的时候,代码非常臃肿,而且类似的大片代码中,往往只有一个参数的不同,其它都是相同的。这对于用户来说,都是一个大量的重复性的hard-code性的负担,而且也容易导致出...
分类:
其他好文 时间:
2014-11-30 12:37:05
阅读次数:
283
玩家下线,之前一直感觉这个过程有点复杂else if (stat == link_stat::link_disconnected || stat == link_stat::link_connect_failed ){ GameChannel* pDisconnectGC = m_vecCha...
分类:
其他好文 时间:
2014-11-30 06:11:55
阅读次数:
169
数据库表Testid自动增长的主键namenvarchar(10)idname1A2A3A4B5B6C7C把重复的name后面加-1,-2....如下所示idname1A2A-13A-24B5B-16C7C-1selectid,name=name+casewhenno=1then‘‘else‘-‘+rtrim(no-1)endinto#AAfrom(select*,no=row_number()over(partitionbynameorderbyid)fro..
分类:
其他好文 时间:
2014-11-30 01:02:01
阅读次数:
136
【config_inc.php】【redis.class.php】 rets[$redis_cfg['server']]) === TRUE){$this -> ret = $this -> rets[$redis_cfg['server']];return TRUE;}else{$this -> ...
分类:
Web程序 时间:
2014-11-29 15:52:37
阅读次数:
243
SELECT表名=casewhena.colorder=1thend.nameelse''end,表说明=casewhena.colorder=1thenisnull(f.value,'')else''end,字段序号=a.colorder,字段名=a.name,标识=casewhenCOLUMNP...
分类:
数据库 时间:
2014-11-29 14:35:37
阅读次数:
156
1.一列数的规则如下: 1、1、2、3、5、8、13、21、34...... 求第30位数是多少, 用递归算法实现。public class TuZi { public int TZ(int x) { if (x == 1 || x == 2) { return 1; } else { return...
分类:
其他好文 时间:
2014-11-29 14:26:38
阅读次数:
117
Atitit. 有限状态机 fsm 状态模式
1. 有限状态机 1
2. “状态表”和“状态轮换表” 1
3. 有限状态机概念(状态(State)事件(Event)转换(Transition) 动作(Action) 2
4. 状态机的应用场景 2
4.1. ,“有限状态机”在游戏的人工智能方面是很有用处的。 2
4.2. 用状态机模式消除复杂的 if else 逻辑 2
4.3...
分类:
其他好文 时间:
2014-11-29 11:57:54
阅读次数:
280
俱乐部搞了一个小小的CTF来给我们这些小虾米玩,结果除了一个水的不能再水的第二别的太让学长们失望了有木有%>_ im2[x,y][1]): a=0+a*2 else: a=1+a*2 i=i+1 if i==8: s=s+chr(a) print s
运行结果: 题目...
分类:
其他好文 时间:
2014-11-29 00:09:59
阅读次数:
2316