detach
detach与remove不同的是,他不会销毁element及其绑定的事件,在需要利用这些信息的时候,便是使用detach的时机。
事件命名空间+detach
fastcgi_finish_request()flushes all response data to the client and ends the request. The worker can keep running heavy work after the connection closes.
With PHP-FPM this is a simple “respond first, finish later” pattern. Notes mostly followed Huoding’s post (2011, concept still applies).
fastcgi_finish_request
此函数冲刷(flush)所有响应的数据给客户端并结束请求。 这使得客户端结束连接后,需要大量时间运行的任务能够继续运行。
用php-fpm的话,这个函数可以实现伪异步哦,这么厉害的函数却不知道,惭愧!
在这里记录一下,代码修改主要参考于火丁笔记
update :国内page不稳定,已放弃!!!
update : coding.net现在已替换为腾讯云托管 操作应该类似, page若有问题可重建项目生成
update : gitcafe已关闭,现在已替换为coding.net 操作类似
Hexo是node.js生成的静态博客,托管到gitcafe或者github的page服务就可以变成自己免费的博客,当然最重要的是写博客更方便了。
有了github,为什么还要用gitcafe。因为国内的百度抓取太不给力,只好用gitcafe来配合。。。
本文主要说一下gitcafe的配置
怎么做?直接上 官方wiki
看着默认的vim显示效果不爽,查了下设置,搞起。
将vim的环境文件copy到自己常用用户的主目录下
cp /usr/share/vim/vimrc ~/.vimrc
修改.vimrc文件归读写属性
sudo chmod o+w .vimrc
语法高亮
用vim等打开.vimrc在文件最后加上
syntax on
Put LIMIT in a subquery that sits under IN, ALL, ANY, or SOME, and MySQL hits you with:
ERROR 1235 (42000): This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery’
LIMIT is already a weak spot in MySQL, so the server blocks this combination. You still need the result set sometimes.
Example rules:
You might write something like:
当你在mysql子查询中使用了limit,那么恭喜你,你会看到
ERROR 1235 (42000): This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery’
limit在mysql中本来的效率就不高,mysql于是也禁止在子查询中使用limit,可是如果非要用呢
比方说需求是:
直觉告诉我们,下边的sql是可以的。
Background: scraping school records via JSONP in the browser console. The lesson is not the site — it is that reduce is not always the right merge tool when your batches are not plain arrays.
背景是一次爬取高校数据(控制台里用 JSONP 攒批次)。真正想留下的是:大批量合并时,reduce 当「累加器」并不总是对的;要看数据结构。
下面用当时的踩坑说明 reduce 与 concat 的差别。
今天把typecho上的文章也迁移到Hexo上来,可以专注纯粹的创作学习了,哈哈。
留下批处理文件,供需要者使用!
批处理文件地址
Questions? Leave a comment below or email: newbvirgil@gmail.com![]()
pear channel-discover pear.phpdoc.org
pear install phpdoc/phpDocumentor
# 对文件
phpdoc -f filename.php -t docs
# 对目录
phpdoc -d directory -t docs
Questions? Leave a comment below or email: newbvirgil@gmail.com![]()