10 2016 档案

git: hook 修改提交信息
摘要:git获取数字顺序版本号 因为git的版本使用的是hash值,不能很直观的看出那个版本,所以想找到一种方法,获取顺序的版本号,在网上找到了方法,可以获取顺序版本号 摘自: "使用bash从SVN和Git中获取顺序版本号" 基准版本号默认是1,可以通过传递一个参数修改 get_version() { 阅读全文

posted @ 2016-10-28 19:12 ZhYQ_note 阅读(1241) 评论(0) 推荐(0) 编辑

quick: iskindof使用注意
摘要:quick: iskindof使用注意 注意: 但是因为quick不能判断继承自C++如Node的情况,我实验了cocos2d x 3.11.1中的class和iskindof方法,发现方法有很大的不同,但是printf("UIListView ==== " .. tostring(iskindof 阅读全文

posted @ 2016-10-27 10:48 ZhYQ_note 阅读(586) 评论(0) 推荐(0) 编辑

mac下编程使用字体
摘要:1、xcode下使用的是Menlo的18号字体 2、webStorm使用的也是Menlo的18号字体 3、sublime Text 使用的也是Menlo的21号字体 阅读全文

posted @ 2016-10-26 10:47 ZhYQ_note 阅读(3888) 评论(1) 推荐(0) 编辑

Mac下Sublime Text常用插件
摘要:Mac下Sublime Text常用插件 1. SideBarEnhancements 右键菜单增强插件 2. BracketHighlighter 括号、引号、标签高亮插件 3. Pretty JSON JSON美化,快捷键是command+control+J 4. ConvertToUTF8 5 阅读全文

posted @ 2016-10-21 19:05 ZhYQ_note 阅读(743) 评论(0) 推荐(0) 编辑

sublime插件开发: 文件说明
摘要:sublime插件开发 文件 1. .sublime settings 设置文件 2. Main.sublime menu 主菜单按钮配置文件 3. Side Bar.sublime menu 侧边栏菜单文件列表,选中右键菜单 4. Context.sublime menu 上下文菜单(右键菜单) 阅读全文

posted @ 2016-10-20 20:31 ZhYQ_note 阅读(267) 评论(0) 推荐(0) 编辑

mac Sublime Text 快捷键
摘要:mac Sublime Text 快捷键 Tab: 光标后缩进 Shift+Tab: 反缩进 cmd+P: 打开文件切换面板 cmd+/: 行注释 cmd+R: 快速列出/跳转到某个函数 双击可选中光标所在单词,三击可选中光标所在行((Command+L)); Ctrl + G: 跳转到行 在Ctr 阅读全文

posted @ 2016-10-20 17:57 ZhYQ_note 阅读(153) 评论(0) 推荐(0) 编辑

python: 添加自定义模块路径 —— 可以使用相对路径
摘要:自定义模块时,添加模块路径: 阅读全文

posted @ 2016-10-17 16:24 ZhYQ_note 阅读(1738) 评论(0) 推荐(0) 编辑

python: int to unicode string
摘要:>>> import types >>> print type(str(2)) >>> print type(str('2')) # 这里先转为str,在转为unicode >>> print type(str(2).decode('utf-8')) >>> print type(str('32').decode('utf-8')) >>> print str(2).decode('utf... 阅读全文

posted @ 2016-10-14 19:36 ZhYQ_note 阅读(959) 评论(0) 推荐(0) 编辑

PyCharmIDE: 给脚本传递参数
摘要: 阅读全文

posted @ 2016-10-14 17:34 ZhYQ_note 阅读(1445) 评论(0) 推荐(0) 编辑

python: str()
摘要:tx1 = '中国' tx2 = u'中国' print tx1 print tx2 print type(tx1) print type(tx2)# str()函数会把unicode的字符串转成str形式的,使用的时候要注意print type(str(tx2)) 中国 中国 阅读全文

posted @ 2016-10-14 14:57 ZhYQ_note 阅读(185) 评论(0) 推荐(0) 编辑

python: isdigit int float 使用
摘要:>>> num1 = '2.0' >>> print num1.isdigit() False >>> num2 = '2' >>> print num2.isdigit() True >>> num3 = '-3' >>> print num3.isdigit() False >>> num4 = 阅读全文

posted @ 2016-10-14 14:12 ZhYQ_note 阅读(563) 评论(0) 推荐(0) 编辑

python字符串转整形异常
摘要:python字符串转整形异常 问题 在使用int("xx")转化字符串为整形时,如果字符串是float形式,这样转化会异常 解决: 先转化为浮点型,在转化为整形 实例: 阅读全文

posted @ 2016-10-11 10:32 ZhYQ_note 阅读(1661) 评论(0) 推荐(0) 编辑

python:UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
摘要:``` # 将默认编码设为utf-8 # 否则会报错: # UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) import sys reload(sys) sys.setdefaultencoding('utf-8') ``` 阅读全文

posted @ 2016-10-10 16:40 ZhYQ_note 阅读(265) 评论(0) 推荐(0) 编辑

mac和xcode快捷键
摘要:xcode快捷键 |用途 | 快捷键 | |: | :| | 局部折叠 | Command+Alt+Left/Right| | 全局折叠 | Shift+Command+Alt+Left/Right | |选择到文件开头 | Shift Home | | 选择到文件结尾 | Shift End | 阅读全文

posted @ 2016-10-09 14:55 ZhYQ_note 阅读(197) 评论(0) 推荐(0) 编辑

mac mysql 使用注意事项
摘要:mac mysql 使用注意事项 1、安装 直接通过下载官网上的dmg安装包进行安装,mysql-5.5.49-osx10.8-x86_64(我的安装文件) ,安装完成后在系统偏好设置里面有mysql选项,我们可以通过这个启动和停止mysql服务器,默认安装在了 /usr/local/mysql 目录 2、启动 通过系统偏好设置启动项启动 通过/usr/local/mysql/... 阅读全文

posted @ 2016-10-09 14:04 ZhYQ_note 阅读(723) 评论(0) 推荐(0) 编辑

3D中的相机 - 投影矩阵和视图矩阵
摘要:3D中的相机 - 投影矩阵和视图矩阵 3d游戏中,一般通过相机的设置来计算投影矩阵和视图矩阵,比如untiy和cocos,一般情况下我们不用关注如何计算, 可以直接在可视化的编辑器中调整参数就可以了,但是了解下总是好的。 具体计算可以参考: 可以参考现在cocos2dx的代码中的Camera源码,里面有根据相机的设置(位置等)计算上面两个矩阵的代码。 也可以参考下面这个,github上面一个项目... 阅读全文

posted @ 2016-10-09 13:56 ZhYQ_note 阅读(787) 评论(0) 推荐(0) 编辑

cocos Uniforms值的赋值
摘要:cocos Uniforms值的赋值 举个void Renderer::drawBatchedTriangles()的渲染: //Start drawing verties in batch for(const auto& cmd : _batchedCommands) { auto newMaterialID = cmd->getMaterialID(); ... 阅读全文

posted @ 2016-10-09 13:50 ZhYQ_note 阅读(272) 评论(0) 推荐(0) 编辑

attempt to call method 'getDataString' (a nil value)
摘要:错误: LUA ERROR: [string "/Users/staff/Documents/cocos-quick/merge/cocos-quick/player/quick/welcome/src/player.lua"]:223: attempt to call method 'getDataString' (a nil value) 在合并cocos和quick的时候,在EventC... 阅读全文

posted @ 2016-10-09 13:47 ZhYQ_note 阅读(606) 评论(0) 推荐(0) 编辑

cocos执行tolua/genbindings.py文件,错误搜集:
摘要:1、PYTHON_BIN not defined, use current python.这个不是错误 2、llvm toolchain not found!path: /Users/staff/Documents/worksoft/android-ndk-r10e/toolchains/llvm- 阅读全文

posted @ 2016-10-08 18:48 ZhYQ_note 阅读(3479) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示