Wednesday, July 4, 2012

Scan Characters without echoing - C

Happy to see you again..!

Have you noticed in UNIX terminal.. ? The characters of password you are typing will be hidden, that is not even replaced with a dot or asterisk(*) else nothing will be displayed. So it's impossible to find the number of characters in the password. What we are

Tuesday, July 3, 2012

Random Numbers - DIE Example - C++ / GNU


A program that illustrates the Random Number Generation, with Rolling Dice.
It will run only on Unix environment.

Movement of Teapot - OpenGL

An openGL program to illustrate the movement of teapot:

#include <cstdlib>
#include <iostream> // C++ I/O
#include <cstdio> // C I/O (for sprintf)
#include <cmath> // standard definitions
#include <GL/glut.h> // GLUT
#include <GL/glu.h> // GLU
#include <GL/gl.h> // OpenGL

Destructor - Java

Java uses finalize() method for Garbage collection. 

Example:

import java.io.*;
public class FinalizeObject extends FileOutputStream