COCOS2DX,LUA,学习笔记
http://blog.sina.com.cn/s/blog_4ceb1a410101d4tq.html以下大部分来自网络,只做学习记录用。 一 框架层面 二 Lua层面 三 工具层面 四 android打包 一 框架层 整体来说,cocos2dX提供的一个简便的框架,包含了渲染,动画,事件分发,网络还有UI,物理引擎等几大模块。对于做一个游戏从功能上来说已经...
View Article浮点数简介
内存中的储存形式(IEEE-745) Address 3 2 1 0 Content SEEEEEEE EBBBBBBB BBBBBBBB BBBBBBBB 其中的字母分别代表: S(Significand):1 - 正负号 E(Exponent):8 - 指数部分 B(Base):23 - 底数部分 这样, 整个浮点数表示起来就是: N进制的小数...
View Articlelinux平台hash_map使用示例
1 #include <string> 2 #include <iostream> 3 #include <ext/hash_map> 4 using namespace __gnu_cxx; 5 6 //define the class 7 class ClassA{ 8 public: 9 ClassA(int a):c_a(a){}...
View ArticleQT笔记81:QT模拟一些软件的退出动画
class Widget : public QWidget{ Q_OBJECTpublic: explicit Widget(QWidget *parent = 0); ~Widget();private: void resizeEvent(QResizeEvent* event);private: QStateMachine* mMachine;...
View Article解析 ipa 文件版本号等信息(基于 python)
python 3.x 1 #!/usr/bin/python 2 # Filename: ipaInfo3.py 3 # author khan.lau 4 5 # python 3.x 6 7 import zipfile, plistlib, sys, re 8 9 10 def analyze_ipa_with_plistlib(ipa_path):11 ipa_file =...
View Article【总结】连接数据库问题
症状:本地应用程序连接不上 AMAZON 的数据库解决:在AMAZON 数据库中增加login用户,还是不行,原来是忘记设置如下:右键 ants -> 属性 -> User Mapping -> 勾上 ANTS 数据库。因为要连接 ANTS鬼 2015-01-04 23:41 发表评论
View Article矢量直线,矢量点
1 2 // 绘制点 3 float point(vec2 p, vec2 center, float radius) 4 { 5 vec2 c2p = p-center; 6 float d = dot(c2p,c2p); // c2p的长度平方 7 if(d < radius * radius) 8 return 1.0; 9 10...
View Articleplease simplify me (again…)
http://www.iquilezles.org/blog/?p=2848Yet another example of code simplification that people don’t seem to want to do. It must be the 5th ot 6th time I ask people to do this change when programming a...
View Articleplease please please, make it smaller!
http://www.iquilezles.org/blog/?p=2828I think size matters. However, unlike in real life, when programming the smaller the better. Generally. Also, the less branches the better, at least when...
View Article什么是市盈率或称本益比(P/E Ratio)?
本益比是选股票的重要指标之一,说起本益比这个词,相信很多人都有听过,大部分投资者也自认明白和了解本益比的含义,但当你叫他和你解释时,他却说了半天你也没听懂。...
View ArticleOpenCASCADE Hidden Line Removal
OpenCASCADE Hidden Line Removal eryar@163.com Abstract. To provide the precision required in industrial design, drawings need to offer the possibility of removing lines, which are hidden in a given...
View Article布尔变量初始值(2)
之前遇到过的问题-布尔变量初始值 ,最近又遇到了。重新整理一下bool在VS2010中的未初始化时候的值: F5 :调试 CTRL+F5:执行 DEBUG TRUE TRUE RELEASE TRUE FALSE...
View Article(转载)char与unsigned char的本质区别
原文地址:http://www.cnblogs.com/qytan36/archive/2010/09/27/1836569.html 在C中,默认的基础数据类型均为signed,现在我们以char为例,说明(signed)char与unsigned char之间的区别。 首先在内存中,char与unsigned...
View ArticleGDI对象都必须调用相应的方法进行销毁
GDI对象都必须调用相应的方法进行销毁。如下表GDI对象产生方法销毁方法位图(HBITMAP)CreateBitmap,CreateBitmapIndirect,CreateCompatibleBitmap,CreateDIBitmap,CreateDIBSection,CreateDiscardableBitmapDeleteObject画刷(HBRUSH)CreateBrushIndirect,...
View ArticleLua注册回调到C++
http://cn.cocos2d-x.org/tutorial/show?id=1896思路像所有语言一样,绑定回调主要是执行的任务执行到特定情形的时候,调用对用回调方法。...
View ArticleQuick-Cocos2d-x 集成 Google protobuf 方法
http://cn.cocos2d-x.org/tutorial/show?id=506 本文将向您介绍Quick-Cocos2d-x集成google protobuf的方法。 第一步 需要最新的protobuf 类库和解析程序。 下载地址:https://github.com/sean-lin/protoc-gen-lua git clone...
View ArticleIterate Files by Tcltk
Iterate Files by Tcltk eryar@163.com Abstract. Tcl/Tk provide a programming system for developing and using graphical user interface(GUI) applications. Tcl stands for “tool command language” and is...
View Article