Usually, we have our own vim configuration in the file ~/.vimrc What if we want one for our project? For example, we are working on certain project which needs to read in a tags file. Well, here is a possible solution. You put a line at then end of your ~/.vimrc file source ./.project.vim Then
Quite useful trick, when you want to get rid of the first certain lines of the output/file. $tail -n +2 tail prints out the result starts from the 2nd line. When you use the “find” command to generate a file list under certain folder, this is quite easy to eliminate the folder path at the
最近的项目用到了OpenGLES。 两个很容易出问题的地方,容易造成很难找到的Bug。 一个是EAGLLayer的大小,必须是32的倍数。否则用OpenGL画出来的东西,统统不会被显示。 Apple的文档:In iOS 4.2 and later, the performance of Core Animation rotations of renderbuffers have been significantly improved, and are now the preferred way to rotate content between landscape and portrait mode. For best performance, ensure the renderbuffer’s height and width are each a multiple of 32 pixels. Apple Document 另一个是纹理的大小,必须是2的次方。 也就是说,如果使用一张图片来生成纹理,那么图片的长和宽的长度都必须是2的次方,否则加载纹理失败。