Zend/zend_operators.h:static inline char * zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
{
字符首指针
char *p = haystack;
最后一个字符
char ne = needle[needle_le...
分类:
Web程序 时间:
2015-07-02 12:11:26
阅读次数:
223
不定宽:指可设置任意宽度,或宽度有内容决定。自适应:无论其他元素怎么变,它都不用改。命题:设置不定宽与自适应 left right right 方案1:float+overflow.left{ float:le...
分类:
其他好文 时间:
2015-07-01 23:35:21
阅读次数:
140
这道题好理解,但是要自己想的话还是很难想出来的,动态规划说白了就是记录当前的结果,留给后面的用。求最长合法匹配的长度,这道题可以用一维动态规划逆向求解。假设输入括号表达式为String s,维护一个长度为s.length的一维数组dp[],数组元素初始化为0。 dp[i]表示从s[i]到s[s.le...
分类:
其他好文 时间:
2015-07-01 15:45:27
阅读次数:
124
static bool IsSymmetry1(string str){ if (string.IsNullOrEmpty(str) || str.Length == 1) { return false; } for (int i = 0; i < str.Le...
分类:
编程语言 时间:
2015-07-01 11:48:31
阅读次数:
142
当order表中openid等于当前openid,order表里的mendian字段与mendian里的id字段内容一致时关联mendian与order表,取出表order里的数据,(as m与as o是把门店表当作m,把order表当作o)select * from `order` as o le...
分类:
数据库 时间:
2015-06-30 12:08:29
阅读次数:
161
MongoDB 常用命令总结
简单的的增删改查数据
在查询结果中指定显示或者不显示某个字段
例如,我们希望在 lessons 集合中查找所有数据,但是不希望在返回结果中包含 slides 字段;因为 slides 是一个巨长的以 base64 表示的图片数组,影响查询结果的阅读。
那么我们就可以在 query object 后面跟上一个参数。如下:
db.le...
分类:
数据库 时间:
2015-06-30 10:34:39
阅读次数:
192
排序算法复习大致结束了,主要有以下几种:冒泡排序、选择排序、简单插入排序、希尔排序、归并排序、快速排序、堆排序。
#include
#define MAXSIZE 1000
using namespace std;
class SqList{
public:
SqList():length(0){}
SqList(int length1,int value=0):length(le...
分类:
编程语言 时间:
2015-06-30 10:33:18
阅读次数:
104
//随机生成指定长度的字符串,一般用于验证码function RandomCheckValid($len) { $srcstr = "1a2s3d4f5g6hj8k9qwertyupzxcvbnm"; mt_srand(); $strs = ""; for ($i = 0; $i < $le...
分类:
Web程序 时间:
2015-06-29 11:29:26
阅读次数:
116
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-06-27 06:24:03
阅读次数:
127
题目大意给出一个整数$n$的标准分解,求经过多少次$n=\phi(n)$操作后,可以使$n=1$。标准分解式中,质数$P \le 10^5$,次数$t \le 10^9$。多组数据,最后再输出所有答案中的最大值。分析欧拉函数的公式:$\phi(n)=\sum P_i^{t_i-1}\cdot(P_i...
分类:
其他好文 时间:
2015-06-25 21:04:19
阅读次数:
132