This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[编辑器: vim] | |
插件 | |
ShowTrailingWhitespace, ack.vim, calendar.vim, ctrlp.vim, delimitMate, | |
indentLine, nerdcommenter, nerdtree, rsynccreatefile, snipmate.vim, | |
syntastic, tabular, tagbar, thrift, vim-easymotion, vim-fugitive, | |
vim-matchit, vim-multiple-cursors, vim-pathogen, vim-php-cs-fixer, | |
vim-airline, vim-surround, vimwiki,xptemplate,YouCompleteMe, | |
ctrlsf, webapi-vim, html5, gist-vim, gitgutter, gundo, | |
[版本管理器] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[opcache] | |
zend_extension=opcache.so | |
opcache.memory_consumption=128 | |
opcache.interned_strings_buffer=8 | |
opcache.max_accelerated_files=4000 | |
opcache.revalidate_freq=60 | |
opcache.fast_shutdown=1 | |
opcache.enable_cli= On | |
opcache.enable= On |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
位操作即开始学习计算机就接触的 | |
按位与(&): 1&1=1 1&0=0 0&0=0 | |
按位或(|):1|1=1 1|0=1 0|0=0 | |
按位异或(^):1^1=0 0^0=0 1^0=1 | |
这几个运算都支持交换律 | |
MySQL中也支持这几个位运算,今儿遇到记录用户登录日期一功能需求,设计数据库用一位记录一天,第一位记录1号,第二位记录2号登录,这样可节省数据库存储开支。于是用户在一天内登录多次如何存储,于是想起按位或运算可解决此法,第一次登录更新后,按位或时此位不再更新,好用。 | |
记录用户8号有登录。 | |
insert into USER_LOGIN_12 set sinaid=1686497165,LOGIN=64,MON=2 on duplicate key update login=login|128 ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache | |
yum -y install httpd #根据提示,输入Y安装即可成功安装 | |
service httpd start #启动Apache | |
备注:Apache启动之后会提示错误: | |
正在启动 httpd:httpd: Could not reliably determine the server's fully qualif domain name, using ::1 for ServerName | |
解决办法: | |
vi /etc/httpd/conf/httpd.conf #编辑 | |
找到 #ServerName www.example.com:80 | |
修改为 ServerName www.osyunwei.com:80 #这里设置为你自己的域名,如果没有域名,可以设置为localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 排序名称:冒泡排序. | |
* | |
* 说明:冒泡排序的原理非常简单,它重复地走访过要排序的数列,一次比较两个元素,如果他们的顺序错误就把他们交换过来. | |
* | |
* 步骤: | |
* 1 比较相邻的元素。如果第一个比第二个大,就交换他们两个。 | |
* 2 对第0个到第n-1个数据做同样的工作。这时,最大的数就“浮”到了数组最后的位置上。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[python] | |
exec, eval, repr | |
[php] | |
eval, call_user_func |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure the Balancer Process is Active | |
To successfully migrate data from a shard, the balancer process must be active. Check the balancer state using the sh.getBalancerState() helper in the mongo shell. For more information, see the section on balancer operations. | |
Determine the Name of the Shard to Remove | |
To determine the name of the shard, do one of the following: | |
From the admin database, run the listShards command. | |
Run either the sh.status() method or the sh.printShardingStatus() method. | |
The shards._id field lists the name of each shard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
查看当前系统下所有连接状态的数: | |
[root@vps ~]#netstat -n|awk '/^tcp/{++S[$NF]}END{for (key in S) print key,S[key]}' | |
TIME_WAIT 286 | |
FIN_WAIT1 5 | |
FIN_WAIT2 6 | |
ESTABLISHED 269 | |
SYN_RECV 5 | |
CLOSING 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
一、数组操作的基本函数 | |
数组的键名和值 | |
array_values($arr); 获得数组的值 | |
array_keys($arr); 获得数组的键名 | |
array_flip($arr); 数组中的值与键名互换(如果有重复前面的会被后面的覆盖) | |
in_array("apple",$arr); 在数组中检索apple | |
array_search("apple",$arr); 在数组中检索apple ,如果存在返回键名 | |
array_key_exists("apple",$arr); 检索给定的键名是否存在数组中 | |
isset($arr[apple]): 检索给定的键名是否存在数组中 | |
数组的内部指针 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[apache] | |
wget http://geekpeek.net/download/httpd-2.4.9-RPM-full.x86_64.tgz | |
tar -xvzf httpd-2.4.9-RPM-full.x86_64.tgz | |
cd httpd-2.4.9-RPM-full.x86_64 | |
yum -y localinstall * --skip-broken | |
<FilesMatch \.php$> | |
SetHandler application/x-httpd-php | |
</FilesMatch> |
OlderNewer