Monday, December 7, 2009

First blog post using Windows Live Writer…

 

hehehehehe….

A java applet which calculates student grades....

Here is the source code for a java applet I have written that calculates any amount of student grades...The applet terminates and calculates the average when you enter -1 :


import javax.swing.*;
import java.awt.Graphics;
import java.text.DecimalFormat;

public class Average5Applet extends JApplet{

int counter = 0;
int total = 0;
int grade;

double average;





public void init()
{



String grades;

grades = JOptionPane.showInputDialog("Enter student grades as integers:");

grade = Integer.parseInt(grades);

while(grade != -1 )

{

counter = counter + 1;
total = total + grade;

grades = JOptionPane.showInputDialog("Enter student grades as integers:");

grade = Integer.parseInt(grades);

}

}

public void paint(Graphics g)
{

super.paint (g);

DecimalFormat twoDigits = new DecimalFormat("0.00");

if ( counter != 0 )

{

average = (double) total / counter;

g.drawString("The average is"+twoDigits.format(average),25,25);

}

else

g.drawString("No grades were entered!!!",25,25);

}

You need to Have JDK 1.6 to compile the applet...

Also you need to execute the applet, write a web page embedding the applet's compiled class file in it....

What is intelligence and spying?

What is intelligence and spying?

An early edition of Encyclopedia Britannica described intelligence as evaluated information of any kind...And that is the real definition...

Spying on the other hand is a related discipline of intelligence gathering ( information gathering ) by using covert or secret methods...

The basic slogan and rule of any intelligence agency is the "Need to know rule"...This means that those who need not know information about an operation or person doesn't need to be told or informed about it or the person...

I have read books and novels on intelligence...I also came across a treatise on intelligence when I was in Police in 1996...But I wasn't interested on the topic at that time...

I saved my life for myself because of what I learned through the years about intelligence...I had trained myself on cognitive investigation and evaluating of information which I gather from loose talk by my friends and absent minded discussion and comments they make...

There is one another important rule to be mentioned when it comes to spying: that is coincidence...There is no such thing in real life...

Human life appears in patterns but there is no coincidences...I don't believe nor will any spy believe on coincidence...

Well that's what I know about intelligence and spying...It is short because I am not a professional...I saved my skin from the treacherous scheming of some of my so called friends: Shumais and his family foremost and Mujey and Jumbey...

Really sick people...

That's it....

Sunday, November 22, 2009

C++ or Java?

C++ or Java...To none IT people this like mean a bit absurd...

But for software developers this would be familiar...The question to ponder is which language to choose...

If you are a systems developer ( that is you develop software like operating systems and drivers ) the choice is to use C++...But if you are a applications developer aiming to achieve a high degree of portability on all platforms the choice is Java...

Fact is performance...C++ performs better than Java but one should know that Java code runs comparably as compiled C++ code...

Those who are interested in developing database applications using Oracle should choose Java because Oracle natively supports Java...

But for those who don't need or aim to develop software for most platforms needs to develop in C++...

Java have limited low level capabilities but C++ through its inline assembler supports low level processor specific code to execute...

So the choice is yours...Both languages are heavily used by programmers...

Thursday, October 29, 2009

Yahoo Geocities closed...

Yahoo closed it's geocities services...

On 26 October 2009 it closed...

:(

Sunday, October 25, 2009

Windows 7 is released...

Microsoft released Windows 7 on the 22nd of this month October...

Windows 7 has several versions than its predecessor Windows Vista...

Some of my photographs taken in the year 2003!!!