April 23, 2010

Moving On (Day 1)

Last April 21, My girlfriend broke up with me. She replaced me for someone whom she knew for only one week. She said that they had mutual understanding between the two of them.She's been my girlfriend for 16 months. Last April 17 was our 16th monthsary. I thought it was just a perfect day for me. But i noticed she has changed a bit. She barely replied to my SMS and she won't allow me anymore to get her from her school. She even lied to me that she was already in their house just to avoid me. But they were together that night. Having fun while i was suffering and bothered with our relationship. I had to quit my job to have more time for her. But it was too late, they had fallen in love with each other. I can't control her. Even her friends don't know what to do. She fights back at them if they were asking her why she was doing it. I had a fever that day, but I went to her school even if its against her will. I was shaking that night. My hands were shaking and my eyes were about to get teary. I waited almost an hour. Standing in that cold night. Waiting for her to come out and to see her.
When he saw me that night, she was shocked and her mood goes bad. She stopped smiling.
She even barely look at me. She wouldn't allow me to get close to her.
I tried to ask why with a soft, low voice. She didn't give an answer. Instead, she was telling why I was there and violated what she said. I keep on asking her what she wants to eat to make her smile. But she didn't heard me. She kept on talking to her friend and said to me that she doesn't want anything.
I can't help but reminisce the past wherein every time I fetch her, she would want me to buy her favorite.
While we're about to cross the street, she hold my hand and I felt her love for me that night. I didn't know what to do. I want to hold her hand so tight to make her feel I love her so much but I don't want to hold her hand because I might fall into a trap. I mustered a lot of courage to hold her tight not thinking of what she might feel or say. But I hold her hand so tight and she kept on holding my hand. It took a bit of silence. As if our hands were talking, asking for another chance or saying I'm sorry.
We were able to hold our hands until we were on the jeepney. At that moment, I tried to be sweet to her. I embraced her so tight and I lay my head upon her shoulder. Just like a puppy who wants to feel the warmth of her mother. I caressed my head upon her shoulder while I hold her hand so tight. I didn't spoke a word.
Then, she said,"I want a space".
I asked, "Why?"
"I'm want my freedom back"
but why?
"I never asked too much from you".
She said,"Yes, but I feel like I'm not liking you anymore"
"I am happy when I am with him"
I tried so speak after hearing that,
"Aren't you happy right now that we're together?"
She said,"Not so, but he's different"
"What makes him different from me?"
She said,"I like him"
"But how about me?"
"I love you but I like him"

she continued..
"I want to try somebody else. You're too serious"
"I'll come back to you when I wanted to,Promise"
"I can't control my feelings for him, I tried to stop it"
"But I can't, I know you would understand me"

At that moment...
I remember what had happened before.
It's not the first time that she had done this to me.
It's been her second time that she committed herself to somebody else while we were still in love.
I know she mean it. She would come back to me because she was able to come back to me the first time that she had done it. And we were both okay back then after that first incident.
But my ideas of love came to collide with my heart.
Speaking to myself..
"I know she loves me"
"But does she really loves me"
"If she does why is she doing this to me again?"
"I warned her not to do it again"
"But she does it"

I know from the very start of our relationship that she's easily get attracted to somebody else.
I took the risk, hoping that she might change a bit.
But she didn't
She keeps on telling me that she loves me and I am the only person who could accept her. She knows what she's doing. But I just can't imagine how she was able to do it to me?

I tried to speak..
I was able to say..
"Until when will I wait for you to come back to me?"
She said,"maybe months or years.. I don't know. I will come back if I wanted to".
I tried to ask..
"Would it be possible to take at a maximum of two months?"
She said,"No"
I keep my mouth shut.
Then she pressed my hand and said, "Baby, I will definitely marry you"
"I'll be back for you. You 're the only one that I really love"
"You're my only boy that I would give my life to"
At that moment, I felt her love. Her true love for me.
I just listen to her and kept on caressing her shoulders with my head.

We arrived that their house.
I don't know what pushed me to hug her so tight.
She also hug me back.
Tears run down to my face and to her shoulders.
I keep on saying.
"Please don't leave me. Please come back to me"
But she never spoke a word.
I attempted to kneel in front of her. I don't know what pushed me to do it.
But she lift me up, saying, "Don't do it"
She kissed me on the lips
And I hold her arms as if I wouldn't let her go.
She kissed me again.
I said,"I love you baby".
She replied,"Okay"
Then I let her go.
She went to their house. Leaving me behind in the cold night without saying "I love you too".

February 20, 2010

Airline Reservation Prototype



Note:Seats marked x are already taken..

February 19, 2010

ACM ICPC contest problems


Typoon Ondoy

On September 26,2009, Typhoon Ondoy brought a month's worth of rainfall to Metro Manila
and nearby areas in just a few hours, causing severe flooding which resulted int eh loss
of many lives and the displacement of hundreds of thousands of people. Areas under
Storm Signal No.2 included:Aurora,Quirino,Nueva Vizcaya, Nueva Ecija,Pangasinan, Tralac,
Zambales,Pampanga, bulacan, Rizal,Northern Quezon, and Polillo Island.The Philippine Atmospheric Geophysical and Astronomical Services Administration (PAG-ASA)
has come up with a measure to classify typhoons based on wind speed (in kph):
Tropical depression have wind speeds of 30 to 46 kph (inclusive)
Tropical storms have wind speeds between 47 kph and 89 kph (inclusive)
Typhoons have wind speeds between 90 kph and 183 kph (inclusive)
Super Typhoons have wind speeds greater than 183 kph
Programmer Oliver
Decembe 10,2009

+++++++++++++++++++++++++++++++++++++++++
import java.util.*;
public class TyphoonOndoy
{
static Scanner console=new Scanner (System.in);
public static void main()
{
int windSpeed;
System.out.print("Enter Wind Speed (in kph)>>\t\n");
windSpeed=console.nextInt();
if (windSpeed>183)
System.out.print("It is a Super typhoon");
else if(windSpeed>90)
System.out.print("It is a Typhoon");
else if (windSpeed>47)
System.out.print("It is a Tropical Storm");
else if (windSpeed>30)
System.out.print("It is a Tropical Depression");
else
System.out.print("No classification for this wind speed");
}
}
Preview



/**
* This program will determine the Easter Sundays in a given year from 1900-2099.
*
* Programmer Oliver December 2,2009
*/
import java.util.*;
public class Eastern
{
static Scanner console=new Scanner(System.in);
public static void main ()
{
int year;
int a,b,c,d,e;
int date;
String MonthName;
System.out.println("Enter year");
year=console.nextInt();
a=year%19;
b=year%4;
c=year%7;
d=(19*a+24)%30;
e=(2*b+4*c+6*d+5)%7;
date=22+d+e;
if (date>31)
{
MonthName="April";
date=d+e-9;
if ((d+e+22)==57)
date=date-7;
}
else if (date==31)
{
MonthName="April";
}
else
MonthName="March";
System.out.printf("Easter Sunday is %s %2d,%3d\n",MonthName,date,year);
}
}

February 17, 2010

Java Tuts site for Beginners to become Experts!

from the source(creators of java)
  http://java.sun.com/docs/books/tutorial/
others:
http://home.cogeco.ca/~ve3ll/jatutor0.htm

But its better if you read books about java.
Authors like Gosling are the best!
Or don't hesitate to approach me through the net
or meet me in person so that i could simplify further what the sites or books are talking about. I love teaching because it also enhances my expertise in java programming

February 06, 2010

Decimal number to Roman Numeral Converter(Java program)

import java.util.*;
public class Roman_Numerals
{
static Scanner console=new Scanner(System.in);
public static void main()
{
int num;
int ctr;
int ones_place;
int tens_place;
int hundreds_place;
int thousands_place;
System.out.println("Enter your desired number (1-10,999)");
num=console.nextInt();
ones_place=num%10;
tens_place=num%100/10;
hundreds_place=num%1000/100;
thousands_place=num%10000/1000;
//thousand's place
if (num/10000==1)
System.out.print("XO");
else if (thousands_place==9)
System.out.print("MXO");
else if(thousands_place>5&&thousands_place<9)
{
System.out.print("XO");
for (ctr=0;ctr System.out.print("M");
}
else if (thousands_place==5)
System.out.print("VO");
else if (thousands_place==4)
System.out.print("IVO");
else if (thousands_place<4)
for (ctr=0;ctr System.out.print("M");

//hundred's place
if (hundreds_place==9)
System.out.print("CM");
else if(hundreds_place>5&&hundreds_place<9)
{
System.out.print("D");
for (ctr=0;ctr System.out.print("C");
}
else if (hundreds_place==5)
System.out.print("D");
else if (hundreds_place==4)
System.out.print("CD");
else if (hundreds_place<4)
for (ctr=0;ctr System.out.print("C");
//ten's place
if (tens_place==9)
System.out.print("XC");
else if(tens_place>5&&tens_place<9)
{
System.out.print("L");
for (ctr=0;ctr System.out.print("X");
}
else if (tens_place==5)
System.out.print("L");
else if (tens_place==4)
System.out.print("XL");
else if (tens_place<4)
for (ctr=0;ctr System.out.print("X");
//one's place
if (ones_place==9)
System.out.print("IX");
else if(ones_place>5&&ones_place<9)
{
System.out.print("V");
for (ctr=0;ctr System.out.print("I");
}
else if (ones_place==5)
System.out.print("V");
else if (ones_place==4)
System.out.print("IV");
else if (ones_place<4)
for (ctr=0;ctr System.out.print("I");


}

}

+Perfect Numbers+Java Program

/**
* Find the perfect numbers from 1 to 32767
*
* @author (Oliver Tamboboy)
* @version (November 8,2009)
*/
import javax.swing.*;
public class PerfectNumbers
{
public static void main (String[]args)
{
String outStr="The perfect numbers from 1-32767 are:";
int k=1,sum,k2;
JOptionPane.showMessageDialog(null,outStr,"Perfect Numbers",
JOptionPane.INFORMATION_MESSAGE);
do
{
k++;
sum=0;
for(k2=1;k2<=k/2;k2++)
{
if(k%k2==0)
sum=sum+k2;
}
if (sum==k)
JOptionPane.showMessageDialog(null,sum,"",JOptionPane.ERROR_MESSAGE);
}while(k<=32767);
}
}