read和write
#include
ssize_t read(int fd, void *buf, size_t count);
ssize_t write(int fd, const void *buf, size_t count);
参数:
fd: 文件描述符
buf:数据缓冲区,用于保存要从fd读取或写入的数据
count:输入/写入的数据最大字节数。(实际读取或...
分类:
其他好文 时间:
2014-10-30 13:33:52
阅读次数:
238
使用apache的重写规则来禁用OPTIONS方法。方法如下: 在apache配置文件http.conf中添加以下代码:
LoadModule rewrite_module path/to/apache/modules/mod_rewrite.so
RewriteEngine On
RewriteCo...
分类:
Web程序 时间:
2014-10-30 12:01:26
阅读次数:
2320
将Json存进本地文件夹NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);NSString *path=[paths objectAtIndex:0];NSSt...
分类:
移动开发 时间:
2014-10-30 09:26:27
阅读次数:
143
用g++编译程序时,-l 与-L各是什么意思?还有-I-l表示:编译程序到系统默认路进搜索,如果找不到,到当前目录,如果当前目录找不到,则到LD_LIBRARY_PATH等环境变量置顶的路进去查找,如果还找不到,那么编译程序提示找不到库。-L表示:编译程序按照-L指定的路进去寻找库文件,一般的在-L...
分类:
其他好文 时间:
2014-10-30 07:06:14
阅读次数:
180
伪静态,通过设置服务器服务,做域名地址的转换工作。
urlManager地址美化,通过程序的方式实现地址美化工作。
通过在主配置文件中配置组件来实现:
'components'=>array(
// uncomment the following to enable URLs in path-format
'urlManager'=>array(
...
分类:
其他好文 时间:
2014-10-30 00:18:52
阅读次数:
276
JSP/EL入门 * SUN提供了开发WEB资源的技术 Servlet/JSP * response.getWriter().write(); .write(""); .write(""); * JSP(java server pages) * JSP可以编写的代码 * HTML+java代码+JS...
分类:
其他好文 时间:
2014-10-30 00:10:43
阅读次数:
197
Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner cas...
分类:
其他好文 时间:
2014-10-29 23:44:24
阅读次数:
197
如果class内含const static integral data member,那么根据C++标志规格,我们可以在class之内直接给予初值。所谓integral泛指所有的整数型别(包括浮点数),不单只是指int,下面是一个例子:#includeusing namespace std;temp...
分类:
其他好文 时间:
2014-10-29 23:33:08
阅读次数:
356
The Triangle
时间限制:1000 ms | 内存限制:65535 KB
难度:4
描述
7
3 8
8 1 0
2 7 4 4
4 5 2 6 5
(Figure 1)
Figure 1 shows a number triangle. Write a program that calculates the highest sum of ...
分类:
其他好文 时间:
2014-10-29 21:37:14
阅读次数:
213
例如用命令echo $PATH则可以查看该环境变量为/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin添加环境定义一个变量a=${PATH}:.再给环境变量PATH=$a 赋值重新查看echo $PATH环境变量变为/usr/lo...
分类:
系统相关 时间:
2014-10-29 21:28:57
阅读次数:
221