上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 73 下一页
摘要: http://code.google.com/p/goog-maps-demo/source/browse/trunk/examples/Map/fitBounds.html?r=6http://www.tongmap.cn/code/webgis3.0--API/symbols/sic.LatLngBounds.html1 var geocoder = new google.maps.Geocoder(); //地图搜索对象geocoder.geocode( { 'address': address, 'bounds': bounds}, function(r 阅读全文
posted @ 2011-07-13 17:05 wangkangluo1 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 编译器:gcc内存泄露:valgrind参考地址:http://dsec.pku.edu.cn/~yuhj/wiki/gdb.htmlhttp://wenku.baidu.com/view/c27253c65fbfc77da269b19b.html代码跟踪:strace日志:log4c代码性能:gprofgcov完 阅读全文
posted @ 2011-07-13 10:22 wangkangluo1 阅读(373) 评论(0) 推荐(0) 编辑
摘要: c 读文件#include<stdio.h>#include<stdlib.h>#include<string.h>#defineszBUF30000intmain(intargc,char*argv[]){charfilename[szBUF]={0};charbuf[szBUF]={0};chara[szBUF];char*need_find_start="<RoomType>";intlens_start=strlen(need_find_start);char*need_find_end="</Room 阅读全文
posted @ 2011-07-12 18:14 wangkangluo1 阅读(346) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"struct DEMO{ int x,y; int (*func)(int,int); //函数指针};int add2(int x,int y){ return x+y;}void main(){ struct DEMO demo; demo.func=&add2; //结构体函数指针赋值 printf("func(3,4)=%d\n",demo.func(3,4));}完 阅读全文
posted @ 2011-07-11 18:14 wangkangluo1 阅读(289) 评论(0) 推荐(0) 编辑
摘要: C语言中define的用法(2009-08-17 19:21:11)转载标签: 杂谈 define是C语言中的预处理命令,它用于宏定义,可以提高源代码的可读性,为编程提供方便。预处理命令以“#”号开头,如包含命令#include,宏定义命令#define等。一般都放在源文件的前面,它们称为预处理部分。所谓预处理是指在进行编译之前所作的工作。预处理是C语言的一个重要功能,它由预处理程序负责完成。当对一个源文件进行编译时,系统将自动引用预处理程序对源程序中的预处理部分作处理,处理完毕自动进入对源程序的编译。宏的定义 在C或C++语言源程序中允许用一个标识符来表示一个字符串,称为“宏”。被定义为“宏 阅读全文
posted @ 2011-07-11 17:25 wangkangluo1 阅读(4378) 评论(1) 推荐(0) 编辑
摘要: #define LOG(fmt,args...) log_message(__FILE__, __LINE__, __FUNCTION__,fmt ,## args);完 阅读全文
posted @ 2011-07-11 17:00 wangkangluo1 阅读(427) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdarg.h> ////处理可变参数列表,需要包含这个头文件int max(int num, int b, ...) ///num表示参数的个数{ va_list ap; int m,i,temp; va_start(ap,b); ////处理可变参数列表,初始化 m=b; for(i=1;i<num;i++) { temp=va_arg(ap,int); ////处理可变参数列表,每次取一个参数 if(m<temp)m=temp; } va_end(ap); ////处理可变参数列表,结束 re 阅读全文
posted @ 2011-07-11 16:56 wangkangluo1 阅读(302) 评论(0) 推荐(0) 编辑
摘要: log4c.c#include <stdio.h>#include "log4c.h"int main(int argc, char** argv){ int rc = 0; char *test = "test strings"; log4c_category_t* mycat = NULL; if (log4c_init()){ printf("log4c_init() failed"); rc = 1; }else{ mycat = log4c_category_get("log4c.examples.he 阅读全文
posted @ 2011-07-11 16:30 wangkangluo1 阅读(2126) 评论(0) 推荐(0) 编辑
摘要: 中级makefileTARGET=log4ctestOBJS=main.o other.o mylog.oINC=LIBPATH=%.o:%.cpp g++ -Wall -c -g -I$(INC) -I. $< -o $@ $(TARGET):$(OBJS) g++ $(OBJS) -llog4c -o $(TARGET).PHONY:clean clean: rm *.o $(TARGET) 完美 阅读全文
posted @ 2011-07-11 15:51 wangkangluo1 阅读(221) 评论(0) 推荐(0) 编辑
摘要: ajax json 模板<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; 阅读全文
posted @ 2011-07-11 13:54 wangkangluo1 阅读(558) 评论(0) 推荐(0) 编辑
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 73 下一页