Test Header HTML Code

04 2011 档案

An introduction to Objective-C Meta Class
摘要:An introduction to Objective-C Meta ClassFirst, let's have a look at the base class NSObject.@interface NSObject <NSObject> { //implement protocol NSObject Class isa; //point to meta class, all instances of NSObject share the same meta class.}+ (void)load;+ (void)initialize;- (id)init;+ (i 阅读全文

posted @ 2011-04-19 17:40 宁静的水泡 阅读(640) 评论(0) 推荐(0)

数组的初始化方法大全
摘要:#include <stdio.h>#include <stdlib.h>#include <string.h>对于数组,有以下几个原则:int main(int argc, char *argv[]){ char a[10] = {'\0'}; //{0, ..., 0}第1个为0,后面的0为系统自动补的,所以这种行为可以用来进行字符串的初始化 int b[10] = {1, 2, 3,}; //{1, 2, 3, 0, ..., 0}后面7个0为系统自动补的 int c[10]; memset(c, 0, sizeof(int) * 10 阅读全文

posted @ 2011-04-06 10:43 宁静的水泡 阅读(643) 评论(0) 推荐(0)

HTTP协议中支持代理和压缩的相关字段
摘要:以前一直搞不清http协议如何支持代理的,今天看了一下恍然大悟。http协议有一个host字段。如果我们想访问 http://www.sohu.com一般就是 GET http://www.sohu.com HTTP/1.1这样就直接连接www.sohu.com主机。如果host为www.sohu.com那么request-uri可以为相对路径,比如 GET / HTTP/1.1如果我们有个局域网代理服务器192.168.1.2 端口为80//下面应该写错了,host应该与代理无关,??那么我们在构造http请求的时候,就需要设置一下request-header中的host字段。这样http协 阅读全文

posted @ 2011-04-03 22:41 宁静的水泡 阅读(999) 评论(0) 推荐(0)

导航

Test Rooter HTML Code