While synchronizing two or more threads, care should be taken to ensure that they don’t create a deadlock situation. This happens when one thread wais for a second thread to pass control, but the second thread in turn waits for the first thread to pass control. When this happens, program execution will simply halt. This situation is called as deadlock. One way to avoid deadlock situation is by making one of the thread to release control for a short time, so that the other synchronized thread can access the common object.
Wednesday, December 24, 2008
Java
Java is an object oriented programming a language. As the name indicates, objects are the fundamental units of such programming languages. Every object has a state and behavior associated with it. The state of the object is the variables and constants associated with the objects. Behavior is the action that can be performed by the object. This behavior is represented in programs by sequence of statements that perform a specific task. They are also known as methods. So, objects consist of constants, variables and methods. At higher level, every object is created from a prototype called class.
Thursday, November 27, 2008
RGB color Mode
Based on the tristimulus theory of vision, our eyes perceive color through the stimulation of three visual pigments in the cones of the retina. These visual pigments have peak sensitivity at the wave length of about 630nm (red), 530nm (green) and 450nm (blue). By the comparing intensity in the light source; we perceive the color of the light. This is the base for displaying color output on a video monitor using three color primaries red, green and blue reference to as the RGB color model. The RGB color schema is an additive model i.e. intensities of the primary color are added to produce other colors. Each color points with I the bounds of the cube can be represented as the triple (R, G B) where values for R, G and B are assigned in the range from 0 to 1.shaeds of gray are represented along the main diagonal of the cube from the origin to the white vertex.