码迷,mamicode.com
首页 >  
搜索关键字:递归 return    ( 77935个结果
WPF在代码中创建DataTemplate时候的异常
今天写段程序用到了在代码中手动创建DataTemplate,var factory = new FrameworkElementFactory(typeof(OperationColumn));return new DataTemplate...
分类:其他好文   时间:2014-04-28 15:39:11    阅读次数:603
模板类的全特化、偏特化
我们先来定义一个普通的模板类1 template2 struct Test3 {4 Test(){ cout t1;4 Test t2;5 Test t3;6 return 0;7 }输出的结果1: 模板类 模板类 模板类如果我们这样写,再增加一个模板类 1 ...
分类:其他好文   时间:2014-04-28 08:02:07    阅读次数:749
bat 栈上限
栈耗尽,递归会导致该问题。****** B A T C H R E C U R S I O N exceeds STACK limits ******Recursion Count=1240, Stack Usage=90 percent****** B A T C H PROCESS...
分类:其他好文   时间:2014-04-28 05:04:48    阅读次数:409
[leetcode] Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".给定两个二进制的字符串,返回他们的和。对于a,b两个二进制字符串,首先通过交换使a的长度小于b...
分类:其他好文   时间:2014-04-28 02:05:20    阅读次数:502
38属性的种种,只读只写属性、自动属性、静态属性、抽象属性、接口属性
□ 只读属性public class Example { string name; public string Name { get {return name;} } }□ 只写属性public class Example { string ...
分类:其他好文   时间:2014-04-27 23:34:03    阅读次数:507
如何设置页面缓存或不用页面缓存
一、设置页面缓存1、直接在页面上用声明来缓存页面2、使用服务端方法://将Cache-Control标头设置为HttpCacheAbility值Response.Cache.SetCacheability(HttpCacheability.Public);//将页面的绝对过期时间Response.C...
分类:其他好文   时间:2014-04-27 23:02:18    阅读次数:456
素数求和
#include using namespace std;int fun(int a){ if(a==1) return 0; for(int i=2;i>M; while(M--) { int i,sum=0; cout>N; ...
分类:其他好文   时间:2014-04-27 22:06:54    阅读次数:578
[hdu-2041] 超级楼梯
1、因为每次只能走 1 步或 2 步,所以从第一级走上第二级只能上 1 步,只有一种走法。 f ( 2 ) = 1 2、从第一级走到第三级,可以从第一级上 2 步,也可以从第二级上 1 步,有两种走法。 f ( 3 ) = 2 3、所以,走上第 n 级,可以从第 n-1 级上 1 步,也可以从第 n-2 级上 2 步。 f ( n ) = f ( n-1 ) + f ( n-2 ) 不难发现,这是一个“斐波那契函数” 注意:这道题用 Java 语言采取递归求解,程序会超时!...
分类:其他好文   时间:2014-04-27 19:38:15    阅读次数:519
leetcode day4 -- Binary Tree Postorder(Preorder) Traversal && Edit Distance
?? 1、Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 retu...
分类:其他好文   时间:2014-04-27 18:58:59    阅读次数:481
POJ2007 Scrambled Polygon
极角排序...
分类:其他好文   时间:2014-04-27 18:14:10    阅读次数:547
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!