Monday, December 14, 2009

A Java applet that compares 3 integers…

Here is the source code of Java applet I have written which compares 3 integer numbers and outputs the biggest and the smallest number….I wont explain the code…

 

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

    public class ComparisionApplet extends JApplet{

           String result;
           String result1;

                   public void init()
                          {

                    int number1;
                    int number2;
                    int number3;

                    String numbera;
                    String numberb;
                    String numberc;

                    numbera = JOptionPane.showInputDialog("Enter first integer:");
                    numberb = JOptionPane.showInputDialog("Enter second integer:");
                    numberc = JOptionPane.showInputDialog("Enter third integer:");

                    number1 = Integer.parseInt(numbera);
                    number2 = Integer.parseInt(numberb);
                    number3 = Integer.parseInt(numberc);

                    if(number1 > number2)
                    if(number1 > number3)
                         {
                         result = number1 + " is the biggest number";
                     }

                    if(number2 > number1)
                    if(number2 > number3)
                       {

                         result = number2 + " is the biggest number";
                     }

                    if(number3 > number1)
                    if(number3 > number2)
                         {

                         result = number3 + " is the biggest number";
                      }

                    if(number1 < number2)
                    if(number1 < number3)
                       {

                        result1 = number1 + " is the smallest number";

                       }

                    if(number2 < number1)
                    if(number2 < number3)
                        {

                         result1 = number2 + " is the smallest number";
                         }

                    if(number3 < number1)
                    if(number3 < number2)
                     {

                       result1 = number3 + " is the smallest number";
                    }

        }

            public void paint(Graphics g)
                    {

               super.paint(g);

                    g.drawString(result,25,70);
                    g.drawString(result1,25,100);

                }

}

Sunday, December 13, 2009

Sad....Maldives loses to India on SAFF Championship 2009 on penalties....

Sad....Maldives loses to India on SAFF Championship 2009 on penalties...As always most of the time Maldives played well but Maldives is also the unluckiest team...

:(

Tuesday, December 8, 2009

My enemies on the internet….

Group A:

Ibrahim Thaufeeq, Aishath Wafeesha , Aishath Shazura, Azmath, Mohamed Shumais

Group B:

Zaan, Ismail Sodiq, and Bods ( real name unknown )

The identities of the friends I met in IRC, and in lockforum and Kk4rum….

“Don’t be shy boys, I come in peace”…sheesh

Well I went online first in early 2001 for a few days and later in March 2002…Since 2002 I have been using the internet regularly…I joined IRC in October 2002 and lockforum ( the first forum in Maldives ) around May 2003…I joined Kk4rum in September 21, 2003…Here is the list of my friends whom are hard won….I dare not reveal there private information too much…That would be abusive and offensive…But lets do it…

Dhumaari:

I met him in 1986 in grade 4 of Majeedhiyaa school…He was my class mate…His name is Shihab…He is both an IT guy and a finance guy…Very good humored…I remember his behaviour very clearly when we were in grade 4….Than he disappeared for a long time and again I met him in 2000…Than later in 2003 in Kk4rum where he was and administrator and senior supervisor….

Hot:

A brilliant software developer and the owner of Kk4rum…His name is Shuhood…I come across him a lot in Jalapeno Cafe’ near artificial beach….He was the senior administrator of Kk4rum but disappeared for years making posts….I chat him in msn during those days….

Stallone:

A guy around 29 and one of the junior members of lockforum…His name is Hassan Muneer and I became friends with him in 2005…He is good humored and I really miss him in MSN....

Chekkygal :

Susan, around my age…She is kind hearted and I saw her first in IRC than in lockforum in 2003…Now I am friends with her in facebook too and in MSN too…

Dot:

I dare not tell his name and divulge his personal information but I know him well now…

Codey:

One of the most active members of Kk4rum in its early days…His name is Azumee….I haven’t seen him since 2006.

RedDevils:

Again one of the brilliant and greatest member of Kk4rum in late 2003 to early 2004…His name is Hassan Rasheed…I admire him a lot and he is a great soccer fan…I am very fond of him...



---------------------------------------------------------------------------------

There are others whom I don’t know much…aE ( is Shaah ) in lock and faripary ( Latheef ) in Kk4rum…

Lets do more….Some people use the term “sheesh” when concluding a statement…This was due to me and I really claim it…My post in Sun Microsystems java forums brought that….Here is the link to that memorable post:

http://72.5.124.102/thread.jspa?threadID=479566&messageID=2232136#2232136

What good old friends….

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!!!