lnmp架构是现在很常用的,拜读过张晏的博客,内核,php-fpm,nginx,fastcgi进行调优,用autobench压力测试,访问php页面,从100个并发开始,每次加50个,直到1000个并发,pm=static,pm.max_children=128,机器8G内存,CPU是L5520,测...
分类:
Web程序 时间:
2014-07-16 23:16:55
阅读次数:
352
概述:本文主要讲述一些搜索算法的使用,以及其中奥妙思想的思考。 一:广度搜索与深度搜索---BFS与DFS 1:实现算法导论中的BSF #include #define MAX 1000000struct Node{ int d; int p; int color; int id;};int _tm...
分类:
其他好文 时间:
2014-07-16 23:08:16
阅读次数:
224
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-10 11:24:15
阅读次数:
229
Given a non-negative number represented as an array of digits, plus one to the number.
分类:
其他好文 时间:
2014-07-10 09:59:58
阅读次数:
196
计算文件夹大小(get-childitem -path $folder -recurse| measure-object -property length -sum).sum/1mb#拷贝文件提示进度(脚本只对零散文件有效,如果有大型文件的话,进度显示不正确)$folder = "D:\Temp_d...
分类:
其他好文 时间:
2014-07-10 00:34:36
阅读次数:
392
Given two binary strings, return their sum (also a binary string).
分类:
其他好文 时间:
2014-07-09 23:52:48
阅读次数:
383
在做公司的一个项目中,需要上传文件,使用的是AjaxUpload JS组件,选择完文件后,发送请求到指定接口,随即返回服务器上文件的相对路径,然后PHP再做其他工作(这不是重点)处理上传的PHP程序,限制其文件大小为20Mphp.ini中post_max_size 20Mupload_max_fil...
分类:
其他好文 时间:
2014-07-08 00:06:09
阅读次数:
913
const int MAX = 1e6+10;const int inf = 0x3f3f3f3f;int n,m;int lx[MAX],ly[MAX];int match[MAX];int usex[MAX],usey[MAX];int w[MAX][MAX];int find(int u) {...
分类:
其他好文 时间:
2014-07-08 00:04:48
阅读次数:
266
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum
= 22,
5
/ ...
分类:
其他好文 时间:
2014-06-28 07:31:28
阅读次数:
214