You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
有f(n) = f(n - 1) + f(n...
分类:
其他好文 时间:
2014-07-04 08:39:44
阅读次数:
304
Linux上安装MySQL默认是数据库的表大小写敏感的。修改很简单,只要该一个mysql的配置文件就可以了。
mysql> show tables;
+--------------------------------------+
| Tables_in_cddl |
+--------------------------------------...
分类:
数据库 时间:
2014-07-04 07:51:23
阅读次数:
264
问题链接: MVC怎样实现异步调用输出HTML页面该问题是个常见的 case, 故写篇文章用于提示新人。在asp.net mvc中返回View时使用的是ViewResult,它继承自ViewResultBase 同一时候它还有个兄弟PartialViewResult相信聪明的你已经知道了它俩的差别了...
分类:
Web程序 时间:
2014-07-04 00:09:12
阅读次数:
4739
题目链接:uva 10539 - Almost Prime Numbers
题目大意:给出范围low~high,问说在这个范围内有多少个数满足n=pb,(p为素数).
解题思路:首先处理出1e6以内的素数,然后对于每个范围,用solve(high)?solve(low?1),solve(n)用来处理小于n的满足要求的数的个数。枚举素数,判断即可。
#include
#include...
分类:
其他好文 时间:
2014-07-03 16:50:09
阅读次数:
190
BUY LOW, BUY LOWER
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 8327
Accepted: 2888
Description
The advice to "buy low" is half the formula to success i...
分类:
其他好文 时间:
2014-07-03 15:58:07
阅读次数:
225
1、声明一个数列int a[3]={1,2,3};int a[]={1,2,3};char city[]={'a','b','c'};char city[]="abc";2、处理数列for(int i=0; i list[mid]) low = mid+1; else return ...
分类:
其他好文 时间:
2014-07-03 06:51:00
阅读次数:
224
测试了两个case,属于之前blog的遗留问题: innodb如何加载数据字典 flush tables都做了什么操作先来看下innodb加载数据字典: 首次使用:select * from tt;1. 创建handler对象函数调用栈: open_binary_frm ...
分类:
数据库 时间:
2014-07-03 06:21:07
阅读次数:
318
写完上一篇文章后,陆续有朋友给出了其他思路,我在小结在这篇博客中。思路一:转换成字符串后输出(这也是上一篇文章给的思路)1 1 SELECT CASE WHEN @a % @b = 0 THEN CAST(@a / @b AS VARCHAR(16)) 2 2 EL...
分类:
数据库 时间:
2014-07-02 19:52:12
阅读次数:
249
在现有类和结构体的类型基础上,扩展新的功能。 语法:extension SomeType{// new functionality to add to SomeType goes here}An extension can extend an existing type to make itadopt one or more protocols.Where this is the case,the...
分类:
其他好文 时间:
2014-07-02 07:36:22
阅读次数:
244
今天接到朋友数据库一个case,在DBCA建库时,把自动收集统计信息的选项去掉了,数据库运行半年没有收集过统计信息,现在要启用方法如下:
exec DBMS_AUTO_TASK_ADMIN.ENABLE();
exec DBMS_AUTO_TASK_ADMIN.ENABLE(client_name => 'auto optimizer stats collection',ope...
分类:
数据库 时间:
2014-07-02 07:31:51
阅读次数:
248