Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element....
分类:
其他好文 时间:
2014-07-12 13:17:10
阅读次数:
248
.NET下的23中设计模式。※创建型模式篇●单件模式(Single Pattern)●抽象工厂模式(Abstract Factory)●建造者模式(Builder Pattern)●工厂方法(Factory Method)●原型模式(Protype Pattern)※结构型模式篇●适配器模式(Ada...
分类:
Web程序 时间:
2014-07-10 11:11:42
阅读次数:
242
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2014-07-07 23:24:09
阅读次数:
210
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:
其他好文 时间:
2014-07-07 22:57:13
阅读次数:
309
This post introduces Sandbox pattern to avoid the namespace drawbacks(1. Reliance on a single global variable to be the application’s global. 2. Long,...
分类:
数据库 时间:
2014-07-07 20:15:42
阅读次数:
262
1.单一职责原则
单一职责原则的核心思想就是:系统中的每一个对象都应该只有一个单独的职责,而所有对象所关注的就是自身职责的完成。英文缩写SRP Single Responsibility Principle
单一职责原则——》“高内聚,低耦合”,每个类应该只有一个职责,此外只能提供一种功能,而引起类变化的原因应该只有一个。在设计模式中,所有的设计模式都遵循这一原则。
...
分类:
其他好文 时间:
2014-06-28 07:22:31
阅读次数:
276
Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./home/chenwei/.rvm/rubies/ruby-1.9.3-p547/bin/rubyextconf.rbcheckingforruby/thread.h...nocheckingforrb_thread_blocking_region()...yescheckingforrb_wait_for_single_fd()...yescheckingforrb_hash_dup()...
分类:
其他好文 时间:
2014-06-28 00:32:22
阅读次数:
296
工程目录:Singleton.h//.h#define single_interface(class) + (class *)shared##class;//.m// \ 代表下一行也属于宏// ##是分隔符#define single_implementation(class) \static c...
分类:
数据库 时间:
2014-06-27 14:15:13
阅读次数:
255
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-06-27 12:21:24
阅读次数:
215
【题目】
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
【题意】
给定一个整数数组,其中除了一个数以外,其他数都是成对出现的,...
分类:
其他好文 时间:
2014-06-26 10:13:27
阅读次数:
254