2016年10月20日

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 阅读(248) 评论(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 阅读(146) 评论(0) 推荐(0) 编辑

2016年10月17日

python: 添加自定义模块路径 —— 可以使用相对路径

摘要: 自定义模块时,添加模块路径: 阅读全文

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

2016年10月14日

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 阅读(938) 评论(0) 推荐(0) 编辑

PyCharmIDE: 给脚本传递参数

摘要: 阅读全文

posted @ 2016-10-14 17:34 ZhYQ_note 阅读(1399) 评论(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 阅读(184) 评论(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 阅读(558) 评论(0) 推荐(0) 编辑

2016年10月11日

python字符串转整形异常

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

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

2016年10月10日

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 阅读(248) 评论(0) 推荐(0) 编辑

2016年10月9日

mac和xcode快捷键

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

posted @ 2016-10-09 14:55 ZhYQ_note 阅读(193) 评论(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 阅读(701) 评论(0) 推荐(0) 编辑

3D中的相机 - 投影矩阵和视图矩阵

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

posted @ 2016-10-09 13:56 ZhYQ_note 阅读(763) 评论(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 阅读(252) 评论(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 阅读(562) 评论(0) 推荐(0) 编辑

2016年10月8日

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 阅读(3460) 评论(0) 推荐(0) 编辑

2016年9月30日

player: 初始化分析

摘要: //1、 //cocos 程序开始运行时执行的函数 bool AppDelegate::applicationDidFinishLaunching() { // initialize director auto director = Director::getInstance(); director->setProjection(Director::Projection:... 阅读全文

posted @ 2016-09-30 17:04 ZhYQ_note 阅读(413) 评论(0) 推荐(0) 编辑

2016年9月29日

quick player运行分析

摘要: mac应用从AppController.mm源文件的applicationDidFinishLaunching函数启动: 1 1、 2 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 3 { 4 [self installUncaughtExceptionHandler]; 5... 阅读全文

posted @ 2016-09-29 12:24 ZhYQ_note 阅读(688) 评论(0) 推荐(0) 编辑

2016年9月28日

quick: setup_mac.sh分析

摘要: //quick: setup_mac.sh分析 //quick: setup_mac.sh分析#!/bin/bash //获取并打印根目录QUICK_V3_ROOTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"BASENAME=`bas 阅读全文

posted @ 2016-09-28 12:22 ZhYQ_note 阅读(583) 评论(0) 推荐(0) 编辑

2016年9月27日

cocos: 链接错误: _lz_adler32 in liblibquickmac.a

摘要: 错误: Undefined symbols for architecture x86_64: "_adler32", referenced from: _lz_adler32 in liblibquickmac.a(lua_zlib.o) _png_icc_set_sRGB in libcocos2 阅读全文

posted @ 2016-09-27 18:57 ZhYQ_note 阅读(754) 评论(0) 推荐(0) 编辑

编译错误: file not found with angled include use quotes instead #include <lualib.h> 和 #include "lualib.h"

摘要: http://stackoverflow.com/questions/17465902/use-of-external-c-headers-in-objective-c 问题: 7down votefavorite 6 6 In my iOS project I need to use an ext 阅读全文

posted @ 2016-09-27 15:01 ZhYQ_note 阅读(9777) 评论(0) 推荐(1) 编辑

导航