10 2011 档案

摘要:void CPlay::ScoreTwoPaint(){if(999999<ScoreTwo)ScoreTwo=999999;int PlayTwoScoreSW=ScoreTwo/100000;int PlayTwoScoreW=(ScoreTwo/10000)%10;int PlayTwoScoreQ=(ScoreTwo/1000)%10;int PlayTwoScoreB=(ScoreTwo/100)%10;int PlayTwoScoreS=(ScoreTwo/10)%10;int PlayTwoScoreG=ScoreTwo%10;PlayTwoScoreXY.x=320;Pl 阅读全文
posted @ 2011-10-31 01:10 byfei 阅读(201) 评论(0) 推荐(0) 编辑
摘要:void CPlay::ScoreTwoPaint(){if(999999<ScoreTwo)ScoreTwo=999999;int PlayTwoScoreSW=ScoreTwo/100000;int PlayTwoScoreW=(ScoreTwo/10000)%10;int PlayTwoScoreQ=(ScoreTwo/1000)%10;int PlayTwoScoreB=(ScoreTwo/100)%10;int PlayTwoScoreS=(ScoreTwo/10)%10;int PlayTwoScoreG=ScoreTwo%10;PlayTwoScoreXY.x=320;Pl 阅读全文
posted @ 2011-10-31 01:01 byfei 阅读(230) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<ctime>using namespace std;int main(){time_t now_time;now_time = time(NULL);cout<<now_time;getchar();return 0;} 阅读全文
posted @ 2011-10-30 01:16 byfei 阅读(110) 评论(0) 推荐(0) 编辑
摘要:1.获得系统时间 time(NULL); 2.时间戳转换成日期 #include #include using namespace std;int main(){ char szBeginTime[32] ={0}; time_t tmBeginTime = ... 阅读全文
posted @ 2011-10-30 01:16 byfei 阅读(41) 评论(0) 推荐(0) 编辑
摘要:1.工程导入 http://v.ku6.com/show/LlpGiWXVi59AwlLa.html Eclipse从SVN checkout并创建项目 https://blog.csdn.net/yasi_xi/article/details/127529... 阅读全文
posted @ 2011-10-24 15:01 byfei 阅读(59) 评论(0) 推荐(0) 编辑
摘要:http://v.ku6.com/show/LlpGiWXVi59AwlLa.html 阅读全文
posted @ 2011-10-24 15:00 byfei 阅读(104) 评论(0) 推荐(0) 编辑
摘要:C语言中auto,register,extern,static C语言中提供了存储说明符auto,register,extern,static说明的四种存储类别。四种存储类别说明符有两种存储期:自动存储期和静态存储期。其中auto和register对应自动存储期。具有自动存储期的变量在进入声明该变量的程序块是被建立,它在该程序块活动时存在,退出该程序块时撤销。关键字extern和static用来说明具有静态存储期的变量和函数。用static声明的局部变量只能被定义该变量的函数所识别,但是不同于自动变量的是,static变量在其函数被调用退出后,仍保留其值。下次函数被调用时,可以访问最近一次被修 阅读全文
posted @ 2011-10-23 22:27 byfei 阅读(495) 评论(0) 推荐(0) 编辑
摘要:一、下微软的补丁:KB948127补丁来解决,http://code.msdn.microsoft.com/KB948127。貌似安装了也不起作用二、如果下载的补丁没安装成功或下载失败,可以用下面的方法手工来改工程设置项目(Project)->属性(Property)->链接器(Linker)->常规(General) 下面的“启用增量链接(Enable Incremental Linking)”,将“是(/INCREMENTAL)”改为“否(/INCREMENTAL:NO)”。不过这又引入了另外一个警 告:FormatCom.obj : warning LNK4075: 忽 阅读全文
posted @ 2011-10-23 11:05 byfei 阅读(149) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>using namespace std;void main(){enum{test1,test2,test3,test4};int i=test4;cout<<i<<endl;getchar();} 阅读全文
posted @ 2011-10-20 10:56 byfei 阅读(943) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>using namespace std;char* Int2String(int nData){ char szBuffer[1024] = {0}; sprintf(szBuffer,"%d",nData ); return szBuffer;}void main(){ cout<<Int2String(4546)<<endl; getchar();} 阅读全文
posted @ 2011-10-19 23:50 byfei 阅读(166) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <stdio.h>using namespace std;void main(){string stc="123";int test1;sscanf(stc.c_str(),"%d", &test1);if(test1==123)cout<<test1<<endl;getchar();} 阅读全文
posted @ 2011-10-19 10:30 byfei 阅读(115) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <string.h>#include <stdio.h>#include <map>using namespace std;class MapTemplate{public:typedef map <int ,string> templatemap;templatemap testmap;templatemap::iterator Find(int nID){return testmap.find(nID);}string GetElement(int nID){template 阅读全文
posted @ 2011-10-18 17:59 byfei 阅读(108) 评论(0) 推荐(0) 编辑
摘要:Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据处理能力,由于这个特性 map内部的实现自建一颗红黑树(一种非严格意义上的平衡二叉树),这颗树具有对数据自动排序的功能。... 阅读全文
posted @ 2011-10-18 17:35 byfei 阅读(48) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <string.h>#include <stdio.h>#include <map>using namespace std;typedef map <int ,string> templatemap;templatemap testmap;templatemap::iterator Find(int nID){return testmap.find(nID);}string GetElement(int nID){templatemap::iterator iter = Find 阅读全文
posted @ 2011-10-18 17:34 byfei 阅读(115) 评论(0) 推荐(0) 编辑
摘要:例子: string s, ss; . s = "The rain in Spain falls mainly in the plain."; ss = s.substr(12, 5); //Spain s.substr(12) //Spain falls mainly in the plain. 阅读全文
posted @ 2011-10-18 10:44 byfei 阅读(193) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <string.h>#include <stdio.h>using namespace std;void main(){ string test;char szBuffer[1024] = {0};char szBuffer02[1024] = {0};int a=1;int b=2;int c=3;sprintf(szBuffer,"%d,%d,%d",a,b,c );sprintf(szBuffer02,"%d,%d",a,b );test += szBuff 阅读全文
posted @ 2011-10-14 21:21 byfei 阅读(231) 评论(0) 推荐(0) 编辑
摘要:1. #include #include #include using namespace std;void main(){ string test; char szBuffer[1024] = {0}; char szBuffer02[1024] = {0}... 阅读全文
posted @ 2011-10-14 21:21 byfei 阅读(34) 评论(0) 推荐(0) 编辑
摘要://需要设置为你自己的//在DBMS中线要创建数据库test,table bintest,data字段数据类型用LONGBLOB即可测试//测试文件c:\\test.iso,你可以找任何一个文件修改为即可,我找的是一个exe程序,修改为test.iso而已//最大测试过加入文件大小为650M(一个正真的iso文件)//注意:还要修改my.ini文件中的max_allowed_packet字段,我设置的是//max_allowed_packet = 1024M//#define host "localhost" //mysql server//#define username 阅读全文
posted @ 2011-10-14 19:51 byfei 阅读(199) 评论(0) 推荐(0) 编辑
摘要:mysql中,当使用的数据类型是longblob时,如何实现流式的读写,即每次读出或写入一块数据,分多次操作。一般的游标函数明显是无法完成这个需求的,从mysql.h中看其实现就明白了://典型的查询的代码如下int Query(const char* sql, int len, vector< vector<string> >& out){ if (0!=mysql_real_query(&m_client, sql, len)) { m_ErrorCode = (int)mysql_errno(&m_client); ERR_LOG(&quo 阅读全文
posted @ 2011-10-14 19:49 byfei 阅读(2835) 评论(0) 推荐(0) 编辑
摘要:int snprintf(char *str, size_t size, const char *format, ...); 将可变个参数(...)按照format格式化成字符串,然后将其复制到str中 (1) 如果格式化后的字符串长度 < size,则将此字符串全部复制到str中,并给其后添加一个字符串结束符('\0'); (2) 如果格式化后的字符串长度 >= size,则只将其中的(size-1)个字符复制到str中,并给其后添加一个字符串结束符('\0') 函数返回值:若成功则返回欲写入的字符串长度,若出错则返回负值。 例子:char *pB 阅读全文
posted @ 2011-10-14 19:08 byfei 阅读(603) 评论(0) 推荐(0) 编辑
摘要:从一个字符串中读进与指定格式相符的数据. 例子: #define COMPRESS_PET "%d,%d,%d,%d,%d,%d,%ld,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%... 阅读全文
posted @ 2011-10-14 19:04 byfei 阅读(51) 评论(0) 推荐(0) 编辑
摘要:从一个字符串中读进与指定格式相符的数据.例子:#define COMPRESS_PET "%d,%d,%d,%d,%d,%d,%ld,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d" int nID = 0;int nRoleID = 0;int nSpeciesID = 0;int nGrade = 0;int nCharacter = 0;int nExp = 0;time_t nBirthday = 0;int nHp = 0;int nGrowRate 阅读全文
posted @ 2011-10-14 19:03 byfei 阅读(188) 评论(0) 推荐(0) 编辑
摘要://需要设置为你自己的 //在DBMS中线要创建数据库test,table bintest,data字段数据类型用LONGBLOB即可测试 //测试文件c:\\test.iso,你可以找任何一个文件修改为即可,我找的是一个exe程序,修改为test.iso而已 //最大测试过加入... 阅读全文
posted @ 2011-10-14 17:01 byfei 阅读(2511) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/SuperXJ/archive/2009/12/25/1632206.html 阅读全文
posted @ 2011-10-14 16:37 byfei 阅读(193) 评论(0) 推荐(0) 编辑
摘要:取二进制数据:一样的sql语句,查询出来即可。只不过二进制数据是个数据块,需要得到数据块的大小和数据指针。bool CMySqlAccess::GetBinaryField(int nCol,char* &pDataOut,int& nDataLen){if (m_ItemMySqlRow[nCol] != NULL){ unsigned long *FieldLength = mysql_fetch_lengths(m_pMySqlResult); nDataLen = (int)FieldLength[nCol]; pDataOut = (char*)(m_ItemMySq 阅读全文
posted @ 2011-10-14 11:52 byfei 阅读(2234) 评论(0) 推荐(0) 编辑
摘要:复方甘草酸甘草片(美能)谷维素片 阅读全文
posted @ 2011-10-13 20:03 byfei 阅读(104) 评论(0) 推荐(0) 编辑
摘要:Window -- Prefences -- General -- Editors -- Text Editors -- show line numbers 阅读全文
posted @ 2011-10-06 14:20 byfei 阅读(101) 评论(0) 推荐(0) 编辑