转载请注明出处:http://blog.csdn.net/oyangyufu/article/details/25252539

CCActionInterval(持续性动作) 位置性变化动作以To结束的, 表示精灵变化位置以绝对坐标为參考,左下角(0, 0);以By结尾,表示精灵精灵变化位置以相对坐标为參考,精灵当前所在位置为(0, 0)

移动动作(位置变化)

一、TestCpp实例ActionsTest 模块中ActionManual动作

素材原图:

动作效果图:

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); 设置猛兽白虎的x,y轴缩放、透明度
CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(1.0f);
sp1->setScaleX(1.0f);
sp1->setScaleY(-0.5f);
sp1->setPosition(ccp(200,visibleSize.height/2));
sp1->setOpacity(150);//透明度
this->addChild(sp1); 设置天使MM的旋转、自身为红色
CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setRotation(300);//旋转0~360
sp2->setColor(ccc3(255,0,0));
sp2->setPosition(ccp(visibleSize.width/2, visibleSize.height/2));
this->addChild(sp2); 设置猛兽灰狼的颜色为蓝色
CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setColor( ccBLUE);//(0,0,255)
sp3->setPosition(ccp(visibleSize.width-200, visibleSize.height/2));
this->addChild(sp3); return true;
}

二、TestCpp实例ActionsTest 模块中ActionRotate旋转动作

效果图:

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDi rector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); //******************************ActionRotate旋转*********************************
CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); //2s内将顺时针旋转45'
CCActionInterval *to = CCRotateTo::create(2.0f, 45);
CCActionInterval *to0 = CCRotateTo::create(2.0f, 0); //2s内将sp1逆时针旋转45'
CCActionInterval *to1 = CCRotateTo::create(2.0f, -45);
sp2->runAction(CCSequence::create(to, to1, NULL)); //旋转与回旋360'
CCActionInterval *by = CCRotateBy::create(2.0f, 360);
sp3->runAction(CCSequence::create(by, by->reverse(), NULL)); //先旋转360',再运行逆时针旋转45'(将top1动作在内存中拷贝一份运行,由于to1动画在sp2也在调用,原则两个精灵运行同一个动画,仅仅有最后面一个精灵调用)
sp1->runAction(CCSequence::create(by, to1->copy()->autorelease(), NULL)); return true;
}

三、TestCpp实例ActionsTest 模块中ActionScale缩放动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDi rector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); /******************************ActionScale缩放*********************************/
CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); //2s内放大2倍
CCActionInterval *to = CCScaleTo::create(2.0f, 2.0f);
//sp1->runAction(to); //2s内在原来基础上xy方向分别放大1倍和3倍
CCActionInterval *by = CCScaleBy::create(2.0f, 1.0f, 3.0f);
sp2->runAction(by); //2s内先xy方向放大3倍和1倍,再缩回到原来大小
CCActionInterval *bx = CCScaleBy::create(2.0f, 3.0f, 1.0f);
sp3->runAction(CCSequence::create(bx, bx->reverse(), NULL)); return true;
}

四、TestCpp实例ActionsTest 模块中ActionMove移动动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDi rector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); /******************************ActionMove移动*********************************/
//创建3怪兽,设置位置
CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); //2s内移动屏幕中心(绝对位置)
CCActionInterval *to = CCMoveTo::create(2.0f, ccp(visibleSize.width/2, visibleSize.height/2));
sp2->runAction(to); //2s内移动后再回到原点
CCActionInterval *by = CCMoveBy::create(2.0f, ccp(200, 200));//2s内相对它原来坐标,xy轴再移动200
CCActionInterval *byback = by->reverse();//反向播放动画
sp3->runAction(CCSequence::create(by, byback, NULL));//按序列运行动作,先相对移动,再反向回到原地 sp1->runAction(CCMoveTo::create(1.0f, ccp(100, 100))); return true;
}

五、TestCpp实例ActionsTest 模块中ActionJump缩放动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); /******************************ActionJump跳跃*********************************/ //參数1:持续时间;參数2:跳跃到的位置;參数3:跳跃高度;參数4:跳跃次数
CCActionInterval *to = CCJumpTo::create(2.0f, ccp(300, 0), 300, 2);
sp1->runAction(to); //跳跃回到原点
CCActionInterval *by = CCJumpBy::create(2.0f, ccp(300, 0), 100, 2);
CCActionInterval *backby = by->reverse();
sp2->runAction(CCSequence::create(by, backby, NULL)); //原地无限循环跳跃
CCActionInterval* actionUp = CCJumpBy::create(2, ccp(0,0), 80, 4);
sp3->runAction(CCRepeatForever::create(actionUp)); return true;
}

六、TestCpp实例ActionsTest 模块中ActionTint色值渐变动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); /******************************ActionTint色值渐变*********************************/
CCActionInterval *ac = CCTintTo::create(4, 255,255, 0);//4s渐变黄色
CCActionInterval *ac1 = CCTintBy::create(4, -255, 0, -255);//在眼下值上加上该色值,4s渐变绿 sp3->runAction(ac);
sp2->runAction(CCRepeatForever::create(CCSequence::create(ac1, ac1->reverse(), NULL))); return true;
}

七、TestCpp实例ActionsTest 模块中ActionBlink闪烁动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); /******************************ActionBlink闪烁*********************************/
CCActionInterval *ac = CCBlink::create(2, 4);//2s内闪烁4次
CCActionInterval *ac1 = CCBlink::create(5, 4);//5s内闪烁4次
sp2->runAction(ac);
sp3->runAction(ac1); return true;
}

八、TestCpp实例ActionsTest 模块中ActionFade谈入谈出动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); /******************************ActionFade谈入谈出*********************************/
sp1->setOpacity(0);//设置透明
CCActionInterval *in = CCFadeIn::create(2.0f);//谈入
sp1->runAction(CCSequence::create(in, in->reverse(), NULL)); CCActionInterval *out = CCFadeOut::create(2.0f);//谈出
sp2->runAction(CCSequence::create(out, in->reverse(), NULL)); sp3->setOpacity(100); return true;
}

九、TestCpp实例ActionsTest 模块中ActionBezier贝赛尔曲线动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); /******************************ActionBezier贝赛尔曲线*********************************/
//sprite 1
ccBezierConfig bezi;//配置贝赛尔曲线动作
bezi.controlPoint_1 = ccp(0, visibleSize.height/2);//控制点1位置
bezi.controlPoint_2 = ccp(300, -visibleSize.height/2);//控制点2位置
bezi.endPosition = ccp(300, 100); CCActionInterval * to = CCBezierBy::create(3, bezi);//參数1:持续时间;參数2:配置对象
CCAction *ac = CCRepeatForever::create(CCSequence::create(to, to->reverse(), NULL));
sp1->runAction(ac); //sprite 2
ccBezierConfig bezi1;
bezi1.controlPoint_1 = ccp(100, visibleSize.height/2);
bezi1.controlPoint_2 = ccp(200, -visibleSize.height/2);
bezi1.endPosition = ccp(500, 500);
CCActionInterval *to1 = CCBezierTo::create(3, bezi1);
sp2->runAction(to1); //sprite 3
sp3->setPosition(ccp(400,160));
CCActionInterval *to2 = CCBezierTo::create(3, bezi1);
sp3->runAction(to2); return true;
}

十、TestCpp实例ActionsTest 模块中ActionJump跳跃动作

程序代码:

bool HelloWorld::init()
{
if ( !CCLayer::init() )
{
return false;
} CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback)); pCloseItem->setPosition(ccp(origin.x + visibleSize.width - pCloseItem->getContentSize().width/2 ,
origin.y + pCloseItem->getContentSize().height/2)); CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
this->addChild(pMenu, 1); CCSprite *sp1 = CCSprite::create("cpp1.png");
sp1->setScale(0.5f);
sp1->setPosition(ccp(100, 100));
this->addChild(sp1); CCSprite *sp2 = CCSprite::create("cpp2.png");
sp2->setScale(0.5f);
sp2->setPosition(ccp(visibleSize.width/2-100, visibleSize.height/2));
this->addChild(sp2); CCSprite *sp3 = CCSprite::create("cpp3.png");
sp3->setScale(0.5f);
sp3->setPosition(ccp(visibleSize.width/2+100, visibleSize.height/2));
this->addChild(sp3); /******************************ActionJump跳跃*********************************/ //參数1:持续时间;參数2:跳跃到的位置;參数3:跳跃高度;參数4:跳跃次数
CCActionInterval *to = CCJumpTo::create(2.0f, ccp(300, 0), 300, 2);
sp1->runAction(to); //跳跃回到原点
CCActionInterval *by = CCJumpBy::create(2.0f, ccp(300, 0), 100, 2);
CCActionInterval *backby = by->reverse();
sp2->runAction(CCSequence::create(by, backby, NULL)); //原地无限循环跳跃
CCActionInterval* actionUp = CCJumpBy::create(2, ccp(0,0), 80, 4);
sp3->runAction(CCRepeatForever::create(actionUp)); return true;
}

【Cocos2d TestCpp实例模仿一】-- ActionsTest的更多相关文章

  1. 基于Cocos2d-x-1.0.1的飞机大战游戏开发实例(上)

    最近接触过几个版本的cocos2dx,决定每个大变动的版本都尝试一下.本实例模仿微信5.0版本中的飞机大战游戏,如图: 一.工具 1.素材:飞机大战的素材(图片.声音等)来自于网络 2.引擎:coco ...

  2. 简单的scrapy实例

    前天实验室的学长要求写一个简单的scrapy工程出来,之前也多少看了点scrapy的知识,但始终没有太明白,刚好趁着这个机会,加深一下对scrapy工作流程的理解.由于临近期末,很多作业要做(其实.. ...

  3. Highcharts入门小示例

    一.创建条形图 1.创建div容器 <div id="container" style="min-width:800px;height:400px"> ...

  4. 【热门收藏】iOS开发人员必看的精品资料(100个)——下载目录

    iPhone.iPad产品风靡全球,巨大的用户群刺激着iOS软件开发需求,然而国内人才缺口很大,正处于供不应求的状态,ios开发前景大好.我们整理了51CTO下载中心100份热门的ios开发资料,做了 ...

  5. java中线程池的使用方法

    1 引入线程池的原因 由于线程的生命周期中包括创建.就绪.运行.阻塞.销毁阶段,当我们待处理的任务数目较小时,我们可以自己创建几个线程来处理相应的任务,但当有大量的任务时,由于创建.销毁线程需要很大的 ...

  6. iOS开发人员必看的精品资料(100个)

    目录下载地址:http://down.51cto.com/data/416672 附件预览如下: iOS游戏开发之Unity3D引擎系列 http://down.51cto.com/zt/399 iP ...

  7. jquery树形菜单插件treeView

    Jquery的treeview很好用,如果是简单的树形菜单按照下面的源码实例模仿就可以. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tr ...

  8. Python-全局解释器锁GIL原理和多线程产生原因与原理-多线程通信机制

    GIL 全局解释器锁,这个锁是个粗粒度的锁,解释器层面上的锁,为了保证线程安全,同一时刻只允许一个线程执行,但这个锁并不能保存线程安全,因为GIL会释放掉的并且切换到另外一个线程上,不会完全占用,依据 ...

  9. javascript-初级-day08

    return <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" ...

随机推荐

  1. Oracle EBS-SQL (PO-10):检查过期采购未接收订单.sql

    Select pha.segment1               采购订单,            MSI.SEGMENT1             物料编码,           MSI.DESC ...

  2. WPS Office手机版调用接口代码指导帖之一(Android)

    经常会有一些喜欢开发鼓捣的童鞋问我们,WPS Office手机版是否提供调用接口,希望在android中使用一个调用命令,直接调用WPS手机版来打开指定的DOC文件,而不用弹出一个程序可选列表(如果用 ...

  3. 960 grid 使用

    去官网下载960 grid,解压后可以看到css下面有如下文件: 960.css是一个综合性文件.我们要引入960 ,reset和text 3 个文件. 一般情况下调用: <link rel=” ...

  4. WebMatrix安装和使用

    官网:http://www.microsoft.com/web/webmatrix/ 一直觉得dreamweaver已经过时了,很多新的库都不支持.而且,启动慢,占用内存多,是时候换一个ide了. h ...

  5. Taobao File System

    TFS是淘宝针对海量非结构化数据存储设计的分布式系统,构筑在普通的Linux机器集群上,可为外部提供高可靠和高并发的存储访问.高可扩展.高可用.高性能.面向互联网服务. 特性 采用扁平化的数据组织结构 ...

  6. velocity的foreach下标

    velocity的foreach标签操作: #foreach( $per in ${list} ) #end 如果需要访问循环的当前目标的index可用通过${velocityCount},其默认是从 ...

  7. vs2010打开设计器出现错误

    vs2010打开设计器出现此界面,  错误多种,还有“未将对象引用设置到对象的实例”  ,我项目用到了第三方控件(没有安装,bin文件夹导入DLL文件,项目直接引用的DLL文件),看下面的堆栈信息,显 ...

  8. 《UNIX环境高级编程》笔记--线程的标识、创建和终止

    1.线程标识 就像每个进程都有一个进程ID一样,每个线程都有一个线程ID.进程ID在整个系统中是唯一的,但线程ID只在它所属的 进程环境中有效. 线程ID使用pthread_t数据类型来表示,实现的时 ...

  9. select * from (select P.*,ROWNUM RN FROM(select * from Mp_Relatedart where pubbaseid=785 order by ID ASC )P)M WHERE M.RN>2 and M.RN <= 7

    select * from (select P.*,ROWNUM RN FROM(select * from Mp_Relatedart where pubbaseid=785 order by ID ...

  10. jquery学习(3)--高级选择器

    自己手写的学习笔记.常规选择器: /****************学习--高级选择器(1)****************/---高级选择器:ie7+ 层次选择器: 后代选择器     ul li ...