PHP学习笔记——延迟静态绑定

2016-01-25
阅读 2 分钟
5.4k
以上aClass和bClass继承于base这个抽象类,但是在两个子类中同时实现了create()这个静态方法。遵从oop思想,这种重复代码应该放在base这个父类中实现。

[LeetCode刷题日记] Remove Duplicates from Sorted Array

2015-07-09
阅读 1 分钟
2.1k
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. For example, Given input array nums = [1,1,2], Your function should return length ...

[LeetCode刷题日记] Summary Ranges

2015-07-08
阅读 2 分钟
4.2k
Given a sorted integer array without duplicates, return the summary of its ranges.

C++学习笔记——指针

2015-05-18
阅读 2 分钟
2.5k
首先声明:在C++编程时,尽量减少数组和指针的使用。首先数组和指针容易产生不可预料的错误,相对也复杂和繁琐。在程序中,很多时候数组和指针的写法可以使用Vector类型和迭代器来替代。

php学习笔记——变量

2015-04-30
阅读 1 分钟
2.3k
由于我有过一些其他语言的基础,所以在我的php笔记中通常只会记录一些基础知识学习中比较容易忽略的点,与其他语言不太相同的点。并不是知识点全面的记载。