Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2014-11-25 23:02:09
阅读次数:
229
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.分析:我们比较熟悉由一个sorted array生成一个BST,不同的是这里的数据...
分类:
其他好文 时间:
2014-11-25 23:01:58
阅读次数:
213
1.修改了系统自带头文件后,Xcode会报错解决方案:删掉下面文件夹的缓存即可(aplle是电脑的用户名)/Users/aplle/资源库/Developer/Xcode/DerivedData或者/Users/aplle/Library/Developer/Xcode/DerivedData2.使...
分类:
其他好文 时间:
2014-11-25 23:02:16
阅读次数:
190
题意:田忌和齐王各有n匹马,如果马的速度比齐王的快就赢200,慢则输200,相等不赔不赚。已知两人每匹马的速度(为整数)和齐王所排出的马的顺序,问田忌该如何应对才能使收益最大。分析:本以为是一道很简单的贪心,上来就贪,结果什么都没贪出来。看了题解才发现贪心是比较复杂的。这里贴上poj某牛的神分析。贪...
分类:
其他好文 时间:
2014-11-25 23:01:44
阅读次数:
229
我的板子设置HCLK=100M因此CLKVAL= int(HCLK/(VCLK*2)-1),其中VCLK即上图的DCLK=6.4M, CLKVAL="int"(100/12.8-1)=int(6.8)=6因此 VCLK = HCLK/[(CLKVAL+1)x2]= 100/2*(6+1)= 7.14...
分类:
其他好文 时间:
2014-11-25 23:00:22
阅读次数:
234
查找文档是非常简单的进入到官网learn api reference 让后就可以搜索了。 auto sprite = Sprite::create("HelloWorld.png"); sprite->setPosition(100,100); this->addChild(spr...
分类:
其他好文 时间:
2014-11-25 22:59:40
阅读次数:
210
自制示波器/频谱显示/DDS。基于ucos+ARMcortexM4+FPGA。带FIR,FFT,Kalman算法。最高采样率50M。存储8K*2字节数据。每秒64次波形(VGA刷屏63次/秒,快了也显示不出)fpga:数据采集,DDS波形产生,提供VGA时序驱动频谱。ARMcortexM4:外设接口...
分类:
其他好文 时间:
2014-11-25 22:58:33
阅读次数:
393
===================================Exception has been thrown by the target of an invocation. (mscorlib)===================================Exception ha...
分类:
其他好文 时间:
2014-11-25 22:59:36
阅读次数:
208
题目链接:BZOJ 1045Attention:数据范围中 n #include #include #include #include #include using namespace std;const int MaxN = 1000000 + 5;int n;typedef long long ...
分类:
其他好文 时间:
2014-11-25 22:59:09
阅读次数:
160
#import @class ZBTabBar;@protocol ZBTabBarDelegate -(void)tabBar:(ZBTabBar *)tabBar didSelectButtonFrom:(int)from to:(int)to;@end@interface ZBTabBar :...
分类:
其他好文 时间:
2014-11-25 22:59:54
阅读次数:
152
我把模板的声明写在X.h的文件里,把实现写在X.cpp的文件里然后编译不通过,然人很恼火的是,根本不知道啥原因在某网站上看到了一句 “又是一个模板分离编译的受害者”立马就改正了,于是把两个文件写在了一起没错了然后搜了一下“模板分离”有人说这是个传说有人说这是真的我也不深究这是啥了听人讲这是老版本的编...
分类:
其他好文 时间:
2014-11-25 22:57:54
阅读次数:
190
前面介绍了DDD分层架构的实体,并完成了实体层超类型的开发,同时提供了验证方面的支持。本篇将介绍另一个重要的构造块——值对象,它是聚合中的主要成分。 如果说你已经在使用DDD分层架构,但你却从来没有使用过值对象,这毫不奇怪,因为多年来养成的数据建模思维已经牢牢把你禁锢,以致于你在使用面向对象方...
分类:
其他好文 时间:
2014-11-25 22:59:54
阅读次数:
221
#define CREATE_FUNC(__TYPE__) \static __TYPE__* create() \{ \ __TYPE__ *pRet = new __TYPE__(); \ if (pRet && pRet->init()) \ { \ pRet-...
分类:
其他好文 时间:
2014-11-25 22:58:12
阅读次数:
101