163 - sue602.blog.163.com - Delight Paradise

Latest News:

让服务器程序优雅地退出 13 Jun 2013 | 02:34 pm

让服务器程序优雅地退出 假设我们的服务器程序提供服务是在主线程外的其它线程(或者子进程)中,主线程仅做些非常简单的事情,它创建服务后就进入休眠状态,不想通过循环sleep忙等,不想被用户打扰(比如被Ctrl+C草率地干掉),又觉得可以让用户友好地不慌不尽快地关闭(还是通过Ctrl+C或者其它信号,但关闭前要做些资源收回、状态保存之类的收尾工作)。 Ctrl+C或者其它信号强制杀掉进程,服务器程...

centos编译ACE6.0.3 11 Jun 2013 | 11:38 am

http://my.oschina.net/u/193452/blog/70932 首先:下载ACE包 ,下载链接:http://download.dre.vanderbilt.edu/ 这里只安装了ACE,其他的包没有涉及。 tar -xvf  ACE-6.0.3.tar.gz cd ACE_wrappers 针对不同版本创建两个文件链接: cd   ./ace ln...

Make CCScrollView work with CCMenuItemImage 17 May 2013 | 03:04 pm

CCScrollView has a lower priority to handle touch event,if there is a CCMenuItemImage the touch event is handled by CCMenuItemImage and never goes to CCScrollView How Create a new class called CCScr...

实现LZARI压缩算法的C++类 6 May 2013 | 08:04 am

这是一个基于LZARI算法的数据压缩的类.Haruhiko Okumura 于1989年7月4日用c语言写实现了这个算法.但是上面用到了一些全局或静态的变量,在MFC下用起来很不方便.我把它改写成了一个c++类,使它可以方便的压缩和解压缩,更重要的是,我新增加了两个接口,这个类可以压缩/解压缩一段内存缓冲区,而不仅仅是文件. 一共提供了5个对外接口: 1.压缩/解压缩文件 双击代码全选 1...

透视图,绕轴旋转某个角度 6 May 2013 | 07:48 am

CCActionInterval*  orbit2 = CCOrbitCamera::create(0,1, 0, 0, -10, 90, 0)

lua和C++相互交换数据 22 Mar 2013 | 09:35 am

下面的代码演示了在C++和lua脚本之间传递数据。 首先在C++中创建一个table,添加元素,然后放置到lua的全局表中。在lua脚本中可以使用C++创建的这个表。 然后在脚本中创建一个表,以脚本返回值的方式返回给C++,在C++中可以读取表中的值。 例子代码需要一个args.lua的lua文件,要手工创建,我把它放到了C盘根目录下。 [cpp] view plaincopy /...

DEBUG android error with NDK tools 15 Mar 2013 | 05:10 am

Looking at ther error, this seems like you are trying to access a null pointer.So you might want to check were exactly the application crashes: Locate your android-ndk installation directory and chec...

Stroke example for CCLabelTTF and CCSprite 1 Mar 2013 | 10:40 am

I added "opacity" property and possibility to add Stroke for all CCSprite nodes. Example of usage: - See more at: http://cocos2d-x.org/boards/6/topics/22335#sthash.NIljO9gE.dpuf

cocos2d-x 获取当前地理位置 27 Feb 2013 | 07:14 am

cocos2d-x中没有LBS模块的相关API,所以我们需要利用原生的CoreLocation,在frameworks里面加入“CoreLocation.framework”。在最新版本的Xcode(4.x)中加入新的framework步骤如下: 单击项目的target =>在出来的xcodeproj面板中点击“Link Binary With Libraries” =>点击“+”,然后选择需要...

cocos2d-x对sprite做遮罩的方法 27 Feb 2013 | 07:09 am

http://nuts.hk/?p=134 CCSprite* masked_sprite(CCSprite* mask, CCSprite* sprite) { CCSize size = mask->getContentSize(); CCRenderTexture* rt = CCRenderTexture::renderTextureWithWidthAndHeight(mask->ge...

Recently parsed news:

Recent searches: