上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页
  2012年7月15日
摘要: long cls_random::randomBinomial( long N, double probability){ long rnd = 0; for (long i=0;i<N;i++) { double pV = (double)rand()/(double)RAND_MAX; if (pV<probability) { rnd++; } } return rnd;} 期望:E= 方差:V=wiki:http://zh.wikipedia.org/wiki/%E4%BA%8C%E9%A1%B9%E5%88%86%E5%B8%83 阅读全文
posted @ 2012-07-15 20:58 yeahgis 阅读(3166) 评论(0) 推荐(0) 编辑
摘要: double cls_random::randomExponential( double lambda){ double pV = 0.0; while(true) { pV = (double)rand()/(double)RAND_MAX; if (pV != 1) { break; } } pV = (-1.0/lambda)*log(1-pV); return pV;} 期望:E= 方差:V=wiki:http://zh.wikipedia.org/wiki/%E6%8C%87%E6%95%B0%E5%88%86%E5%B8%83 阅读全文
posted @ 2012-07-15 20:57 yeahgis 阅读(7379) 评论(1) 推荐(0) 编辑
  2012年7月13日
摘要: 高斯分布也称为正态分布(normal distribution)常用的成熟的生成高斯分布随机数序列的方法由Marsaglia和Bray在1964年提出,C++版本如下:#include <stdlib.h>#include <math.h>double gaussrand(){ static double V1, V2, S; static int phase = 0; double X; if ( phase == 0 ) { do { double U1 = (double)rand() / RAND_MAX; ... 阅读全文
posted @ 2012-07-13 16:40 yeahgis 阅读(39542) 评论(3) 推荐(4) 编辑
摘要: 现在要生成符合[min,max]区间内连续均匀分布(uniform distribution)的一组随机数,方法如下:#include time.h首先初始化随机数种子:srand(iSeed);//iSeed为unsigned int类型或者:srand(time(NULL));double cls_random::randomUniform( double dMinValue, double dMaxValue){ double pRandomValue = (double)(rand()/(double)RAND_MAX); pRandomValue = pRan... 阅读全文
posted @ 2012-07-13 09:06 yeahgis 阅读(9355) 评论(0) 推荐(0) 编辑
  2012年7月11日
摘要: GDAL支持的栅格数据格式:或者使用gdalinfo.exe --formats查看Long Format NameCodeCreationGeoreferencingMaximum file size1Compiled bydefaultArc/Info ASCII GridAAIGridYesYes2GBYesACE2ACE2NoYes--YesADRG/ARC Digitilized Raster Graphics (.gen/.thf)ADRGYesYes--YesArc/Info Binary Grid (.adf)AIGNoYes--YesAIRSAR PolarimetricAI 阅读全文
posted @ 2012-07-11 11:52 yeahgis 阅读(4173) 评论(0) 推荐(0) 编辑
  2012年6月20日
摘要: 要去德国参加一个国际会议,申请申根(德国)商务签证,德国大使馆的要求如下(2012年6月):1、亲笔签名的旅行护照(申请时护照的有效期应自所申请的签证的有效期终止日起算至少还有3个月)并附上1份护照照片页的复印件2、1份填写完整并亲笔签名的申请表(可从本馆签证处免费领取或从使馆网站www.peking.diplo.de 上下载)3、2张(白色背景的)近期护照照片4、签证费(60欧元)5、对所有申根国家和对整个申请逗留期有效的医疗保险证明原件和1份复印件(请参阅医疗保险须知)6、户口本原件及所有户口信息页的复印件,无需翻译(该条款只适用于中国公民)7、商务签证其他材料(1)机票预订单:当申请多次 阅读全文
posted @ 2012-06-20 18:26 yeahgis 阅读(1132) 评论(0) 推荐(0) 编辑
  2012年6月6日
摘要: 今天一大早赶到会场,签到后发现参展的厂商很多呀,很多公司比如EMC,四维等力度都很大,四维还把全景测量车开进了展厅,很先进的样子。本来想去听下报告,但是无奈被老板电话叫回,这样的学习机会错过了有点遗憾啊! 阅读全文
posted @ 2012-06-06 16:21 yeahgis 阅读(178) 评论(0) 推荐(0) 编辑
  2012年5月31日
摘要: What is Contact Author andCorresponding AuthorContact AuthorThis is the person whose information will populate the PROLE_AUTHOR tags and will thus receive all correspondence directed to ##PROLE_AUTHOR_EMAIL##.The contact author by default will be the first person added to the author list (but not ne 阅读全文
posted @ 2012-05-31 21:43 yeahgis 阅读(9044) 评论(0) 推荐(0) 编辑
  2012年5月29日
摘要: #include <vector>#include <iostream>using namespace std;int main(int argc, char** argv){ std::vector<int> vec; for(int i=0;i<100;i++) { vec.push_back(i); } printf("10:%d\n",vec[10]); printf("size:%d\n",vec.size()); printf("******************************* 阅读全文
posted @ 2012-05-29 09:40 yeahgis 阅读(62154) 评论(1) 推荐(2) 编辑
  2012年5月15日
摘要: 可能是有人在我们集群的一个slave节点上对备份数据库单独做了写操作,导致该slave节点数据库与master不同步:mysql>show slave status; 显示:Slave_SQL_Running状态为No,由于一直没有记录数据库的相关日志,二进制的备份文件和位置也搞得稀里糊涂,干脆直接干掉这个节点的备份,重新配置。过程:1. 锁定master表为只读:#锁定master数据库表MYSQL>FLUSH TABLES WITH READ LOCK;2. 导出要备份的数据库:[user@gisnode-1 ~]$ mysqldump -u myuser -p gisdb&g 阅读全文
posted @ 2012-05-15 10:50 yeahgis 阅读(3387) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页