摘要:
[Skeletal Animation] Skeletal animation is the use of “bones” to animate a model. The movement of bones themselves can causechanges to other bones. Advantages: 1, It'svery important to the pro-grammers, is that such animations take up less storage space. Insteadof storing a new set of vertices f
阅读全文
posted @ 2014-02-20 14:23
Tekkaman
阅读(363)
推荐(0)
编辑
摘要:
[文本读写vs二进制读写] 在学习C语言文件操作后,我们都会知道打开文件的函数是fopen,也知道它的第二个参数是 标志字符串。其中,如果字符串中出现'b',则表明是以打开二进制(binary)文件,否则是打开文本文件。 那么什么是文本文件,什么是二进制文件呢? 可能大多数人都没有仔细考虑过。 所谓使用fopen标志打开文本文件与二进制文件的说法并不准确。正确的说法应该是--以文本方式和二进制方式打开文件。因为我们用两种方式都可以任意的文件。 为什么还要区分两种方式呢?因为这两种方式在读写文件时的操作是不一样的。 二进制方式很简单,读文件时,会原封不动的读出文件的全部內容,写的
阅读全文
posted @ 2014-02-19 14:31
Tekkaman
阅读(2208)
推荐(1)
编辑
摘要:
【深入剖析AutoreleasePool】 Objc的AutoreleasePool是一个首尾相连的内存链接,每块大小为1页(32位机上为4kb)。 上面可以看到,parent指向父Pool,child指向子Pool,因初始化时无child Pool,所以child被置为NULL。next指向当前内存块中的最大位置,即每个块内是一个4kb的栈。 通过以下方很容易看出AutoreleasePoolPage如果使用: 当一个AutorreleasePool被释放时,在该pool之后的pool所涵盖的对象均会被释放。
阅读全文
posted @ 2014-02-16 23:46
Tekkaman
阅读(442)
推荐(0)
编辑
摘要:
【Preprocess】 在使用forwarding机制前,会先经历2个步骤,只有当这2个步骤均失败的情况下,才会激活forwarding。1、+(BOOL)resolveInstanceMethod:(SEL)selector、resolveClassMethod。 当第一次没找到SEL时,调...
阅读全文
posted @ 2014-02-16 23:12
Tekkaman
阅读(599)
推荐(0)
编辑
摘要:
【Dynamic Method Resolution】 @dynamic directive 用于声明属性的方法dynamic loading,which tells the compiler that the methods associated with the property will be provided dynamically。即编译期不实现此方法,而由动态加载。此directive的作用在于告诉编译器某个类的实例拥有某属性而不会报编译错误。 You can implement the methods resolveInstanceMethod: and resolveCla..
阅读全文
posted @ 2014-02-16 22:43
Tekkaman
阅读(317)
推荐(0)
编辑
摘要:
【Represent nil with NSNull】 It’s not possible to add nil to the collection classes described in this section because nil in Objective-C means “no object.” If you need to represent “no object” in a collection, you can use the NSNull class:1 NSArray *array = @[ @"string", @42, [NSNull null]
阅读全文
posted @ 2014-02-16 11:35
Tekkaman
阅读(401)
推荐(0)
编辑
摘要:
【Encapsulating Data】The synthesized methods follow specific naming conventions:The method used to access the value (thegettermethod) has the same name as the property. The getter method for a property calledfirstNamewill also be calledfirstName.The method used to set the value (thesettermethod) star
阅读全文
posted @ 2014-02-16 10:16
Tekkaman
阅读(281)
推荐(0)
编辑
摘要:
【Working with nil】 It’s always a good idea to initialize scalar variables at the time you declare them, otherwise their initial values will contain garbage from the previous stack contents: This isn’t necessary for object pointers, because the compiler will automatically set the variable to nil ...
阅读全文
posted @ 2014-02-15 22:51
Tekkaman
阅读(296)
推荐(0)
编辑
摘要:
【Determining Equality of Objects】 If you need to determine whether one object is the same as another object, it’s important to remember that you’re working with pointers.The standard C equality operator == is used to test equality between the values of two variables, like this: When dealing with...
阅读全文
posted @ 2014-02-15 21:45
Tekkaman
阅读(237)
推荐(0)
编辑
摘要:
【NSLog中的%@】 There is one additional substitution token available in Objective-C, %@, used to denote an object. At runtime, this specifier will be substituted with the result of calling either the descriptionWithLocale: method (if it exists) or the description method on the provided object. The desc.
阅读全文
posted @ 2014-02-15 21:27
Tekkaman
阅读(2755)
推荐(0)
编辑
摘要:
【ld - linker】NAME ld -- linkerSYNOPSIS ld files... [options] [-o outputfile]DESCRIPTION The ld command combines several object files and libraries, resolves references, and produces an ouput file. ld can produce a final linked image (executable, dylib, or bundle), or with the -r option, produce...
阅读全文
posted @ 2014-02-14 21:19
Tekkaman
阅读(384)
推荐(0)
编辑
摘要:
【恢复HDFS误删数据】 HDFS会为每一个用户创建一个回收站目录:/user/用户名/.Trash/,每一个被用户通过Shell删除的文件/目录,在系统回收站中都一个周期,也就是当系统回收站中的文件/目录在一段时间之后没有被用户回复的话,HDFS就会自动的把这个文件/目录彻底删除,之后,用户就永远也找不回这个文件/目录了。 根据上面的介绍,用户通过命令行即HDFS的shell命令删除某个文件,这个文件并没有立刻从HDFS中删除。相反,HDFS将这个文件重命名,并转移到操作用户的回收站目录中(如/user/hdfs/.Trash/Current, 其中hdfs是操作的用户名)。如果用户的回..
阅读全文
posted @ 2014-02-13 23:24
Tekkaman
阅读(3837)
推荐(0)
编辑
摘要:
【一个缓冲区溢出示例】问:下面是一个简单的密码保护功能,你能在不知道密码的情况下将其破解吗? 1 #include 2 3 int main(int argc, char *argv[]) 4 { 5 int flag = 0; 6 char passwd[10]; 7 memset(passwd,0,sizeof(passwd)); 8 strcpy(passwd, argv[1]); 9 10 if(0 == strcmp("LinuxGeek", passwd))11 {12 flag = 1;13 }...
阅读全文
posted @ 2014-02-13 22:18
Tekkaman
阅读(607)
推荐(0)
编辑
摘要:
【SpringBoard】 Springboard, orHome Screen, is the standard application that manages theiOShome screen. Other tasks include starting WindowServer, launching and bootstrapping applications and setting some of the device's settings on startup. Onjailbroken devices, unsigned applications (application
阅读全文
posted @ 2014-02-13 22:05
Tekkaman
阅读(585)
推荐(0)
编辑
摘要:
【Symbol Table】 In order for GDB to be useful to us, it needs to be able to refer to variable and function names, not their addresses. Humans use names likemain()ori. Computers use addresses like0x804b64dor0xbffff784. To that end, we can compile code with "debugging information" which tells
阅读全文
posted @ 2014-02-13 21:23
Tekkaman
阅读(453)
推荐(0)
编辑
摘要:
【feof使用注意】 以下是错误的用法,發生狀況->多讀一次?:1 FILE* pf;2 while(!feof(pf)){3 //fread 讀取4 //資料處理5 } feof是發生在fread使用"讀取過檔案"後,已讀到End-of-file位置時,回傳的指標才會是true(檔案結尾),所以上面的寫法在讀完最後一筆後,指標會停留在End-of-file位置前,需要再讀一次到在End-of-file位置後(判斷讀取資料失敗,因為已讀到eof),才會為true,而因為fread讀取失敗,buffer的資料不會改變,所以才會多讀一筆。 改善的方式,如先使用fread讀取,...
阅读全文
posted @ 2014-02-12 22:49
Tekkaman
阅读(394)
推荐(0)
编辑
摘要:
【-g vs -rdynamic】-g选项与-rdynamic选项的差别:1,-g选项新添加的是调试信息(一系列.debug_xxx段),被相关调试工具,比如gdb使用,可以被strip掉。2,-rdynamic选项新添加的是动态连接符号信息,用于动态连接功能,比如dlopen()系列函数、backtrace()系列函数使用,不能被strip掉,即强制strip将导致程序无法执行。添加-rdynamic选项后,.dynsym表就包含了所有的符号。backtrace就通过.dynsym来查找符号。参考:http://lenky.info/archives/2013/01/13/2190
阅读全文
posted @ 2014-02-11 21:55
Tekkaman
阅读(433)
推荐(0)
编辑
摘要:
【如何理解*】 const char*, char const*, char*const的区别问题几乎是C++面试中每次都会有的题目。事实上这个概念谁都有,只是三种声明方式非常相似很容易记混。Bjarne在他的The C++ Programming Language里面给出过一个助记的方法:把一个...
阅读全文
posted @ 2014-02-11 21:41
Tekkaman
阅读(347)
推荐(0)
编辑
摘要:
【MecAnim】 MecAnim是Unity 4.0推出的新的动画系统,新系统使用Animator组件来控制动画,老系统使用Animation组件来控制动画。此篇讲述MecAnim系统。 What is rigging & skinning? How many terminology d...
阅读全文
posted @ 2014-02-06 14:26
Tekkaman
阅读(662)
推荐(0)
编辑
摘要:
【Unity2D Keynote】1、File Format Accepted by Unity2、By double-clicking an object in Hierachy, you not only select the object in the scene but center the...
阅读全文
posted @ 2014-02-04 23:15
Tekkaman
阅读(459)
推荐(0)
编辑
摘要:
【C# Common Keyword】1、abstract Use theabstractmodifier in a class declaration to indicate that a class is intended only to be a base class of other cl...
阅读全文
posted @ 2014-02-04 15:27
Tekkaman
阅读(509)
推荐(0)
编辑
摘要:
【C# Keynote】1、Main方法必须包含在一个类内,参数类型、返回值类型可以有多种变化。 1 // Hello1.cs 2 public class Hello1 3 { 4 public static void Main() 5 { 6 System.Console.WriteLine("Hello, World!"); 7 } 8 } 9 10 // Hello3.cs11 // arguments: A B C D12 using System;13 14 public class Hello315 {16 public static void...
阅读全文
posted @ 2014-02-04 14:12
Tekkaman
阅读(345)
推荐(0)
编辑
摘要:
【Multimedia&Network】1、Unity3D共支持4种格式音乐文件:2、AudioSource用于指明音频源,被绑定在一个GameObject身上。光有AudioSource组件声音是无法听到的,因为在3D世界中,距离远的音频我们听不到或者声音小,而距离近的音频我们就能清楚地听到。这样...
阅读全文
posted @ 2014-02-04 11:55
Tekkaman
阅读(362)
推荐(0)
编辑
摘要:
【Unity3D PersistentStorage】1、PlayerPrefs类以键值对的形式来提供PersistentStorage能力。提供小额存储能力。(做成sst可以提供大规模数据存储)2、PlayerPrefs删除数据。3、使用PlayerPrefs实例。 1 void OnGU...
阅读全文
posted @ 2014-02-03 23:24
Tekkaman
阅读(1062)
推荐(0)
编辑
摘要:
【Model&Animation】1、FBX文件是一个完整的模型,通常内含Mesh,Material,Texture,Animation,即内含构成一个完成GameObject所需要的一切组件。可以通过以下代码来引用。 1 //动画名称 2 public const string A...
阅读全文
posted @ 2014-02-03 23:12
Tekkaman
阅读(992)
推荐(0)
编辑
摘要:
【Unity3D Script KeynoteII】1、使用代码操作Particle。 1 //粒子对象 2 GameObject particle = null; 3 //粒子X轴方向速度 4 float velocity_x = 0.0f; 5 //粒子Y...
阅读全文
posted @ 2014-02-03 19:50
Tekkaman
阅读(1162)
推荐(0)
编辑
摘要:
【PhysX】 1、施加力: 1 if(GUILayout.Button("普通力",GUILayout.Height(50))) 2 { 3 //施加一个力,X轴方向力度为1000,Y轴方向力度为1000 4 addFrceObj.rigidbody.AddForce (1000, 0, 1000); 5 } 6 7 if(GUILayout.Button("位置力",GUILayout.Height(50))) 8 { 9 ...
阅读全文
posted @ 2014-02-03 17:01
Tekkaman
阅读(744)
推荐(0)
编辑
摘要:
【Terrain Engine】1、When you press F, wherever your mouse is positioned will be moved to the center of the Scene View. This allows you to touch up an area, and quickly zoom over to a different area and change something else. If your mouse is not hovering over an area of the Terrain when you press the
阅读全文
posted @ 2014-02-02 19:58
Tekkaman
阅读(340)
推荐(0)
编辑
摘要:
【Unity3D Script Keynote】 1、创建GameObject 1 if(GUILayout.Button("创建立方体",GUILayout.Height(50))) 2 { 3 //设置该模型默认为立方体 4 var objCub...
阅读全文
posted @ 2014-02-02 13:18
Tekkaman
阅读(395)
推荐(0)
编辑
摘要:
【Unity3D Keynote】 1、场景文件扩展名为.unity。 2、up为Y正方向,down为Y负方向,right为X正方向,left为X负方向,forward为Z正方向,back为z负方向。基础物体本身坐标系。 3、在Scene工具条中可以设置Scene视图绘制模式: 4、给一个Gam...
阅读全文
posted @ 2014-02-01 14:56
Tekkaman
阅读(892)
推荐(0)
编辑
摘要:
【Primitive Objects】 Unity can work with 3D models of any shape that can be created with modelling software. However, there are also a number of primitive object types that can be created directly within Unity, namely theCube,Sphere,Capsule,Cylinder,PlaneandQuad. These objects are often useful in th.
阅读全文
posted @ 2014-01-31 23:02
Tekkaman
阅读(459)
推荐(0)
编辑
摘要:
【Event Functions】 A key concept in games programming is that of making changes to position, state and behavior of objects in the game just before eac...
阅读全文
posted @ 2014-01-31 21:21
Tekkaman
阅读(283)
推荐(0)
编辑
摘要:
【Accessing Components】 The most common case is where a script needs access to other Components attached to the same GameObject.A Component is actually an instance of a class so the first step is to get a reference to the Component instance you want to work with. This is done with theGetComponentfun.
阅读全文
posted @ 2014-01-31 19:15
Tekkaman
阅读(313)
推荐(0)
编辑
摘要:
【Material】 Materials are used in conjunction withMeshorParticle Systemsattached to theGameObject. They play an essential part in defining how your ob...
阅读全文
posted @ 2014-01-31 15:02
Tekkaman
阅读(424)
推荐(0)
编辑
摘要:
【Prefabs】 APrefabis a type of asset -- a reusableGameObjectstored inProject View. Prefabs can be inserted into any number of scenes, multiple times per scene. When you add a Prefab to a scene, you create aninstanceof it. All Prefab instances are linked to the original Prefab and are essentially clo.
阅读全文
posted @ 2014-01-31 13:21
Tekkaman
阅读(453)
推荐(0)
编辑
摘要:
【Scene View Navigation】Hold the right mouse button to enterFlythroughmode. This turns your mouse andWASDkeys (plusQandEfor up and down) into quick fir...
阅读全文
posted @ 2014-01-30 14:56
Tekkaman
阅读(310)
推荐(0)
编辑
摘要:
【What's Exposure?】 ISO:即相机的感光度。ISO数值的大小是DC对光线反应的敏感程度测量值,通常以ISO数值表示,数值越大表示对光线的敏感性越强,数值越小表示越弱,是控制曝光量的一个重要参数。ISO:数值每大1倍,感光敏感度高1倍。100ISO100,ISO200,ISO400,ISO800,ISO1600甚至更高。高ISO的作用: 提高快门速度、画面的明亮程度、可能噪点增多。用高感光度来得到一种特殊的颗粒艺术效果,尤其是拍摄黑白画面,体育、运动、新闻。低ISO的作用: 降低快门速度,能控制画面明亮度、噪点少,清晰好。高清晰照片,特效瀑布、夜景等。设置参考: 专业数
阅读全文
posted @ 2014-01-29 21:45
Tekkaman
阅读(224)
推荐(0)
编辑
摘要:
[Slice] The return value of theit->key()andit->value()is a simple structure that contains a length and a pointer to an external byte array. Returning...
阅读全文
posted @ 2014-01-28 13:48
Tekkaman
阅读(269)
推荐(0)
编辑
摘要:
【LevelDB】 LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values.Keys and values are arbitrar...
阅读全文
posted @ 2014-01-27 15:33
Tekkaman
阅读(464)
推荐(0)
编辑
摘要:
【POP3&SMTP&IMAP】IMAP是什么? IMAP,即InternetMessageAccessProtocol(互联网邮件访问协议),您可以通过这种协议从邮件服务器上获取邮件的信息、下载邮件等。IMAP与POP类似,都是一种邮件获取协议。IMAP和POP有什么区别? POP允许电子邮件客户端下载服务器上的邮件,但是您在电子邮件客户端的操作(如:移动邮件、标记已读等),这是不会反馈到服务器上的,比如:您通过电子邮件客户端收取了QQ邮箱中的3封邮件并移动到了其他文件夹,这些移动动作是不会反馈到服务器上的,也就是说,QQ邮箱服务器上的这些邮件是没有同时被移动的 。但是IMA
阅读全文
posted @ 2014-01-26 23:20
Tekkaman
阅读(296)
推荐(0)
编辑