题目:Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.题解:其实我觉得这题。。为啥不给个更明确....
分类:
编程语言 时间:
2014-08-07 12:43:19
阅读次数:
227
工厂模式看英文书的时候挺纠结的,Head First里面感觉讲得很乱,都快看不下去了,看中文别人总结的,一条主线马上就出来了。工厂模式主要分三种1) simple factory model (static factory model) 2)factory method model 3)abstar...
分类:
其他好文 时间:
2014-08-06 22:43:16
阅读次数:
305
一、准备工作1.开发工具 Visual Studio 20132.安装Code First with Database3.创建示例数据库 MyShopUSE MyShopGOCREATE TABLE [dbo].[Categories]( [CategoryId] [INT] NOT NULL I....
分类:
数据库 时间:
2014-08-06 22:41:02
阅读次数:
443
好长时间没有写博文了,今天继续。这次跟大家分享的内容起因于对一个枚举值列表的序列化,下面简化后的代码即能重现。为了明确起见,我显式指定了枚举的基础类型。// 定义一个枚举类型。public enum SomeEnum :int{ First, Second, Third, ....
分类:
Web程序 时间:
2014-08-06 22:18:12
阅读次数:
317
The sequence of messages that both text views and text fields send to their delegates is as follows: 1. Just before a text object becomes first resp.....
分类:
其他好文 时间:
2014-08-06 22:10:23
阅读次数:
216
(一)inline函数(摘自C++ Primer的第三版)
在函数声明或定义中函数返回类型前加上关键字inline即把min()指定为内联(内置函数)。
inline int min(int first, int secend) {/****/};
inline 函数对编译器而言必须是可见的,以便它能够在调用点内展开该函数。与非inline函数不同的是,i...
分类:
其他好文 时间:
2014-08-06 19:19:42
阅读次数:
228
The first wealth is health.健康是最大的财富。1.瑜伽已成为全人类的财富。Yoga has become the treasure of all haman beings.Yoga has become the treasure of the world.2.你听说过瑜伽吗...
分类:
其他好文 时间:
2014-08-06 18:32:32
阅读次数:
228
$str1 = "1 -the first str";$str2 = "1 -the second str";print "numerically equal\n" if($str1 == $str2);print "stringwise equal\n" if($str1 eq $str2);结果...
分类:
其他好文 时间:
2014-08-06 18:13:44
阅读次数:
579
1.try 永远不会抛出异常 在 没有的时候 返回 nil
province_id = Province.find_by_name(prov).try(:id)
2.find(:first, :condotions) 方法 不言而与
mobile_info = MobileInfo.find(:first, :conditions => ["mobile_num = ? ", mobi...
分类:
其他好文 时间:
2014-08-06 10:32:31
阅读次数:
304
1 at first glance 乍一看 2 disruption中断,混乱,破坏n eg. The rail strike is causing major disruptions at the country’s ports.铁路罢工使该国港口陷入了一片混乱 3 boredom 厌烦,无聊n ...
分类:
移动开发 时间:
2014-08-06 08:24:01
阅读次数:
332