# component不同作用的程序需要保持互相隔离我们不想ai 物理 渲染 声音 等等功能 耦合在一起,像下面这样```//bad if (collidingWithFloor() && (getRenderState() != INVISIBLE)){ playSound(HIT_FLOOR)....
分类:
其他好文 时间:
2015-01-20 20:22:50
阅读次数:
170
用途 解释器模式 (Interpreter) 定义一个语言,定义它的文法的一种表示。并定义一个解释器,这个解释器使用该表示来解释语言中的句子。 解释器模式是一种行为型模式。结构 图-解释器模式Context : 包含解释器之外的一些全局信息。classContext{privateString...
分类:
编程语言 时间:
2015-01-20 20:02:58
阅读次数:
126
### Behavioral Pattern#### interpreter pattern string -> code instruction set: 提供基本操作virtual machine: 执行指令front-end: 生成效率更高的字节码```void setHe...
分类:
其他好文 时间:
2015-01-20 19:50:35
阅读次数:
187
近期研究了一下elf文件格式,发现好多资料写的都比較繁琐,可能会严重打击学习者的热情,我把自己研究的结果和大家分享,希望我的描写叙述可以简洁一些。一、基础知识 elf是一种文件格式,用于存储Linux程序. 它内部都有一些什么信息呢?大概包含编制好的计算机指令,数据,计算机在须要的时候把这个文件读取...
分类:
其他好文 时间:
2015-01-19 14:04:52
阅读次数:
163
linux elf文件格式浅谈Linux的可执行文件格式ELFLinux中ELF格式文件介绍
分类:
系统相关 时间:
2015-01-18 21:03:41
阅读次数:
171
数据类型检查可以用内置函数isinstance实现:1 def my_abs(x):2 if not isinstance(x, (int, float)):3 raise TypeError('bad operand type')4 if x >= 0:5 ...
分类:
其他好文 时间:
2015-01-15 12:35:54
阅读次数:
165
有80个内置函数官网https://docs.python.org/2/library/functions.html查询内置函数的功能描述用 help(内置函数名)The Python interpreter has a number of functions built into it that ...
分类:
编程语言 时间:
2015-01-15 12:28:46
阅读次数:
204
出现上述错误的原因是因为没有为Pydev指定python.exe位置修改步骤依次是 1、从Eclipse的菜单 Window --> Preferences 打开首选项配置; 2、首选项配置页面,找到左边的PyDev项展开,点击Interpreter - Python 项(Interprete...
分类:
系统相关 时间:
2015-01-15 01:46:50
阅读次数:
182
执行一个脚本full_build.sh 时, 一直是提示我:-bash: ./full_build.sh: /bin/bash^M: bad interpreter: No such file or directory开始是说我权限不够, 不能执行, 接着我就把权限给改了, 就一直报上面问题.记得几...
分类:
其他好文 时间:
2015-01-13 15:47:49
阅读次数:
113
JNI入门-学习笔记
可执行文件 Windows - *.exe | linux - *.elf
c函数库文件 Windows - *.dll | linux - *.so
批处理文件 Windows - *.bat | linux - *.sh
工具
NDK -- native developer kits
Cygwin -- Linux系统模拟器
安装过程要点: ——安装时...
分类:
移动开发 时间:
2015-01-13 14:28:29
阅读次数:
252