28. Strstr()

KMP Algorithm, Pre-compute and create the suffix equal to prefix table Next. Then if mismatch, run back the pointer of needle string according to the prefix table on the mismatch place. (e.g. misma...

PBR Based Specular Reflection

Demo: When a light hit on the surface of an object, it could be separate into three parts: a. Specular reflection; b. Diffuse reflection; c. Absorbed by the surface.  Specular and diffuse refl...

How to calculate ∫ 1 / sqrt (x ^ 2 + 1) dx

A friend who is preparing for her exam asked me such question. I thought it for quite a long time and finally I did it ! P.S. I think the point is using the sec ! t = √(u ^ 2  + 1) dx =...

12/9/2014 Dairy

A.

Ok, today I repaired some bugs of our project. I was so frustrated by a problem that if I want to import some bundles in the bundle list, it always only show...

How to root a Nexus device

I am developing an Android project by Nexus 7. However, when I wanted to see system folders I was rejected by "Permission denied" so I realized that I have to root it. First I tried some "One Key...