html中调用cgi。html中调用html:cgi中调用html: if( (strcmp(name,"root")+1) && (strcmp(pass,"password")+1) ) printf("%s",name);cgi接受html信息: date = g...
分类:
Web程序 时间:
2014-07-22 22:55:33
阅读次数:
518
在项目中,涉及大访问量时,合理的使用缓存能减轻数据库的压力,同时提升用户体验。即在非实时性的需求的前提下,一小段时间内(若干秒),用于显示的数据从缓存中获取的,而不用直接读取数据库,能有效的减少数据库的读取压力。这里记录一下php语言使用memcache的情形: 首先,我们建立一个memcache....
分类:
Web程序 时间:
2014-07-22 22:55:17
阅读次数:
375
Windows下的Memcache安装1. 下载memcache的windows稳定版,解压放某个盘下面,比如在c:\memcached2. 在终端(也即cmd命令界面)下输入 c:\memcached\memcached.exe -d install --安装memcached成为服务,这样才能正...
分类:
其他好文 时间:
2014-07-19 21:26:36
阅读次数:
268
学习记录一下:具体看实际操作。使用cygwin 或者 git 进入shell脚本模式,进入你的项目文件夹:大概是在:D:\quick-cocos2d-x\bin\yourProject执行命令:../compile_scripts.sh -i scripts -m files -o my_scrip...
分类:
其他好文 时间:
2014-07-19 19:19:18
阅读次数:
337
file/filetype.c #include "apue.h"intmain(int argc, char *argv[]){ int i; struct stat buf; char *ptr; for (i = 1; i < argc; i++) { printf("%s: ", argv[...
分类:
其他好文 时间:
2014-07-18 23:38:27
阅读次数:
412
#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[]){ int a = 1, b = 1, c = 0; int max = 0x7FFFFFFF; printf("%d\n", max);// 打印一下整型的最大值 ...
分类:
其他好文 时间:
2014-07-18 23:36:57
阅读次数:
191
file/seek.c#include "apue.h"intmain(void){ if (lseek(STDIN_FILENO, 0, SEEK_CUR) == -1) printf("cannot seek\n"); else printf("seek OK\n"); exit(0);}
分类:
其他好文 时间:
2014-07-18 23:27:20
阅读次数:
187
memcache中Memcache::add()方法在缓存服务器之前不存在key时, 以key作为key存储一个变量var到缓存服务器。我们使用add来向服务器添加一个键值对应,如果成功则添加,否则说明存在另一个并发作业在进行操作。通过add的原子性来判断是否要执行热点代码。具体代码需结合上一篇的....
分类:
其他好文 时间:
2014-07-17 00:06:01
阅读次数:
296
while循环适用于循环次数未知的场景。语法格式:
whileCONDITION
do
statement
……
done
说明:while是当CONDITION成立的时候就执行循环,当条件不成立时,退出循环。示例1:计算从1加到100.[root@Server3Learn]#catwhile1.sh
#!/bin/bash
declare-isum=0
declare-ii=0
while[..
分类:
其他好文 时间:
2014-07-16 16:42:00
阅读次数:
191