- 博客(12)
- 收藏
- 关注
原创 php 接口
<?php // 实现多继承interface A { public function Atest();}interface B { public function Btest();}class Person implements A,B { public function Atest() { echo "A"; } public function Btest(
2016-01-31 22:24:07 286
转载 View controller-based status bar appearance
info.plist文件中,View controller-based status bar appearance项设为YES,则View controller对status bar的设置优先级高于application的设置。为NO则以application的设置为准,view controller的prefersStatusBarHidden方法无效,是根本不会被调用的。一、如果Vie
2016-01-27 09:32:20 594
原创 php 单例模式
直接代码<?phpclass Single { private $name; private static $single; private function __construct($name) { $this->name = $name; } private function __clone() { } public static function getins
2016-01-22 23:59:33 281
原创 php 静态与非静态的区别
静态与非静态的区别1. 设置出发点:静态是给类使用,非静态是给对象使用2. 对象不能访问静态属性(对象访问属性只会去对象的内存区域(堆)找,而静态属性在代码区),对象能够访问静态方法(静态方法和普通方法都在代码区里)3. 类能够访问普通方法(方法里面没有使用$this),类不能访问普通属性(属性是在对象空间里)<?phpclass Person{
2016-01-22 22:07:57 589
原创 ios 在状态栏上做动画
实现的代码static StatusWindow *tipsWindow = nil;+ (StatusWindow *)shareStatusWindow{ if (!tipsWindow) { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{
2016-01-21 17:20:12 328
转载 mac 下删除mysql
打开终端,依次执行sudo rm /usr/local/mysqlsudo rm -rf /usr/local/mysql*sudo rm -rf /Library/StartupItems/MySQLCOMsudo rm -rf /Library/PreferencePanes/My*vim /etc/hostconfig (and removed the line MYS
2016-01-11 21:49:01 272
原创 java 范型
import java.util.*;public class Basic { public static void main(String[] args) { List c = new ArrayList(); c.add("one"); c.add("two"); for (int i = 0; i < c.size(); i ++) { String s =
2016-01-01 21:19:44 287
原创 java map 的用法
import java.util.*;public class MapKeyWord { public static void main(String[] args) { Map m1 = new HashMap(); Map m2 = new TreeMap(); m1.put("one",new Integer(1)); m2.put("two",new Integer(
2016-01-01 20:42:57 253
原创 java list的用法
import java.util.*;public class ListKeyWord { public static void main(String[] args) { List list = new LinkedList(); for (int i = 0; i < 10; i ++) { list.add("a" + i); } System.out.print
2016-01-01 17:33:56 258
原创 java Set 用法
import java.util.*;public class SetKeyWord { public static void main(String[] args) { Set s = new HashSet(); s.add("hello"); s.add("world"); s.add("hello"); s.add("hello1"); System.out
2016-01-01 17:18:18 361
原创 Iterator 关键字,用于集合的遍历
Iterator 关键字,用于集合的遍历import java.util.*;public class IteratorKeyWord { public static void main(String[] args) { Collection c = new ArrayList(); c.add("hello"); c.add(new Integer(5)); S
2016-01-01 16:47:04 399
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人