ITeye博客

黄金体验

yoshiyan · 共 28 篇文章

如何指定加载的的msvcrt.dll的版本

使用预编译宏,示例代码如下: #pragma comment(linker, ""/manifestdependency:type='Win32' name='Microsoft.VC90.CRT' version='9.0.30729.4137' processorArchitecture='X86' publicKeyToken='1fc8b3b9a1e18e3b' language='*'"")

2012-06-02 01:33 · C++ · 评论(0)

如何在编译boost python的时候指定所用python的版本

修改user-config.jam文件 以boost 1.49为例,此文件的路径如下: H:\boost_1_49_0\boost_1_49_0\tools\build\v2\ 找到如下的部分,并根据需要进行修改。 --------------------- Python configuration. --------------------- Configure specific Python version. using python : 2.7 : C:/Python27 : C:/Python27/include : C:/Python27/libs ;

2012-05-30 16:45 · C++ · 评论(0)

PyQT

如何给QPushButton的click事件的响应函数传入参数? 使用lambda,实例代码: buttonChangeSetting.clicked.connect(lambda : self.showRoleSettingDialog(unicode(treeItem.text(0)), unicode(treeItem.text(1)), unicode(treeItem.text(2)))) def showRoleSettingDialog(self, roleId, roleName, activeTask): self.dialogRoleSetting.show() 如何往Q…

2012-04-04 04:12 · Python · 评论(0)

Python笔记

Python Project Structure Python was conceived as a scripting language. Unlike compiled languages like C or Java, Python files are designed to be directly runnable. * RunMe.java -p someargument < Not ok! * RunMe.py -p someargument < Ok! This is convenient for small scripts, but doesn’t help applicat…

2012-02-04 06:17 · Python · 评论(0)

游戏开发

Double Buffering是啥? Double Buffering is a technique used to remove the visual tearing associated with drawing directly to the screen. It gets its name because you use two graphics buffers to draw the final image: one that resides in-memory (the back buffer), and the buffer which is displayed on the…

2010-12-01 05:53 · Flex · 评论(0)

Flex Skin & Style & ItemRenderer

定义Style的语法 fx:Style @namespace_declaration namespace|Application { style_definition } </fx:Style> 示例代码: <fx:Script> <![cdata[ [embed("assets/asterisk_orange.png")] protected const ICON:Class; ]]> </fx:Script> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.a…

2010-11-20 00:38 · Flex · 评论(0)

Flex TLF框架

TextFlow的textAlign样式的"justify"有何特点? justify的中文解释为:调整使全行排满;使每行排齐;使齐行 请比较下边的两幅图: textAlign = "left"&& whiteSpaceCollapse = "perserve": textAlign = "justify" && whiteSpaceCollapse = "perserve": TextFlow的whiteSpaceCollapse属性有啥影响? 4.1的API文档中对whiteSpaceCollapse的解释如下: whiteSpaceCollapse:String (default = …

2010-11-14 20:11 · Flex · 评论(0)

Flex Effect

如何编写自定义的effect http://flexscript.wordpress.com/2008/09/16/flex-creating-custom-effects-in-flex/ http://it.chinawin.net/softwaredev/article-17377.html

2010-11-08 09:20 · Flex · 评论(0)

Flex控件->VSlider&HSlider

为何给VSlider/HSlider设置的初值不生效? 如果 minimum="0" maximum="1" 则需要将snapInterval设置为一个0.1或者0.01这样的数值,否则无法将VSlider/HSlider的值设置为0和1之外的数。 将VSlider/HSlider的liveDragging属性设置为true或者false,有什么不同? liveDragging为false时,只有Slider停止变化后才触发Change事件(如果是Drag,则是松开鼠标;如果是TrackClick,则是到达Click位置)。而为true时,则是只要Slider的值有变化就立即触发Change…

2010-11-05 15:22 · Flex · 评论(0)

电子书籍分享

Flash Flash_Professional_Papervision3D http://u.115.com/file/f1abb35081 Learning_ActionScript_3.0 http://u.115.com/file/f15daf62d0 Flash_Real-World_Flash_Game_Development http://u.115.com/file/f1fb768604 Flex Flex 4 Cookbook: Real-world recipes for developing Rich Internet Applications By Joshua No…

2010-11-02 16:07 · 共享资源 · 评论(0)

flex布局

使用自定义Layout时,s:DataGroup和s:List应该如何选择? 与s:List相比,s:DataGroup没有selectedIndex,而且默认没有BackGround。 Spark List不能响应Click事件吗? 是的,需要在ItemRenderer里响应,然后通过DispathEvent告诉Spark List。 参考链接: http://stackoverflow.com/questions/2299659/how-do-i-handle-click-event-in-spark-list-control-in-flex-4 或者你也可以响应change事件,在每次…

2010-10-22 10:32 · Flex · 评论(0)

升级Flash Player后,Flash Builder无法调试的解决办法

错误信息: C:\Program Files\Mozilla Firefox\plugins\NPSWF32.dll Flex Builder cannot locate the required version of the Flash Player. You may need to install Flash Player 9.0 or reinstall Flex Builder. Do you want to try to run your application with the current version? 解决办法: 运行程序: X:\Program Files\Adobe…

2010-10-10 09:16 · Flex · 评论(0)

编程语言比较:AS vs C++ vs Java vs Python

文件/类 是否支持一个文件内定义多个类?(基于C++) |AS: |支持。但只允许有一个public类。此类需要包含在package的括号里,而其他类则不能在括号里。| |C++: |支持,无限制。| |Java: |支持,但只允许有一个public类。| |Python:|支持,无限制。| 类名是否必须和文件名(不包含后缀)相同?(基于AS) |AS: |是| |C++: |否| |Java: |是(public 类需和文件名相同)| |Python:|否| 是否允许private或者protected构造函数?(基于C++) |AS: |否,构造函数只能是public的| |C++: |…

2010-09-21 10:18 · 编程语言 · 评论(1)

Flex事件

为什么接收不到dispatch出来的自定义Event? 如果是在父控件里监听,则此Event的bubble属性应该为True。 自定义消息的时候,一定要记得重写clone()函数。在此自定义事件的处理函数里,如果需要再次dispatch此自定义事件,则该clone函数会被调用到。如不重写clone函数,则第二次dispatch出去的事件,你添加的自定义属性将不会有正确的值。 event的target和currentTarget有啥区别? The currentTarget property is the IEventListener you registered the event hand…

2010-09-18 07:18 · Flex · 评论(0)

Flex Draw API

MovieClip VS Shape VS Sprite MovieClip相当于有时间轴的Sprite,Sprite没有时间轴。 Sprite 对象是显示对象容器,而 Shape 对象不是(并且不能包含子显示对象)。 Sprite 对象支持用户输入事件,而 Shape 对象却不支持。 Graphics使用心得 graphics.clear()会把graphics.lineStyle()的设置也给清除掉。 flash.geom.Rectangle使用心得 Rectangle会把构造函数传入的x,y当成是左上角的x和y坐标,它并不会在内部帮忙调整。如果构造函数传入的是右下角的x和y坐标,则取l…

2010-09-07 21:07 · Flex · 评论(1)