30 Mar 2015

ICEM转换UG几何体再探

收藏到CSDN网摘



以前写过一个命令行调用ICEM的帖子,谈到了ICEM在batch mode下转换UG几何体的方法,可以借用中间rpl文件,使用icemcfd.bat来调用;或者抛开rpl和icemcfd.bat直接写一个bat文件来调用ug_run_script.cmd.其中后者有2个好处:
第一:避免生成中间步骤的rpl文件;第二:可以选择通过层(layer)转换,或者通过名称(name)转换.具体跟调用cmd文件的参数有关系.

25 Mar 2015

Add Property to class dynamically in Python

收藏到CSDN网摘




开源社区有一个网友问了个问题,如何动态给类添加一个属性?这在c++中几乎是不可能的,据说.Net和Java这种支持反射机制的语言可以.在Python中,这(相对)非常容易实现,需要正确设置get和set函数就能为一个类动态添加一个属性.具体看代码:

10 Mar 2015

ROOT MOTO G running Lollipop

收藏到CSDN网摘




Just got back to 4.4.4 stock rom and then update through OTA to lollipop. There's a couple of improvements as well. The bad side is that I lost root on my device. Due to last imperfect rooting process, I am not going to do this again. Fortunately, I found this page and root my Moto G (Lollipop 5) successfully. This method seems work without any problem.

MOTO G flash back to stock rom

收藏到CSDN网摘



I got OTA for Lollipop 5.0 this morning. Unfortunately, it requires restart to install the updates. My moto g has this cannot-restart problem for long time since root. I have to use the "fastboot mode->normal start" technique to get it start properly. No luck at all, it stuck while it was restarting. Surprisingly, after using the old method, it would power-off again automatically. I assume the OTA may write something to the system to force the updates.

It seems that there's no other way to get the phone working. I HAVE TO flash the stock rom to make it right. Here we go!