php-fpm.conf最佳体验参数

目前感觉手感最好的 pm = dynamic ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be ; served. Equivalent...
PHP开发 | 2016-10-29 19:21 | 阅读 2468 次 | 评论 0 条

现在HTML5网页都做的像幻灯片

看内容一屏一屏的翻页,鼠标滚轮和滚动条都失去了意义,干脆只留上下键翻页得了。 效果酷炫的不得了,有用的内容没多少。如同包装精美的月饼盒,一米长半米宽,打开里面只有几个核桃大小的月饼。
心情随笔 | 2016-09-30 15:06 | 阅读 4291 次 | 评论 0 条

vim清除当前搜索关键词的高亮

:noh
Linux | 2016-08-29 20:58 | 阅读 4061 次 | 评论 0 条

php计算微信支付的sign值,不用手工拼接参数了。

function getSign($array) { $pay_key = "xxxxxxxxxxxxxxxxxxxxxxxx"; unset($array['sign']); ksort($array); $stringA = urldecode(http_build_query($array)); $stringSignTemp="$stringA&key=".$pay_key; return strtoupper(md5($stringSignTemp)); }
PHP开发 | 2016-08-25 23:55 | 阅读 5169 次 | 评论 0 条

php 数组和xml互相转换

function xmlToArray($xml) { libxml_disable_entity_loader(true); $xmlstring = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); $val = json_decode(json_encode($xmlstring), true); return $val; } function arrayToXml($arr) { $xml = "<xml>"; foreach ($arr as $key => $v...
PHP开发 | 2016-08-25 23:48 | 阅读 2997 次 | 评论 0 条

使用命令行工具sed批量替换文件夹下所有文件的内容

find ./ -type f -exec sed -i 's/src="原字符串/新字符串/g' {} \;
Linux | 2016-08-21 11:52 | 阅读 6416 次 | 评论 0 条

解决ubuntu12.04 server命令行无法显示中文的问题

在命令行输入中文直接显示 ---------,用vim打开含有中文的文件只能显示部分中文,非常之不方便,下面几行命令解决: apt-get install language-pack-gnome-zh-hans-base apt-get install language-pack-zh-hans apt-get install language-pack-zh-hans-base
Linux | 2016-08-20 22:37 | 阅读 3556 次 | 评论 0 条

PHP实现编译器思路,使用preg_split分割字符串和注释

preg_split("/(\".*?\")/is", "good\n$str=\"字符串\";bye", -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); 这样分割出来数组是: => [ """ good\n = """, ""字符串"", ";bye", ] 然后根据是不是引号"开头,如果是引号开头,则视为字符串
PHP开发 | 2016-08-19 15:14 | 阅读 3245 次 | 评论 1 条

jquery实现滚动新闻播报,超简短

太短了,我都佩服我自己了。原理就是不停的把第一条放到最后,然后向前滚动一条。 <style> .container{position:relative; height:30px; width:200px; overflow:hidden; border:1px solid #333;} .news{position:absolute; top:0; margin:0;} .news li{line-height:30px;} </style> <div class="container"> <ul class="news"> <li><a hre...
WEB开发 | 2016-08-09 20:26 | 阅读 4286 次 | 评论 0 条

UBUNTU 14.04 安装 nsenter

cd /tmp; curl https://www.kernel.org/pub/linux/utils/util-linux/v2.25/util-linux-2.25.tar.gz | tar -zxf-; cd util-linux-2.25; sudo apt-get install autopoint autoconf libtool automake ./configure --without-python --disable-all-programs --enable-nsenter --without...
Linux | 2016-08-07 20:16 | 阅读 6690 次 | 评论 0 条

Web.Debug.config和Web.Release.config设置无效的解决办法

起因:开发的时候需要在本地和服务器配置不同的数据库连接,本地开发环境连接的是本地数据库,服务器连接的是生产环境数据库。这是在项目开发中很常见的情况。没想到,在visual studio.net(2015版)中踩了一个不小的坑。 先是从网上找到了分别设置的办法,在Web.Debug.config中插入 <system.data xdt:Transform="InsertIfMissing"> <DbProviderFactories> <add name="MySQL Data Provider" invariant="MySql....
Windows | 2016-08-06 17:26 | 阅读 9054 次 | 评论 0 条

VB.NET尖括号中的类似装饰器的东西叫Attribute

不是类的属性,是类似python中装饰器的东西,也类似java中的注解,vb.net把尖括号跟Attribute用了,泛型只能用其他的方式了 <HttpPost()> <ValidateAntiForgeryToken()> Function Edit(<Bind(Include:="ID,Title,ReleaseDate,Genre,Price,Rating")> ByVal movie As Movie) As ActionResult If ModelState.IsValid Then db....
.NET | 2016-07-27 21:53 | 阅读 7539 次 | 评论 0 条

ASP.NET下跨应用共享Session和使用Redis进行Session托管

http://www.cnblogs.com/UliiAn/p/3554863.html
Windows | 2016-07-27 14:12 | 阅读 7271 次 | 评论 0 条

thinkphp的nginx配置

server { listen 80; server_name www.abc.com; #charset utf-8; access_log /var/www/www.abc.com/log/host.access.log; error_log /var/www/www.abc.com/log/error.log; # gzip off; root /var/www/www.abc.com/web; index index.php index.h...
Linux | 2016-07-20 15:57 | 阅读 8302 次 | 评论 0 条

ubuntu安装mono相关

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list sudo apt-get update sudo apt-g...
Linux | 2016-07-19 22:57 | 阅读 8279 次 | 评论 0 条

两款模拟键盘输入和鼠标点击的命令行工具

linux平台的:xdotool,安装方式:apt-get install xdotool osx平台的:cliclick,安装方式:brew install cliclick xdotool模拟1000次鼠标点击: for((i=0;i<1000;i++));do xdotool click 1;done cliclick模拟1000次鼠标点击: for((i=0;i<1000;i++));do cliclick c:.;done
Linux | 2016-07-16 20:08 | 阅读 11752 次 | 评论 0 条

jetbrains的IDE(如phpstorm)无法使用pasteapp的解决办法

原来是因为jetbrains家的IDE有自己的一套粘贴板,修改配置文件启用系统粘贴板即可: 在IDE的Preferences中搜“paste from History”,取消默认的快捷键或设置为其它快捷键,总之别跟pasteapp的快捷键冲突 在程序中右键要设置的IDE(如phpstorm),“显示包内容” 编辑包里的“bin/idea.properties”,添加一行“ide.mac.useNativeClipboard=True” 重启IDE。 出处:...
默认分类 | 2016-06-16 17:53 | 阅读 20686 次 | 评论 0 条

我能很明显的感觉到智能手机触摸屏对牙齿牙龈的辐射

13年春天搭上了智能手机的末班车,买了第一个智能手机,用了几天后牙齿开始怕酸。13年末跟风买了个带触摸屏的超极本,用了一段时间以后牙龈出血的厉害,当时以为是牙周炎,吃了很多药都不管用,后来换用不带触屏的笔记本就好了,到14年,手机也换回了诺基亚1050,牙龈逐渐恢复到正常状态。 在移动互联网时代,完全不用智能手机不可能,换了几部手机包括一些大厂商的,都感觉到了对牙龈的伤害,辐射重的能感觉到整个嘴里发麻,像喝了可乐一样(当然是没有可乐的甜味的)。 今天把前几天买的一部智能手机卖给收旧手机的二道贩子了,亏了500多,已经激活无法退货。...
默认分类 | 2016-06-10 18:00 | 阅读 20093 次 | 评论 2 条

php实现无限级分类及下拉菜单树形效果。

分类表必须有三个字段:id, parent_id, name function make_tree($arr){ if(!function_exists('make_tree1')){ function make_tree1($arr, $parent_id=0){ $new_arr = array(); foreach($arr as $k=>$v){ if($v->parent_id == $parent_id){ $new_arr[] = $v; unset($arr[$k]); } } ...
PHP开发 | 2016-06-04 10:10 | 阅读 29266 次 | 评论 1 条

微信公众号找回步骤

https://mp.weixin.qq.com/acct/findacct?action=scan 点“下一步”
默认分类 | 2016-05-25 09:18 | 阅读 22543 次 | 评论 0 条
浏览2780905次
文章归档