Vasya's birthday is approaching and Lena decided to sew a patterned handkerchief to him as a present. Lena chose digits from 0 to n as
the pattern. The digits will form a rhombus. The largest digit ...
分类:
其他好文 时间:
2014-07-22 23:04:32
阅读次数:
412
参考链接:http://www.cnblogs.com/dyingbleed/archive/2012/12/03/2800007.html
http://blog.csdn.net/way_ping_li/article/details/8925936
分类:
移动开发 时间:
2014-05-01 12:38:33
阅读次数:
438
设计模式(Design
pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结,
使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性设计框架可复用面向对象软件系统一般划分为两大类:应用程序工具箱和框架(Framework)我们平时开发的具体软件都是应用程...
分类:
其他好文 时间:
2014-05-01 12:27:43
阅读次数:
360
第Ⅰ部分 开篇 序章第Ⅱ部分 创建型模式篇第1章 单例模式(Single
Pattern)第2章 简单工厂模式(SampleFactory)第3章 抽象工厂模式(Abstract Factory) 第4章 建造者模式(Builder
Pattern)第5章 原型模式(Protype Pattern)...
分类:
其他好文 时间:
2014-05-01 11:39:35
阅读次数:
425
判断valid,没有更好的方法,只能brute force。 1 class Solution { 2
public: 3 bool isValidSudoku(vector > &board) { 4 5 int n; 6 for (int...
分类:
其他好文 时间:
2014-05-01 08:54:28
阅读次数:
332
[cpp]view
plaincopyvoidCSTest1View::OnDraw(CDC*pDC){CSTest1Doc*pDoc=GetDocument();ASSERT_VALID(pDoc);//TODO:adddrawcodefornativedatahereCRectrcClient;...
分类:
其他好文 时间:
2014-05-01 07:47:58
阅读次数:
322
1.1) public class ReturnIt{2) returnType
methodA(byte x, double y){3) return (short)x/y*2;4) }5) }what is valid
returnType for methodA in line 2?这...
分类:
其他好文 时间:
2014-05-01 03:58:57
阅读次数:
330
获取字符串长度%x="abcd"#方法一%expr length $x4# 方法二%echo
${#x}4# 方法三%expr "$x" : ".*"4# expr 的帮助# STRING : REGEXP anchored pattern match
of REGEXP in STRING查找子串...
分类:
其他好文 时间:
2014-05-01 02:54:16
阅读次数:
404
官方定义
将抽象部分和实现部分相分离,使他们可以独立的变化 —— GOF
看GOF的书籍有这样的感觉,每个汉字都认识,连成句子就是读不懂,这就是抽象的魅力,把很多具体的现象抽象成一句话,然后告诉我们这就是某某模式。类似于博士论文,初看高深,翻译成白话就亲民很多,最近RTFSC,遇到桥接模式比较多,把查阅的资料和心得整理。
场景
定义里说,抽象...
分类:
其他好文 时间:
2014-04-30 22:27:39
阅读次数:
392
ACM BFS Open the Lock hdu1195 暴力广度优先搜索...
分类:
其他好文 时间:
2014-04-29 13:48:20
阅读次数:
360