谈到地图不少人都说要做地图编辑器了,但是我暂时绕过这一步,如果不用寻路地图就不能移动?寻路就是会绕过障碍物的算法。

我做了一个简单的地图的思想,就是地图分层3层:背景层、可行区域层、遮罩层,但是地图就不寻路了,通过设置可行区域层来

实现地图障碍物的方法。下面看一个视图,我把地图详细的分层了:

OK,有了这个思路,大家应该也知道我要怎么做了?代码实现上怎么处理呢?

重点:可行区域层原理是根据点击屏幕上的坐标点来取得这个点是否透明!如果不透明那就不让他进行移动,透明则为不可行区域;

首先感谢一下为我提供取色源码的哥们(firedragonpzy),帮助我实现了这个另类的地图设计;下面我贴一下他的源码,

新建了FDPixelSprite.cpp,FDPixelSprite.h代码如下:

FDPixelSprite.h

  1. //
  2. // FDPixelSprite.h
  3. // PixelDemo
  4. //
  5. // Created by firedragonpzy on 13-2-19.
  6. //
  7. //
  8.  
  9. #ifndef __PixelDemo__FDPixelSprite__
  10. #define __PixelDemo__FDPixelSprite__
  11. #include "cocos2d.h"
  12. USING_NS_CC;
  13.  
  14. class FDPixelSprite : public CCSprite, public CCTargetedTouchDelegate {
  15. public:
  16. FDPixelSprite();
  17. virtual ~FDPixelSprite();
  18.  
  19. void onEnter();
  20. void onExit();
  21. void setimg(CCString Url);
  22.  
  23. FDPixelSprite* create(CCString Url);
  24. CCImage* img ;
  25.  
  26. CCRect atlasRect();
  27. bool isContainTouchLocation(CCTouch *pTouch);
  28.  
  29. bool ccTouchBegan(CCString thismapurl,CCTouch *pTouch, CCEvent *pEvent);
  30. void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent);
  31. void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent);
  32.  
  33. CC_SYNTHESIZE(const char*, m_pName,Name);
  34. };
  35.  
  36. #endif /* defined(__PixelDemo__FDPixelSprite__) */

FDPixelSprite.cpp

  1. //
  2. // FDPixelSprite.cpp
  3. // PixelDemo
  4. //
  5. // Created by firedragonpzy on 13-2-19.
  6. //
  7. //
  8.  
  9. #include "FDPixelSprite.h"
  10. #include "FontChina.h"
  11.  
  12. FDPixelSprite::FDPixelSprite()
  13. {}
  14. FDPixelSprite::~FDPixelSprite()
  15. {}
  16.  
  17. FDPixelSprite* FDPixelSprite::create(CCString Url)
  18. {
  19. FDPixelSprite *sprite = new FDPixelSprite();
  20. if (sprite && sprite->initWithFile(Url.getCString())) {
  21. sprite->setName(Url.getCString());
  22. sprite->autorelease();
  23. return sprite;
  24. }
  25. CC_SAFE_DELETE(sprite);
  26. sprite = NULL;
  27.  
  28. return NULL;
  29. }
  30.  
  31. void FDPixelSprite::setimg(CCString Url){
  32. img= new CCImage();
  33. img->initWithImageFileThreadSafe(CCFileUtils::sharedFileUtils()->fullPathForFilename(Url.getCString()).c_str());
  34.  
  35. }
  36.  
  37. void FDPixelSprite::onEnter()
  38. {
  39. CCSprite::onEnter();
  40. CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, , true);
  41. }
  42.  
  43. void FDPixelSprite::onExit()
  44. {
  45. CCSprite::onExit();
  46. CCDirector::sharedDirector()->getTouchDispatcher()->removeDelegate(this);
  47. }
  48.  
  49. bool FDPixelSprite::ccTouchBegan(CCString thismapurl,cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent)
  50. {
  51. if (this->isContainTouchLocation(pTouch) ) {
  52. ccColor4B c = {, , , };
  53.  
  54. CCSize winSize = CCDirector::sharedDirector()->getWinSize();
  55.  
  56. CCPoint touchPoint = pTouch->getLocationInView();
  57.  
  58. CCSize cSize = this->getContentSize();
  59. CCPoint point =this->getAnchorPointInPoints();
  60. point = ccp(cSize.width - point.x,cSize.height- point.y);
  61. CCPoint pos(this->getPositionX() - point.x,winSize.height-this->getPositionY()- point.y);
  62.  
  63. CCPoint localPoint = ccp(touchPoint.x - pos.x,
  64. touchPoint.y -pos.y);
  65.  
  66. float scaleFactor = CCDirector::sharedDirector()->getContentScaleFactor();
  67. unsigned int x = localPoint.x * scaleFactor, y = localPoint.y * scaleFactor;
  68.  
  69. float _width = this->getContentSize().width*scaleFactor;
  70.  
  71. //This method is currently only supports symmetric image
  72. //unsigned char *data_ = this->getTexture()->getFDImageData();
  73.  
  74. //Efficiency of this method is relatively low
  75. //CCImage * img = new CCImage();
  76. //img->initWithImageFileThreadSafe(CCFileUtils::sharedFileUtils()->fullPathForFilename(thismapurl.getCString()).c_str());
  77. unsigned char *data_ = img->getData();
  78.  
  79. unsigned int *pixel = (unsigned int *)data_;
  80. pixel = pixel + (y * (int)_width)* + x * ;
  81.  
  82. c.r = *pixel & 0xff;
  83. c.g = (*pixel >> ) & 0xff;
  84. c.b = (*pixel >> ) & 0xff;
  85. c.a = (*pixel >> ) & 0xff;
  86. if (c.a == ) {
  87. CCLog(FontChina::G2U("不可点击!"));
  88. return false;
  89. }else
  90. {
  91. CCLog(FontChina::G2U("可点击!"));
  92. return true;
  93. }
  94. }
  95. return false;
  96. }
  97.  
  98. void FDPixelSprite::ccTouchMoved(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent)
  99. {
  100. //CCPoint pos = this->getPosition();
  101. //CCPoint sub = pTouch->getDelta();
  102. //this->setPosition(ccpAdd(pos, sub));
  103. }
  104.  
  105. void FDPixelSprite::ccTouchEnded(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent)
  106. {
  107. //CCLog("firedragonpzy:ccTouchEnded");
  108. }
  109.  
  110. CCRect FDPixelSprite::atlasRect()
  111. {
  112. CCSize cSize = this->getContentSize();
  113. CCPoint point = this->getAnchorPointInPoints();
  114. return CCRectMake( -point.x, -point.y, cSize.width,cSize.height);
  115. }
  116.  
  117. bool FDPixelSprite::isContainTouchLocation(cocos2d::CCTouch *pTouch)
  118. {
  119. return this->atlasRect().containsPoint(convertTouchToNodeSpaceAR(pTouch));
  120. }

有了他们我们就能判断地图上是否可行了。OK废话不多,继续走向精彩,详细解决一下背景层我们应该做些什么东西,有什么内容?

背景层肯定要装载精灵,把我们之前第二章说的【cocos2d-x 大型ARPG手游研发----精灵的八面玲珑】精灵加载出来,就可以当主角了。

这里有人说,那其他不带主角功能的怎么办?继承你写的精灵类拓展成怪物类(智能AI攻击操作),NPC(任务功能模块),可拓展行是

杠杠滴,继承下来NPC都能移动,和你打起来,我的思路是把地图做成一个大容器,每一块新地图继承一个MapsBase的同时他自己也有

有自己的特殊逻辑和特殊业务;

继续贴代码,地图是这么实现的:

Maps_Diyu.h

  1. #include "cocos2d.h"
  2. #include "../Commen/FDPixelSprite.h"
  3. #include "../Spirits/SpiritsPlayer.h"
  4.  
  5. USING_NS_CC;
  6.  
  7. class Maps_Diyu :public cocos2d::CCSprite
  8. {
  9. public:
  10. Maps_Diyu(CCLayer* layer,CCString mapsurl,CCString mapsurl_1,int zOrder,CCPoint cp);
  11. ~Maps_Diyu(void);
      
  12. CCSprite* nowmap;
  13. CCSprite* nowmap_zhezhao;
  14. //基本数据
  15. float lastmove_x,lastmove_y;
  16. bool moveMapto(CCPoint cp,FDPixelSprite* mainmap_Touch);
  17. CCActionInterval* act_moveto_maps;
  18. CCActionInterval* act_moveto_maps_touch;
  19. CCActionInterval* act_moveto_maps_zhezhao;
  20.  
  21. private:
  22.  
  23. SpiritsPlayer* role_main;
  24. CCAnimate* playdonghua;
  25. };

Maps_Diyu.cpp

  1. #include "Maps_Diyu.h"
  2. #include "../GameData/GetNPCData.h"
  3. #include "../Commen/FontChina.h"
  4. #include "../Spirits/SpiritsMonster.h"
  5. #include "../Effects/SkillEffects.h"
  6.  
  7. Maps_Diyu::Maps_Diyu(CCLayer* layer,CCString mapsurl,CCString mapsurl_1,int zOrder,CCPoint cp)
  8. {
  9. act_moveto_maps=NULL;
  10. act_moveto_maps_zhezhao=NULL;
  11. lastmove_x=;
  12. lastmove_y=;
  13. float map_x , map_y;
  14.  
  15. float center_x,center_y;
  16.  
  17. CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
  18. CCSize size = CCDirector::sharedDirector()->getWinSize();
  19.  
  20. nowmap = Maps_Diyu::create(mapsurl.getCString());
  21. nowmap_zhezhao = Maps_Diyu::create(mapsurl_1.getCString());
  22. center_x = size.width/;
  23. center_y = size.height/;
  24.  
  25. map_y = nowmap->getAnchorPointInPoints().y+origin.y;
  26. map_x = nowmap->getAnchorPointInPoints().x;
  27.  
  28. if(cp.getLength()>)
  29. {
  30. nowmap->setPosition(cp);
  31. nowmap_zhezhao->setPosition(cp);
  32. }
  33. else
  34. {
  35. nowmap->setPosition(ccp(map_x,map_y));
  36. nowmap_zhezhao->setPosition(ccp(map_x,map_y));
  37. }
  38.  
  39. //计算地图上绝对位置的原点坐标
  40. float map_fornpc_x,map_fornpc_y;
  41. map_fornpc_x= nowmap->getContentSize().width/;
  42. map_fornpc_y=nowmap->getContentSize().height/;
  43.  
  44. //主角加载
  45. GetNPCData* basedatas = new GetNPCData();
  46. basedatas->GetNPCchapter1();
  47. basedatas->role_player.nowpoint= CCPointMake(map_fornpc_x+,map_fornpc_y+);
  48. role_main = new SpiritsPlayer(basedatas->role_player,,false);
  49. role_main->npc->retain();
  50.  
  51. //加载NPC
  52. basedatas->role_mengpo.nowpoint= CCPointMake(map_fornpc_x+,map_fornpc_y+);
  53. SpiritsPlayer* role_mengpo= new SpiritsPlayer(basedatas->role_mengpo,,true);
  54. nowmap->addChild(role_mengpo->npc, );
  55. //-------------------------------------------------------
  56. nowmap->addChild(role_main->npc, ,);
  57. layer->addChild(nowmap_zhezhao, zOrder+);
  58. layer->addChild(nowmap, zOrder);
  59. }

OK,地图初始化就加载了这些基础的数据,这些应该大家都能看懂,下面贴最核心的代码,如何把他们都关联起来

并且做移动操作呢??????

  1. /*************************
  2. 参数说明:
  3. CCPoint cp 可行区域的坐标
  4. mainmap_Touch 可行区域,需要去随时改变他移动
  5. **************************/
  6. bool Maps_Diyu::moveMapto(CCPoint cp,FDPixelSprite* mainmap_Touch)
  7. {
  8.  
  9. float center_x,center_y,move_x,move_y, map_x , map_y ,to_c_x,to_c_y;
  10.  
  11. CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
  12. CCSize size = CCDirector::sharedDirector()->getWinSize();
  13. center_x = size.width/;
  14. center_y = size.height/;
  15. move_x = center_x-cp.x;
  16. move_y = center_y-cp.y;
  17. map_x = nowmap->getPositionX();
  18. map_y = nowmap->getPositionY();
  19. to_c_x = nowmap->getContentSize().width/;
  20. to_c_y = nowmap->getContentSize().height/+origin.y;
  21. map_x = map_x + move_x;
  22. map_y = map_y + move_y-origin.y;
  23.  
  24. //计算移动时间,这边大家可以帮我优化一下
  25. //现在就这块移动时间有一些问题
  26. float a1 , b1 ;
  27. a1 = fabs(move_x)/size.width;
  28. b1 = fabs(move_y)/size.height;
  29. float movetime = ((a1+b1)*);
  30. if(movetime<=)
  31. {
  32. movetime=;
  33. }
  34.  
  35. //这里是精华,主要是处理任意地图放进来之后,
  36. //防止显示区域超出地图的长宽,移动到边界就不能移动了!
  37. if(map_x>=to_c_x)
  38. {
  39. map_x = to_c_x;
  40. }
  41. else if(map_x<=-((nowmap->getContentSize().width/)-size.width))
  42. {
  43. map_x =-((nowmap->getContentSize().width/)-size.width);
  44. }
  45. if(map_y>=to_c_y)
  46. {
  47. map_y = to_c_y;
  48. }
  49. else if(map_y <= -((nowmap->getContentSize().height/)-size.height))
  50. {
  51. map_y = -((nowmap->getContentSize().height/)-size.height);
  52. }
  53.  
  54. //经典中的经典//
  55. //主角移动
  56. CCPoint role_move_pc = nowmap->convertToNodeSpace(ccp(cp.x,cp.y));//此处需要通过地图的视角把人物移动的坐标转化一下。
  57. role_main->moveTomap_dir(role_move_pc);
  58. role_main->moveTomap_move(movetime,role_move_pc,false);
  59. //地图移动
  60. if(map_x!=lastmove_x&&map_y!=lastmove_y)
  61. {
  62. nowmap->stopAction(act_moveto_maps);
  63. nowmap_zhezhao->stopAction(act_moveto_maps_zhezhao);
  64. mainmap_Touch->stopAllActions();
  65. act_moveto_maps = CCMoveTo::create(movetime,ccp((int)map_x,(int)map_y));
  66. act_moveto_maps_touch = CCMoveTo::create(movetime,ccp((int)map_x,(int)map_y));
  67. act_moveto_maps_zhezhao = CCMoveTo::create(movetime,ccp((int)map_x,(int)map_y));
  68. nowmap->runAction(act_moveto_maps);
  69. nowmap_zhezhao->runAction(act_moveto_maps_zhezhao);
  70. mainmap_Touch->runAction(act_moveto_maps_touch);
  71. return true;
  72. }
  73. else
  74. {
  75. return false;
  76. }
  77.  
  78. }

核心的地方有三处,帮大家分析一下:

第一,就是计算移动时间,我是根据屏幕长宽来计算,这个地方一直是我心结,这个方法效果现在很不好,跑起来

长距离用时长,短距离就很快,所以请大家也帮我优化一下,可以往下贴代码,

第二,就是计算出地图移动的区域,你不可能随便丢一张图进去,地图超过边界会显示黑色,不能让黑色显示出来(除非丢进来的图小过屏幕地图);

第三,就是通过地图移动的标识来进行人物和地图的移动,在人物移动的时候需要转化一下成地图的坐标!

  1. map_x!=lastmove_x&&map_y!=lastmove_y
  2. 可移动的标识
  3. act_moveto_maps = CCMoveTo::create(movetime,ccp((int)map_x,(int)map_y));
  4. act_moveto_maps_touch = CCMoveTo::create(movetime,ccp((int)map_x,(int)map_y));
  5. act_moveto_maps_zhezhao = CCMoveTo::create(movetime,ccp((int)map_x,(int)map_y));
  6.  
  7. 大家也看到,我移动的时候,移动的是3个层,这下就保证了可行区域也是不停在变动的

然后就是如何传数据了,几句话就可以搞定Scene加载的地图上所有层;

Scene_Diyu.h

  1. #include "cocos2d.h"
  2. #include "ToScene.h"
  3. #include "../MapSpirits/Maps_Diyu.h"
  4. USING_NS_CC;
  5. class Scene_Diyu : public CCLayer
  6. {
  7. public:
  8. Scene_Diyu(void);
  9. ~Scene_Diyu(void);
  10. Maps_Diyu* mainmap;
  11. FDPixelSprite* mainmap_Touch;
  12. void nextCallback(CCObject* pSender);
  13. virtual void registerWithTouchDispatcher(void);
  14. virtual bool ccTouchBegan(CCTouch *pTouch,CCEvent *pEvent);
  15. virtual void ccTouchMoved(CCTouch *pTouch,CCEvent *pEvent);
  16. virtual void ccTouchEnded(CCTouch *pTouch,CCEvent *pEvent);
  17. virtual void ccTouchCancelled(CCTouch *pTouch,CCEvent *pEvent);
  18. };

Scene_Diyu.cpp

  1. #include "Scene_Diyu.h"
  2. #include "../ImagePaths.h"
  3. #include "../PublicUI/BaseUI.h"
  4.  
  5. Scene_Diyu::Scene_Diyu(void)
  6. {
  7. float x,y;
  8. CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
  9. CCSize size = CCDirector::sharedDirector()->getWinSize();
  10. x = size.width;
  11. y = size.height;
  12. //地图
  13. mainmap = new Maps_Diyu(this,"map_diyu_naihe.jpg","map_diyu_naihe1.png",,ccp(x/-,y/-));
  14. mainmap_Touch = mainmap_Touch->create("map_diyu_naihe0.png");
  15. mainmap_Touch->setimg("map_diyu_naihe0.png");
  16. mainmap_Touch->setPosition(ccp(x/-,y/-));
  17. mainmap_Touch->setVisible(false);//是否显示点击层
  18.  
  19. BaseUI* baseui = new BaseUI(this);
  20.  
  21. this->addChild(mainmap_Touch, );
  22. setTouchEnabled(true);
  23. }
  24.  
  25. void Scene_Diyu::registerWithTouchDispatcher()
  26. {
  27. CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this,,true);
  28. }
  29.  
  30. bool Scene_Diyu::ccTouchBegan(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent)
  31. {
  32. if(mainmap_Touch->ccTouchBegan("map_diyu_naihe0.png",pTouch,pEvent)==true)
  33. {
  34. mainmap->moveMapto(pTouch->getLocation(),mainmap_Touch);
  35. }
  36. return true;
  37. }
  38.  
  39. void Scene_Diyu::ccTouchMoved(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent)
  40. {
  41. }
  42.  
  43. void Scene_Diyu::ccTouchEnded(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent)
  44. {
  45. }
  46.  
  47. void Scene_Diyu::ccTouchCancelled(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent)
  48. {
  49. }
  50.  
  51. Scene_Diyu::~Scene_Diyu(void)
  52. {
  53. }

大家也看到了再Scene里面控制的点击事件主要就是处理可行区域的:

  1. if(mainmap_Touch->ccTouchBegan("map_diyu_naihe0.png",pTouch,pEvent)==true)
  2. {
  3. mainmap->moveMapto(pTouch->getLocation(),mainmap_Touch);
  4. }

好了,大家如果理解,可以自己研究一下自己的方式去实现一下这样一套,人物移动,地图移动的原理,当然,我在这里声明一下

这套实现思路其实是很歪门,另类的,应为他并没有采用寻路,但是你也不能完全说不采用寻路算法的地图系统就不行。

跑起来看一下效果截图:

跑起来后的效果图!!!

人物被遮罩层遮挡的效果图!!

这篇就讲这么多了,下一篇直接讲一下【怪物智能AI的制作】怪物实现追踪主角,怪物随机生成怪圈,怪物随机移动巡逻。

游戏demo及素材下载地址(demo里面包含了所有的素材资料);

http://pan.baidu.com/share/link?shareid=4012433582&uk=4097703620&third=15

我建了一个QQ群:和大家一起分享cocos2dx开发经验【41131516】

【cocos2d-x 手游研发----地图活起来了】的更多相关文章

  1. 【cocos2d-x 手游研发----目录】

    感谢大家一直支持我写这样一系列的博客,从中我自己也获益良多,cocos2d-x这样一款非常棒的引擎,是值得我们去学习和分享的,谈到分享,那我就把这套写了差不多一两个月的框架给大家开源下载,写的很一般, ...

  2. 手游研发CJ抱大腿指南

    文摘要:CJ来了,又是一年一度的游戏圈盛事,随着手游行业的迅速崛起,今年CJ上,手游研发商以及发行商必定成为焦点.由于门槛低.市场热.前景好等因素的影响,国内一下子蹦出一大堆手游研发团队.很幸运(或者 ...

  3. 【cocos2d-x 手游研发----研发思路及感想】

          我半年前进入了目前的这家做教育行业的公司(在此之前一直从事原生态开发手游的迷茫之路),学习是一件很快乐的事情,来到这家公司我有了很多时间去学习,不管是公司业务,还是其他技术相关的.于是开始 ...

  4. 【cocos2d-x 手游研发----界面UI设计】

    简单探讨一下如何在cocos2d-x的游戏引擎里面去制作各做交互UI界面,常见的UI如下: 人物头像,血条值,经验条,技能按钮,以及各种玩家交互的界面按钮:背包,人物属性,门派,等: 类似上面的图示交 ...

  5. 【cocos2d-x 手游研发----精灵的八面玲珑】

    继续上一篇文章继续聊吧,这章内容会比较多,也会附上代码,很多朋友加了群,大家在群里面探讨了很多东西,这让大家都觉得受益匪浅,这便是极好的,废话不多了,精灵是游戏的重要组成部分,那ARPG里面的精灵必然 ...

  6. 【cocos2d-x 手游研发小技巧(6)聊天系统+字体高亮】

    转载请注明出处:http://www.cnblogs.com/zisou/p/cocos2dxJQ-6.html 聊天系统在手机网游中是最常见的交互工具,大家在一起边玩游戏边聊天岂不乐哉: 废话不多了 ...

  7. 【cocos2d-x 手游研发----怪物智能AI】

    原创文章,转载请注明出处:http://www.cnblogs.com/zisou/p/cocos2d-xARPG4.html 谈到怪物AI,我觉得就比较话多了,首先理解一下(Artificial I ...

  8. 【cocos2d-x 手游研发小技巧(1)自定义制作怪物伤害数值】

    直插主题了,今天写了一下午,早就想要写这类似东西的,首先我不会选用CCLabelAtlas了,我直接用帧图片做. 首先我们要准备素材,我先把素材帖出来给大家: 这个是一张比较全的素材图,它包含了扣血的 ...

  9. 【cocos2d-x 手游研发小技巧(7)图片资源加密,Lua文件加密】

    游戏开发中常遇到资源保护的问题. 目前游戏开发中常加密的文件类型有:图片,Lua文件,音频等文件,而其实加密也是一把双刃剑. 需要安全那就得耗费一定的资源去实现它.目前网上也有用TexturePack ...

随机推荐

  1. python作业之修改用户配置文件

    用户的配置文件如下 backend oldboy school school1 age 21 weight 210 qq 550176565 iphone 139987676backend oldgi ...

  2. python生成验证码,文字转换为图片-乾颐堂

    在58或者赶集等一些网站上经常看到手机号是图片格式,或者一些网站的验证码.这些都是动态生成的,今天我们来看一下如何用python把文字生成图片.其实今天主要借助pygame的图像渲染模块,这样比较简单 ...

  3. laravel的函数asset()、url()

    1.asset():用于引入静态文件,如 css/JavaScript/images,文件必须存放在public文件目录下 src="{{ asset('home') }}/images/t ...

  4. 获取GUID的GET网址:createguid.com

    1.在浏览器的地址栏中输入createguid.com,回车之后即可得到一个GUID 2.在JMeter中可以这样填写HTTP Request 然后通过正则表达式提取器提取GUID <texta ...

  5. oracle 表分区例子

    oracle表分区详解-一步一步教你oracle分区表详解   .创建三个不同的表空间,模拟在不同磁盘上的保存不同范围的数据    create tablespace test01 datafile ...

  6. 【转】Hibernate的getSQLQuery方法对char类型的解析问题

    [转]Hibernate的getSQLQuery方法对char类型的解析问题 建立数据库: create table T_TEST1( id char (32), name varchar (255) ...

  7. 2018.09.08 NOIP模拟eat(贪心)

    签到水题啊... 这题完全跟图论没有关系. 显然如果确定了哪些点会被选之后顺序已经不重要了.于是我们给点按权值排序贪心从大向小选. 我们要求的显然就是∑i(a[i]−(n−i))" role ...

  8. 马婕 2014年MBA,mpacc备考 报刊宣读1 中国的电子商务(转)

    http://blog.sina.com.cn/s/blog_3e66af4601015fxi.html 中国电子商务蓄势待发 Chinese e-commerce中国电子商务Pity the par ...

  9. select自定义下拉选择图标

    闲言少叙: 上CSS: appearance: none; -moz-appearance: none; -webkit-appearance: none; cursor: pointer; back ...

  10. Python+Android开发

    1 下载Scripting Layer for Android (SL4A) Scripting Layer for Android (SL4A) 是一个开源项目,目标是为android系统提供脚本语 ...