$a = file('TJ.csv');
$b = array_count_values($a);
print_r(array_search(2, $b));
$a = file('TJ.csv');
$b = array_count_values($a);
print_r(array_search(2, $b));
http://feiyang.me/2013/03/php-psr-in-chinese/
or
https://github.com/hfcorriez/fig-standards
德国互联网行业的Samwer兄弟可谓是风云人物。下面是台湾的inside做的一篇详细报道。
http://www.inside.com.tw/2011/06/30/germany-samwer
周末同事升级了php,升到5.5, 之前是5.3.
周一上班发现很多问题,主要集中如下
1. datetime 出现问题。这个问题其实应该是5.4的改动 。
在 日期与时间扩展 中,不再支持时区使用 TZ(TimeZone)环境变量设置。必须使用 date.timezone php.ini 配置选项或 date_default_timezone_set() 函数来指定时区。PHP 将不再尝试猜测时区,而是回退到“UTC”并发出一条
E_WARNING
错误。
2. 第二个问题是 mysql 的连接问题。出现的错误是
Why do you need the third parameter for in_array:
Chinese:
http://www.zendstudio.net/archives/php-in_array-s-low-performance/
Auf deutsch, gib es änliche Thema:
http://www.phpgangsta.de/php-in_array-die-performance-bremse
I found a article to do this:
http://www.phpvim.net/os/mac/git-branch-in-bash-prompt.html
It works.
在工作中用了git后在家就实在受不了svn的笨拙branch了。所以决定转移到git.
install过程主要参考了这两篇文档
http://git-scm.com/book/zh/%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E7%9A%84-Git-Gitosis
http://wiki.ubuntu.org.cn/Git%E6%9C%8D%E5%8A%A1%E5%99%A8Gitosis%E5%AE%89%E8%A3%85%E8%AE%BE%E7%BD%AE
安装的过程比较顺利,但是装完后出现点问题。
1.我是用ssh登录的。所以把自己的公钥传给git服务器段后可以不用输入密码。只要用用户git登录,实用我的公钥即可。
2 装完后,并不像上面的文章说得那样会自动为你的项目建立repository,需要自己跑到 /home/git目录下,创建自己个项目.git目录
3 目录创建完毕后,不要用git init 来初始化仓库,而是实用git –bar init 来。这是来自 http://www.cnblogs.com/abeen/archive/2010/06/17/1759496.html 的解释。否则第一次pushd的时候会有问题。
http://www.ibm.com/developerworks/cn/opensource/os-php-5.3namespaces/
今天看到的比较特殊的 use xxx as 的用法
use Sovendus\Model\Mapper\Strategy\Pick\OnePerSink as PickStrategy;