Friday Treat

SB-JC

SB JAVA CHIP, a treat from my team leader, Emy Lince.

“Thank God it’s Friday”, is what I usually tell myself when that day comes. But today, I don’t know why I am so fully affected with an event happened last night. So, I am not so thankful with whatever the day is right now. All I wanted to do is get the hell out of here.

I’m so glad that I decided to take a half-day off, to spend some time with my best friend somewhere we can conveniently have fun without too much expenditures at hand.

There had been a roller coaster of thoughts and emotions the past few days of my life, but I don’t think I deserve such an experience just for another pathetic reason/person. So, whatever.

If you are confused why is this Starbucks Frappe Java Chip even posted with this kind of article (or if it is even related), think again. Because it is really related! WHY??!

Because this morning, no matter how bad my wake up greeting was (at around 5:00 in the morning), it was not too late to make it a better day. Thank you to Emerald Requizo Lince, I was able to smile. It may be a shallow reason to be given that much appreciation to other people, I still ought to know and pay attention to the little things that many cannot see.

That’s how I see some things. I don’t care how much effort people give to make it a special day for someone or even for me; if it is not even coming from your heart, I will feel it and know that you just need something in return.

So, this is getting way too long. Once again! Thank you, Ma’am Emy and thank you, too, to Starbucks for making such a tasty drink for everyone.

Untitled 1.0

Ito na nga ang mahirap sa paghihiwalay.

Babalik ka sa Facebook photos mo, makikita mo pagmumukha niya. Eh di magdedelete, iisa-isahin. Eh paano naman kung yung larawan na ididelete mo ay isang alaala ng importanteng okasyon na wala kang ibang magawa kundi itago yung mga litratong iyon? Patay na, kasama pa siya sa album. Puwede ring i-crop, kaso yung kalahating pisngi mo, tanggal dahil nakadikit sa mukha niya.

Facebook pa lang yan, pano pa kaya kung parehong weblog ninyo, magkasama sa cyberspace? Sayang ang hits, sayang ang views. Pero kailangan tanggalin dahil ayaw mo nang magkabuntot ang landas ninyo kahit saan. At ayaw mo na ring makishare ng tag para lang mapataas ang kanyang hits. Sinusuwerte naman.

Titingin ka ng cell phone mo, susubukang pumindot. Hindi naman maintindihan kung bakit ka pindut nang pindot o sadyang nasanay ka lang nang may kausap sa telepono hanggang sa mapudpod ang daliri mo sa kakadial at kakatext. Magsasawa ka at titingin ka sa gallery, at ayun! Andun na naman. Sapul. Delete delete ka ulit. Magsasawa kang tumingin ng litrato at magbura ng mga alaala sa nakaraan, walang ibang magawa kundi mag-soundtrip na lang. Kaso, hindi mo na lang namamalayan, kinakanta mo na ang paborito ninyong liriko sa awiting madalas ninyong pakinggan.

Babalik ka ng bahay, kakausapin ka ng pamilya mo at kung anu-ano pa. Darating ang malalaking okasyon o panahon na hahanapin nila yung isang taong parati mong kasama. Magdadahilan ka na lang, “Ah. Eh. Busy eh.” Hanggang sa mainis ka na at umamin na tapos na kung ano man ang namamagitan sa inyong dalawa.

Ang mas mahirap, makikita ka ng mga kapamilya at kaibigan niya na naglalakad ka sa gitna ng pampublikong lugar at kukumustahin ka. Okay lang sana kung kukumustahin ka lang eh, ano pa kaya kung sabihing, “Kumusta na kayo ni [enter name here]? Bakit di kayo magkasama?”.

Ilan pa lamang yan. Ang hirap, ‘di ba? Ang hirap mawalan ng isang kaibigan.

BUSTED

There’s nothing better than a great deal of relaxation after a day of intoxication. NOT! :|

Data Structures in C

#include <stdio.h>

#include <conio.h>

#include <stdlib.h>

struct aaa{      char xxx;      int yyy;

}; struct aaa bbb, ccc, ddd, zzz[40]; typedef struct aaa *aaapointer;

int main(){

char f;    aaapointer data;     printf(“Enter char value “);

fflush(stdin);scanf(“%c”,&bbb.xxx);

printf(“char value accessed via bbb: %c\n”,bbb.xxx);

printf(“Enter char value “);

fflush(stdin);scanf(“%c”,&ccc.xxx);

printf(“char value accessed via ccc: %c\n”,ccc.xxx);

printf(“Enter char value “);

fflush(stdin);  scanf(“%c”,&ddd.xxx);

printf(“char value accessed via ddd: %c\n”,ddd.xxx);

printf(“Enter char value “);

fflush(stdin); scanf(“%c”,&zzz[0].xxx);

printf(“char value accessed via zzz[0]: %c\n”,zzz[0].xxx);

printf(“enter char value “);

data = (aaapointer) malloc (sizeof(char));

fflush(stdin);scanf(“%c”,&data -> xxx);

printf(“char value accessed via data -> xxx: %c\n”,data -> xxx);

printf(“char value accessed via bbb: %c\n”,bbb.xxx);

printf(“char value accessed via ccc: %c\n”,ccc.xxx);

printf(“char value accessed via ddd: %c\n”,ddd.xxx);

printf(“char value accessed via zzz[0]: %c\n”,zzz[0].xxx);

printf(“char value accessed via data -> xxx: %c\n”,data -> xxx);

getch();

}

 

 

 

JDBC, anyone?

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/**
*
* @author Informatics
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class itemInventory {
public static void main(String [] args){
myWindow window = new myWindow();
}
}

class myWindow extends JFrame implements ActionListener{
//1st row
JLabel lbl_itemName1 = new JLabel(“Item name”);
JTextField txtF_itemName1 = new JTextField(“”,5);
JButton btt_search = new JButton(“Search”);
// 2nd row
JLabel lbl_resultFeedback = new JLabel(“Result Feedback”);
JTextField txtF_fdback = new JTextField(“”,10);
//3rd row
JLabel lbl_dataResult = new JLabel(“Data Result”);
JLabel lbl_sep = new JLabel(“——————————————–“);
//4th row
JLabel lbl_itemName2 = new JLabel(“Item name”);
JTextField txtF_itemNameS = new JTextField(“”,10);
//5th row
JLabel lbl_price = new JLabel(” Price”);
JTextField txtF_price = new JTextField(“”,10);
//6th row
JLabel lbl_qty = new JLabel(“Qty. on hand”);
JTextField txtF_qty = new JTextField(“”,10);
//7th row
JLabel lbl_supName = new JLabel(“Supplier Name”);
JTextField txtF_supName = new JTextField(“”,10);
//8TH ROW
JButton btt_delete = new JButton(“Delete”);
JButton btt_clear = new JButton(“Clear”);

public myWindow(){

super(“Item Inventory”);
setSize(250,500);
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);

Container con = getContentPane();
FlowLayout fl = new FlowLayout(FlowLayout.LEADING);
con.setLayout(fl);

txtF_fdback.setEditable(false);
txtF_itemNameS.setEditable(false);
txtF_price.setEditable(false);
txtF_qty.setEditable(false);
txtF_supName.setEditable(false);

btt_search.addActionListener(this);
btt_delete.addActionListener(this);
btt_clear.addActionListener(this);

con.add(lbl_itemName1);
con.add(txtF_itemName1);
con.add(btt_search);
con.add(lbl_resultFeedback);
con.add(txtF_fdback);
con.add(lbl_dataResult);
con.add(lbl_sep);
con.add(lbl_itemName2);
con.add(txtF_itemNameS);
con.add(lbl_price);
con.add(txtF_price);
con.add(lbl_qty);
con.add(txtF_qty);
con.add(lbl_supName);
con.add(txtF_supName);
con.add(btt_delete);
con.add(btt_clear);

setContentPane(con);
}
public void actionPerformed(ActionEvent e){

Connection db;
Statement dataRequest = null;
ResultSet resultSet;

String dbPath = “C:\\Users\\Sarah\\Documents\\myDatabase.accdb”;
String connectDriverDb = “jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=”+dbPath;
String sqlStatement = “”;
String getItem = txtF_itemName1.getText();
int price;
int qty;
String supplier;
System.out.println(“method action”);

if(e.getSource() == btt_search){
try {
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
db = DriverManager.getConnection(connectDriverDb);

sqlStatement = “SELECT itemName, price, quantity, supplier, ID FROM sample WHERE itemName ='”+txtF_itemName1.getText()+”‘”;
dataRequest = db.createStatement();
resultSet = dataRequest.executeQuery(sqlStatement);
System.out.println(“search”);

if(!resultSet.next()){
txtF_fdback.setText(“Record not Found”);
System.out.println(“if”);
}

else{
txtF_fdback.setText(“Record found.”);
getItem = resultSet.getString(“itemName”);
price = resultSet.getInt(“price”);
String conPrice = Integer.toString(price);

qty = resultSet.getInt(“quantity”);
String conQty = Integer.toString(qty);

supplier = resultSet.getString(“supplier”);

txtF_itemNameS.setText(getItem);
txtF_price.setText(conPrice);
txtF_qty.setText(conQty);
txtF_supName.setText(supplier);
System.out.println(“else”);
}
dataRequest.close();
db.close();
}

catch(ClassNotFoundException ex1){
System.out.println(“Error!”+ex1.getMessage());
}

catch(SQLException ex2){
System.out.println(“Error!”+ex2.getMessage());
}
}
else if(e.getSource() == btt_delete){
try {
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
db = DriverManager.getConnection(connectDriverDb);

sqlStatement = “DELETE FROM sample WHERE itemName ='”+txtF_itemName1.getText()+”‘”;
dataRequest = db.createStatement();
int executeUpdate = dataRequest.executeUpdate(sqlStatement);

txtF_fdback.setText(“Record deleted.”);
txtF_itemName1.setText(“”);
txtF_itemNameS.setText(“”);
txtF_price.setText(“”);
txtF_qty.setText(“”);
txtF_supName.setText(“”);

dataRequest.close();
db.close();
}

catch(ClassNotFoundException ex1){
System.out.println(“Error!”+ex1.getMessage());
}

catch(SQLException ex2){
System.out.println(“Error!”+ex2.getMessage());
}
}

else if(e.getSource() == btt_clear){
txtF_fdback.setText(“Field cleared.”);
txtF_itemName1.setText(“”);
txtF_itemNameS.setText(“”);
txtF_price.setText(“”);
txtF_qty.setText(“”);
txtF_supName.setText(“”);
}

}

}

Saving Data from GUI to Text File

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;

public class mMP2{
public static void main(String [] args){
myFrame frame = new myFrame();
}
}

class myFrame extends JFrame implements ActionListener, ItemListener{
//Text fields
JLabel lbl_name = new JLabel(“Name”);
JTextField txtF_name = new JTextField(“”,18);
JLabel lbl_age = new JLabel(“Age “);
JTextField txtF_age = new JTextField(“”,3);

//Label: Separator
JLabel lbl_separator = new JLabel(“______________________________________________”);

//Radio Buttons: gender
JLabel lbl_gender = new JLabel(“Gender”);
ButtonGroup grp_gen = new ButtonGroup();
JRadioButton rdB_male = new JRadioButton(“Male”);
JRadioButton rdB_female = new JRadioButton(“Female”);

//Interests
JLabel lbl_separator2 = new JLabel(“______________________________________________”);
JLabel lbl_interests = new JLabel(“Interests”);
JCheckBox chB_theatre = new JCheckBox(“Theatre”);
JCheckBox chB_dance = new JCheckBox(“Dance”);
JCheckBox chB_IT = new JCheckBox(“IT”);
JCheckBox chB_music = new JCheckBox(“Music “);

//Course
JLabel lbl_course = new JLabel(“Course”);
JComboBox cb_course = new JComboBox();

//Save or reset
JButton btt_save = new JButton(“Save”);
JButton btt_reset = new JButton(“Reset”);
JLabel lbl_separator1 = new JLabel(“______________________________________________”);

//global variables
String name = null;
int age;
String gender = null , interest = null, course = null;

public myFrame(){
super(“Student Record”);
setVisible(true);
setResizable(false);
setSize(275,500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

Container con = getContentPane();
FlowLayout layout = new FlowLayout(FlowLayout.LEFT);
setLayout(layout);

grp_gen.add(rdB_male);
grp_gen.add(rdB_female);

cb_course.addItem(“BSIT”);
cb_course.addItem(“BSCS”);
cb_course.addItem(“BSBA”);

//add action listeners
btt_save.addActionListener(this);
btt_reset.addActionListener(this);
cb_course.addItemListener(this);
rdB_male.addItemListener(this);
rdB_female.addItemListener(this);
chB_theatre.addItemListener(this);
chB_dance.addItemListener(this);
chB_IT.addItemListener(this);
chB_music.addItemListener(this);

con.add(lbl_name);
con.add(txtF_name);
con.add(lbl_age);
con.add(txtF_age);
con.add(lbl_separator);
con.add(lbl_gender);
con.add(rdB_male);
con.add(rdB_female);
con.add(lbl_separator2);
con.add(btt_save);
con.add(lbl_interests);
con.add(chB_theatre);
con.add(chB_dance);
con.add(chB_IT);
con.add(chB_music);
con.add(lbl_course);
con.add(cb_course);
con.add(lbl_separator1);
con.add(btt_save);
con.add(btt_reset);

setContentPane(con);

}

public void actionPerformed(ActionEvent event){

if(event.getSource() == btt_save){
try{
name = txtF_name.getText();
String stringAge = txtF_age.getText();
age = Integer.parseInt(stringAge);

printerFile(name, age);
saveFrame save = new saveFrame();
}

catch(Exception e){
errorFrame save = new errorFrame();
}

txtF_name.setText(“”);
txtF_age.setText(“”);

rdB_male.setSelected(false);
rdB_female.setSelected(false);

chB_theatre.setSelected(false);
chB_IT.setSelected(false);
chB_dance.setSelected(false);
chB_music.setSelected(false);
cb_course.setSelectedIndex(0);

}//end of if

else if(event.getSource() == btt_reset){
txtF_name.setText(“”);
txtF_age.setText(“”);

rdB_male.setSelected(false);
rdB_female.setSelected(false);

chB_theatre.setSelected(false);
chB_IT.setSelected(false);
chB_dance.setSelected(false);
chB_music.setSelected(false);
cb_course.setSelectedIndex(0);
}

}//end of method

public void itemStateChanged(ItemEvent eventI){
int state = eventI.getStateChange();
if(state == ItemEvent.SELECTED){

if(eventI.getSource() == rdB_male){
gender = “Male”;

}//if

else if(eventI.getSource() == rdB_female){
gender = “Female”;

}//else if

else if(eventI.getSource() ==cb_course){
String selectCourse = eventI.getItem().toString();
course = selectCourse;
}//else if

else if(eventI.getSource() == chB_theatre){
interest = “Theatre”;

}//else if

else if(eventI.getSource() == chB_dance){
interest = “Dance”;

}//else if

else if(eventI.getSource() == chB_IT){
interest = “IT”;

}//else if

else if(eventI.getSource() == chB_music){
interest = “Music”;

}//else if
}//if

else if(state == ItemEvent.DESELECTED){

}// end of ELSE if

}//end of method

public void printerFile(String name, int age){
String newName = name;
int newAge = age;
try{
FileOutputStream output = new FileOutputStream(“Student Record.txt”, true);
PrintStream printer = new PrintStream (output);

printer.println(“”);
printer.println(“——————————-“);
printer.println(“Name: “+newName);
printer.println(“Age: “+newAge);

printerFile1(gender, interest, course);

printer.close();

}
catch(Exception e){
errorFrame error = new errorFrame();
}

}

public void printerFile1(String gender, String interest, String course){
String newCourse = course;
String newGender = gender;
String newInterest = interest;
try{
FileOutputStream output = new FileOutputStream(“Student Record.txt”, true);
PrintStream printer = new PrintStream (output);

printer.println(“Course: “+newCourse);
printer.println(“Gender: “+newGender);
printer.println(“Interests: “+newInterest);
}
catch(Exception e){
errorFrame error = new errorFrame();
}

}

class saveFrame extends JFrame implements ActionListener{
JButton btt_close = new JButton(“Close”);
JLabel lbl_saved = new JLabel(“Record saved!”);
public saveFrame(){
super(“Saved”);
setVisible(true);
setResizable(false);
setSize(275,100);
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

Container con1 = getContentPane();
FlowLayout layout1 = new FlowLayout(FlowLayout.CENTER);
setLayout(layout1);

btt_close.addActionListener(this);

con1.add(btt_close);
con1.add(lbl_saved);

setContentPane(con1);
}

public void actionPerformed(ActionEvent event1){
if(event1.getSource() == btt_close){
dispose();
}
}
}

class errorFrame extends JFrame implements ActionListener{
JButton btt_close = new JButton(“Close”);
JLabel lbl_error = new JLabel(“Error saving record!”);
public errorFrame(){
super(“Error”);
setVisible(true);
setResizable(false);
setSize(275,100);
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

Container con2 = getContentPane();
FlowLayout layout2 = new FlowLayout(FlowLayout.CENTER);
setLayout(layout2);

btt_close.addActionListener(this);

con2.add(btt_close);
con2.add(lbl_error);

setContentPane(con2);
}

public void actionPerformed(ActionEvent event2){
if(event2.getSource() == btt_close){
dispose();
}
}
}
}

Opening Another Window in a Java Program

import java.awt.*;

import javax.swing.*;

import java.awt.event.*;
public class mMP1{

public static void main(String [] args){

mpWindow mpWin = new mpWindow();

}

}
class mpWindow extends JFrame implements ActionListener{

JButton btt_open = new JButton(“Open new window”);

newWindow

Window 1 and Window 2

JButton btt_exit = new JButton(“Exit”);

JPanel newWindow = new JPanel();

public mpWindow(){

super(“MP1″);

setSize(300,150);

setVisible(true);

setResizable(false);

setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

Container con = getContentPane();

FlowLayout fl = new FlowLayout(FlowLayout.CENTER);

setLayout(fl);

btt_open.addActionListener(this);

btt_exit.addActionListener(this);

con.add(btt_open);

con.add(btt_exit);

setContentPane(con);
}

public void actionPerformed(ActionEvent event){

if(event.getSource() == btt_open){

newWin win = new newWin();

}

else if(event.getSource() == btt_exit){

System.exit(0);

}

}

}

class newWin extends JFrame implements ActionListener{

JButton btt_hide = new JButton (“Hide window”);

public newWin(){

super(“Window 2″);

setVisible(true);

setSize(300,150);

setResizable(false);

setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

Container con1 = getContentPane();

FlowLayout fl1 = new FlowLayout(FlowLayout.CENTER);

setLayout(fl1);

btt_hide.addActionListener(this);

con1.add(btt_hide);

setContentPane(con1);
}

public void actionPerformed(ActionEvent event1){

if(event1.getSource() == btt_hide){

dispose();

}

}

}

Case 39 Trailer and Music by Evanescence

CASE 39

Image by Galactinet Prensa via Flickr

I watched the movie through HBO channel at home. Case 39 was kind of related to silent hill but the data from wikipedia and some articles given by Mr. Google said otherwise. Renee Zellweger, played the role as Emily, is the main character of the story along with the antagonist, Jodelle Ferland as Lilith Sullivan, a ten year old girl. The parents of Lilith was deprived of her devilish character as a child to the extent of killing her. The parents knew she is a devil in disguise. The girl uses her power to sense decency on people and their fear: using it against them by creating illusion when feeling afraid. Emily, however, is a social worker who helps families having problems with their children. Emily thought the girl was being abused so she took the responsibility of the child in custody temporarily. From that day on, she suffered from the illusions created by the child, along with her co-workers and the classmates themselves of the girl initially.

I really am curious whether this movie is related to Silent Hill. Is this the back story or what?

Japan Tsunami 2011: Destroyed Sendai

Japan Tsunami 2011

3 tier Architecture

3-tier architecture

3-tier architecture is a structure of interconnected applications in such that the first tier is the user interface and application logic in which the data is served to the clients the middle tier as the business’ information provider to

 

For example, a student would like to know the schedule and the available subjects for the term. The student would navigate through the internet browser and go to the particular school’s website. The user interface that lays the information to the student is the first tier; the application that serves as the platform of laying the information for the student is the middle tier which gets the data from the third tier, the database.

 

Ika’y inakala kong akala ko…

Mag-aalas dose na ng madaling araw habang isinusulat ko ito. Hindi ko akalaing ang taong naging dahilan ng pakikipaglaban ko ang makakasakit sa akin ng sobra. Mahal ko siya. Ganoon din naman siya. Hindi ko lang matanggap na kakarampot lamang na problema ay lalaki pa. Pribado. Tama…pribado nga kasi siya. Hindi kailanman kayang ibahagi ang parte ng kanyang buhay. Tunay ngang naipakita at naparamdam ang kanyang pagkatao. Ngunit aking napagtanto sa araw na ito na ang buhay niya’y para lamang anino.

Habulin ko ma’y ito rin ay maglalaho. Akala ko pa man din tayo’y pinagtagpo at iisa ang lukso. “Hindi ko pa kayang ibigay ngunit, kunin mo.” Oo, tama…isa ngang anino. Maaari lamang maaninagan pero hindi mapapasaiyo.

Hindi ko kasalanan. Pero patawad na ako’y pinatakan ng luhang dulot na para bang pagbabalat-kayo; o di kaya nama’y pagtatago. Akala ko’y tayo ay iisa-walang ikukubli sa utak ng bawat isa pero sa puso lamang ititira. ‘Yun pala ay akin lamang pala ang natatala sa pusong napag-isa. Ano man lamang ba na malaman ang iyong mahiwagang kontrasenyas na iyong sinusulat sa tuwi-tuwina? Buti pa siya, hindi mo napagkakaitan.

Nasaktan, sumama ang loob, at nalungkot. Hindi ko alam na dito pala aabot. Sinabi mo na parang nga naman na ika’y nakapagdamot. Sa tingin ko’y hindi. Una. Pangalawa. Nang maalala ko ang mga nagawa kong pagbabahagi sa iyo, hindi pera ngunit pagkatao’t kuwentong buhay at araw-araw ko, parang nawalan ako ng ganang anu’t-ano pa at ginagawa ko ito? Sabihin mo kuwaderno, ano ba ang kulang ko? Siya nga talaga’y ganoon at ‘di magbabago … hindi nararapat … hindi ko gugustuhin.

Naghahanap ako ng tao na kayang intindihin ako, hindi ‘yung parang may gustong itago. Kay sama ng loob ko. Sana’y hindi ko nalaman at idinagdag pa sa pagkatuto. Siguro pa nga’y hindi lalalim ito.

Patawad sa iyo. Kung anuman ang kailangan mo, gagawin ko. Sana mapagbigyan pa… sana mawala na ang sakit na nadarama. Hayaan mo, ‘di na ‘ko magkukuwento pa. Para hindi ka makaramdam ng pagdaramot…

Itutuloy ko pa rin ang plano ko. Ayokong sinasaktan ng ganoon na lamang ang mahal ko kuwaderno. Pero sana’y maging leksyon ito sa aming tatlo.

Call him ‘STUPID’

Yesterday, I received a very stressful and annoying message from a stupid friend through facebook. I was so pissed and thought about a few things. I know hacking is very dangerous and illegal. But to consider everything that person told me and my boyfriend, Mr. Stupid shall have to receive his payment.

He should’ve thought about not sending a message to me; since it’s funny for him, I shall have to make sure he won’t be able to laugh once I get my hands on him. Let’s see if he’ll even try to browse the internet.

I was so silent but you gave noise. Let’s make noise a beautiful one for you.

Java: Labels et. al

import java.io.*;

import java.awt.*;

import java.awt.Color;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.*;
public class trial1{ public static void main(String [] args)throws IOException{
rcWindow rc = new rcWindow(); }

}
class rcWindow extends JFrame implements ActionListener{

JLabel userName = new JLabel(“User name “);

JTextField uName = new JTextField(“”,15);

JLabel pWord = new JLabel (“Password  “);

JTextField passW = new JTextField(“”,10);

JButton log_in = new JButton(“Log in”);

JButton cancel = new JButton(“Cancel”);

String username = “”; String pass = “”;

public rcWindow()throws IOException{

super(“Red Cross User Log-in”);

setSize(300,200);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setResizable(false); setVisible(true);
Container c = new Container();

c = getContentPane();

FlowLayout fl = new FlowLayout(FlowLayout.LEFT);

c.setLayout(fl);

c.setBackground (Color.PINK);

uName.setEditable(true);

passW.setEditable(true);

c.add(userName);

c.add(uName);

c.add(pWord);

c.add(passW);

c.add(log_in);

c.add(cancel);
setContentPane(c);

}
public void actionPerformed(ActionEvent e){

/*if(e.getSource() == uName){

if(uName.getText() == “”){

JOptionPane j = new JOptionPane();

j.showMessageDialog(null,”Error Message”,”No Username”,JOptionPane.ERROR_MESSAGE);

}

else{

username = uName.getText();

}

}

else if(e.getSource() == passW){

if(passW.getText() == “”){

JOptionPane j = new JOptionPane();

j.showMessageDialog(null,”Error Message”,”No Username”,JOptionPane.ERROR_MESSAGE);

}

else{ pass = passW.getText();

}

}*/

if(e.getSource() ==log_in){

if(uName.getText() == “” && passW.getText() == “”){                           JOptionPane.showMessageDialog(new JFrame(),”Error Message”,”Error logging in”,JOptionPane.ERROR_MESSAGE);

}

else{

username = uName.getText();

pass = passW.getText();

}

}

else if(e.getSource() == cancel){

uName.setText(“”);

passW.setText(“”);

}

}

public void record(String uname, String pword)throws IOException{

username = uname;

pass = pword;

String path = “C:\\java\\testBase.txt”;

FileOutputStream writer = new FileOutputStream(path);

PrintStream toPrint = new PrintStream(writer);

try{

toPrint.print(uname);

toPrint.print(pword);

toPrint.close();

catch (Exception ex) {

System.err.println (“Error writing to file”);

}
}

}

}

//Not finished yet. I still have problems in getting the data from the text field and transferring it to the text file. And another thing about the error prompt.

Bram Stoker’s Dracula

Count Dracula
Count Dracula

Dracula: Gary Oldman

Dracula, a book written by Bram Stoker, features Gary Oldman as the count himself. It was the first book I had as a teenager. If I could still remember, I ought to save coins everyday from my allowance just to buy it. I read it for a week in the summer of 2004.

Remembering the past, everything written on the book was difficult for me to understand: having little vocab. I would scratch my head and even touch my forehead from time to time thinking what the writer wants to say. Yet, it helped me learn more words; and to tell the truth, I could say it was romantic though eccentric and supernatural.

Disappointment was very cruel to me, it came after a month or so. The book gave me a heads-up to the English literature and inspiration to know more of the words…then a tragedy came and my aunt burnt my book. She’s very religious and things like these are demons to her eyes. It made me so sad. I should’ve not let my book scatter around their house. It could have been the first book in my collection. SHOULD HAVE BEEN.

So, what’s the significance of Gary Oldman here on my post? I didn’t put him right there just to feature this article. Gary Oldman is there because I simply adore him. He carried the right personality for a Count Dracula in the movie. Keanu Reeves was being set-aside then. Well, that’s the objective, right?

If there was really a Count Dracula in Transylvania this good-looking, it would be great if someday I would see him. I miss my book! For anyone who would like to grab a pdf copy of the book, click here. I have seen one over the website manybooks.net.

A Best Friend Valentine Date

DSC_0728

And so I was a little tipsy when we got home after a few hours of drinking beer and poof! Even though I laughed and laughed with my best friend all the time, I still can’t take my mind off a one single person. I do not understand why.

Maybe he’s just so numb, that if I punch him in the face, he wouldn’t react. But that would be impossible, because I don’t know where he is and we don’t usually talk anymore. I don’t know what’s happening…to the extent of I don’t know why I am feeling this way.

Anyway, enough with the emotions and stuff, I have got a story to tell. That beer on the picture above is said to be a ONE MUG of Pale Pilsen. I, and my best friend, Johanna Kris dela Cruz, A.K.A “Joan”, met at Alabang Town Center. We, as friends, are supposed to be dating our own separate dates last Valentine’s day. But then again, since Joan’s boyfriend is too busy for his school events and other things related, they weren’t able to. And of course, I, as a single and having no one to date with, I invited her instead.

Well, let’s just go back a week before Valentine’s first, alright? On a Friday until Saturday, I felt so depressed and down. Hence, I decided to take a half day off the next Friday. But the question remained in my mind: who will go with me?

The next day, a Sunday, I was thinking if I should invite my best friend. I don’t know if she’ll be available at that time, because I know she’s busy and all at home. I wanted to invite a guy whom I was exchanging text messages at that time, but I feel so shy. It feels like I am so desperate to have a date on Valentine’s day.

So, what the hell, I asked them both. The more, the merrier. But the thing is, they still don’t know if they’ll be free on that day. Oh well, what can I do? I don’t have anything else to do but to spend the whole day with myself and explore such places I don’t know or practice what I wanted to learn: photography, the basics, at least.

Days passed – drawing nearer to that certain day I am looking forward to, and I was expecting ‘someone‘ to be with that day. I wanted to meet him, at last! But to misfortune, he didn’t show interest, at all. I feel like dirt being smudged to the filthy rough ground.

But at least, my best friend showed me that friends are more than enough to spend the day off.

Shoes

That day, I realized, no matter what you do, you cannot force anyone to be with you. But a true friend will always be there no matter what. Yet, when I got home, I still don’t understand why I should feel sad for that expectation. Maybe I was just really looking forward to it. I hope a day will still come, because I have waited too long to meet that person. To be particular, I have waited since first grade.

At San Mig Pub and Restaurant, it felt so oozing and relaxing once you got inside. Joan even reacted like a dumb-founded kid who first entered Enchanted Kingdom. In the entrance, there are couches and tables, farther to the end of the Pub, there’s a bar where we both seated during our drinking session. Most of the people inside are probably, maybe a little, socialite. I remember that there were three Americans talking to each other while sitting at the bar just in front of us. Here’s a sneak peak of the bar itself:

San Mig Pub's Bar

That’s it. I hope you enjoyed reading. Have a great day ahead!