#define stack_init_size 100
#define stackincrement 10
typedef int ElemType;
typedef int status;
const status error=0;
const status ok=1;
const status overflow=-2;
const int MAXSIZE = 100;
typedef st...
分类:
其他好文 时间:
2014-05-26 06:17:29
阅读次数:
243
CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access
denied for user root@localhost (using password: NO)错误解决方法1、停用mysql服务:#
/etc/rc.d/init.d/mysqld stop2、输入命...
分类:
数据库 时间:
2014-05-26 01:58:12
阅读次数:
306
Cannot find executable for CFBundle 0x8f4d850 (not
loaded)解决办法:还原模拟器。
分类:
其他好文 时间:
2014-05-25 23:36:51
阅读次数:
313
我们经常会用到平年和闰年对应的天数,直接对数组静态初始化固然可以,但是手写起来很容易写错,所以用个函数得对应天数。
完整代码:
#include
using namespace std;
int count = 0;
int a[2][12];
void init_arr(int a[2][12])
{
for(int i=0;i<13;i++)
{
if(i==1||i==3||i=...
分类:
其他好文 时间:
2014-05-25 18:16:39
阅读次数:
258
loadHeadersFromResource(R.xml.settings_headers, headers);
error: xml cannot be resolved or is not a field, but res/xml/settings_headers.xml exists.
Every xml file will have its own ID in R.java,...
分类:
其他好文 时间:
2014-05-25 16:19:23
阅读次数:
206
IplImage* CaptureImg()
{
IplImage* pImg = NULL;
CvCapture* pCam = NULL;
pCam = cvCreateCameraCapture(0);
if(NULL == pCam)
{
fprintf(stderr, "Can't init Camera!\n");
return NULL;
}
cvSetCa...
分类:
其他好文 时间:
2014-05-25 10:59:29
阅读次数:
230
ST
int dp[maxn][20];
int a[maxn];
void RMQ_init(int n)
{
int i,j,k;
for(i = 1; i <= n; i++)
dp[i][0] = a[i];
k = (int) (log((double)n + 0.2) / log(2.0));
for(j = 1; j <= k; j++)
for(i =...
分类:
其他好文 时间:
2014-05-25 09:45:08
阅读次数:
227
V3 RC4 版本图片
显示一个飞船
将Chapter1中 SpaceCargoShip.png 文件 添加到项目里面。
代码在 init :
CCSprite *spaceCargoShip = [CCSprite spriteWithImageNamed:@"SpaceCargoShip.png"]; [spaceCargoShip set...
分类:
其他好文 时间:
2014-05-25 09:39:59
阅读次数:
195
一、开发环境
Win8.1 64位、VS2013、MySQL5.5.37
64位
MySQL安装目录为:C:\Program Files\MySQL\MySQL Server 5.5
二、配置工程环境
首先创建一个控制台空项目,打开VS2013,文件--> 新建项目 --> 常规 --> 选择“空项目”
因为我们要使用MySQL数据库...
分类:
数据库 时间:
2014-05-25 04:45:09
阅读次数:
442
线程属性
初始化与销毁属性
int pthread_attr_init(pthread_attr_t *attr);
int pthread_attr_destroy(pthread_attr_t *attr);
获取与设置分离属性
int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachsta...
分类:
编程语言 时间:
2014-05-24 21:49:29
阅读次数:
361