04 2012 档案

摘要:在 PHP 5 中。可以定义一个 __autoload 函数,来省去在每个php文件头上写一个个长长的包含文件列表注意:在 __autoload 函数中抛出的异常不能被 catch 语句块捕获并导致致命错误。<?phpfunction __autoload($class_name) { require_once $class_name . '.php';}$obj = new MyClass1();$obj2 = new MyClass2();?> 阅读全文
posted @ 2012-04-28 15:57 RYan~~ 阅读(155) 评论(0) 推荐(0)
摘要:+ 运算符把右边的数组附加到左边的数组后面,但是重复的键值不会被覆盖。<?php$a = array("a" => "apple", "b" => "banana");$b = array("a" => "pear", "b" => "strawberry", "c" => "cherry");$c = $a + $b; // Union of $a and $ 阅读全文
posted @ 2012-04-27 18:15 RYan~~ 阅读(318) 评论(0) 推荐(0)
摘要:foreach (array_expression as $value) statementforeach (array_expression as $key => $value) statement第一种格式遍历给定的 array_expression 数组。每次循环中,当前单元的值被赋给 $value 并且数组内部的指针向前移一步(因此下一次循环中将会得到下一个单元)。第二种格式做同样的事,只除了当前单元的键名也会在每次循环中被赋给变量 $key。 阅读全文
posted @ 2012-04-26 12:03 RYan~~ 阅读(162) 评论(0) 推荐(0)
摘要:animation.type=@"pageCurl";pageCurl 向上翻一页pageUnCurl 向下翻一页rippleEffect 滴水效果suckEffect收缩效果,如一块布被抽走cube 立方体效果oglFlip 上下翻转效果animation.type= kCATransitionFade;kCATransitionFade 淡出kCATransitionMoveIn 覆盖原图kCATransitionPush 推出kCATransitionReveal底部显出来animation.subtype =kCATr... 阅读全文
posted @ 2012-04-17 15:28 RYan~~ 阅读(236) 评论(0) 推荐(0)
摘要:[CABasicAnimation animationWithKeyPath:@"position"];animationWithKeyPath后面的属性不能随便填,它必须是CALayer的某项属性,你下面写的代码才会对应的去执行改变该属性的效果。animationWithKeyPath的值:opacitymarginzPositionbackgroundColorcornerRadiusborderWidthboundscontentscontentsRectcornerRadiusframehiddenmaskmasksToBoundsopacitypositionsh 阅读全文
posted @ 2012-04-17 11:25 RYan~~ 阅读(1134) 评论(0) 推荐(0)