Currently browsing

December 13, 2012

Index and Sort Order

Index and Sort Order Introduction When we write the SQL Query we frequently use the ORDER BY clause to get the output in definite order (Ascending or descending). But ORDER BY clause has deep impacts in the performance of the query executions. In this article I am trying to discuss …

Array key lookup isset or arraykeyexists or

Array key lookup: isset() or array_key_exists() or @ ? pre { background-color:#444; white-space:pre-wrap; font-size:85%; padding:0px 6px; } Lessons learned: isset() is faster than array_key_exists() array_key_exists() is faster than @ @ is slower than ignoring notices with error_reporting() Here is the code running on a 1.4 GHz machine with PHP 5.4.0: …

Rendering Teapot glutSolidTeapot and glutWireTeapot using GLUT in C

Rendering Teapot glutSolidTeapot and glutWireTeapot using GLUT in C GLUT provides function glutSolidTeapot to render a Solid Torus and glutWireTeapot to render a Wire Frame Torus. glutSolidTeapot and glutWireTeapot render a solid or wireframe teapot respectively. Both surface normals and texture coordinates for the teapot are generated. The teapot is …