Acknowledgment

It took me so long to graduate in college and all the blame is on me. I believed that no matter what adversities you've faced, it always depends on how you accept and handle it.

When I was in my teen stage (16-20, maybe), I never thought about my future. I don't know, maybe I'm too lazy to think about it or I just don't care. Caraga State University (CarSU) is my third school, I am a dropout student in MSU, and again a dropout student in FSUU. I'm not proud of it, but I don't regret about my experiences on both school. Probably because, I gained a lot of friends. I received a lot of likes from them on Facebook, kidding aside. LOL

Anyway, this is a personal post so, it's all my opinion and this is not based on facts. It came from my head after eating lots of peanuts and drinking 6 glasses of soft drink.

In order to graduate from college you need this, shall I say it as "elements" or whatever maybe.

WILL!
Will, in philosophy, refers to a property of the mind, and an attribute of acts intentionally committed. Actions made according to a person's will are called “willing” or “voluntary” and sometimes pejoratively “willful” or “at will”. In general, "will" does not refer to one particular or most preferred desire but rather to the general capacity to have such desires and act decisively based on them, according to whatever criteria the willing agent applies.-Wikipedia
 And here's my own definition of WILL, my own explanation instead.

It's like a candle that should not falter. Now, as far as I know candle doesn't lasts forever.It melts! All we need to know is when to give up and when to fight. The question is, when is the time to give up? hahaha
You gave up when all of your resources where extremely used and you're already exhausted. What I mean with resources is your physical strength, knowledge, or anything you can give or use just to solve the problem and nothing happens. But that's me! Really, learn to let go of the those things! But I do believe in divine intervention!

Set your goal, it varies depending on the person's level of maturity. When I was 16, after graduating from high school, I don't know what should I take up in college. Until 20s hit me! (BTW,I'm a BSIT graduate) LOL



FRIENDS


Of course, you need friend! A friend who can offer you a sheet of paper during quiz. Who can lend you money. Who drank liquor. Who attends class regularly. Who gives you a ".pdf" file for study. Who trash talks. I'm lucky to have all of those! Because, they represents reality!


LUCK

They say, I don't know who they are, luck is part of being an intelligent person!

.....to be continued!

Simple Calculator in Java

Here's the screenshot below:
It can only perform one operation at a time.

import java.lang.*;
import java.awt.*;
import java.awt.event.*;
 
public class calculator extends 
 Frame implements ActionListener { 
        
    Button btn1 = new Button("1");
    Button btn2 = new Button("2");
    Button btn3 = new Button("3");
    Button plus = new Button("+");
    
    Button btn4 = new Button("4");
    Button btn5 = new Button("5");
    Button btn6 = new Button("6");
    Button minus = new Button("-");
    
    Button btn7 = new Button("7");
    Button btn8 = new Button("8");
    Button btn9 = new Button("9");
    Button times = new Button("*");
   
    Button btn_clr = new Button("C"); 
    Button btn0 = new Button("0");
    Button divide = new Button("/");
    Button ekwals = new Button("=");

    TextField txt = new TextField(20);

    
    String str_number = "";
    int operation = 0;
    double number1 = 0;
    double number2 = 0;
    double result = 0;
    String[] str = null;
    
    public calculator() {
          
        Panel base = new Panel();
        Panel NumberPanel = new Panel();
        
        base.setLayout(new BorderLayout());
        NumberPanel.setLayout(new GridLayout(4,4));
        
        NumberPanel.add(btn1);
        btn1.addActionListener(this);
        NumberPanel.add(btn2);
        btn2.addActionListener(this);
        NumberPanel.add(btn3);
        btn3.addActionListener(this);
        NumberPanel.add(plus);
        plus.addActionListener(this);
        NumberPanel.add(btn4);
        btn4.addActionListener(this);
        NumberPanel.add(btn5);
        btn5.addActionListener(this);
        NumberPanel.add(btn6);
        btn6.addActionListener(this);
        NumberPanel.add(minus);
        minus.addActionListener(this);
        NumberPanel.add(btn7);
        btn7.addActionListener(this);
        NumberPanel.add(btn8);
        btn8.addActionListener(this);
        NumberPanel.add(btn9);
        btn9.addActionListener(this);
        NumberPanel.add(times);
        times.addActionListener(this);
        NumberPanel.add(btn0);
        btn0.addActionListener(this);
        NumberPanel.add(btn_clr);
        btn_clr.addActionListener(this);
        NumberPanel.add(ekwals);
        ekwals.addActionListener(this);
        NumberPanel.add(divide);
        divide.addActionListener(this);    
        
        txt.setEditable(false);             
        txt.setBackground(Color.black);
        txt.setForeground(Color.green);
        base.add(NumberPanel,BorderLayout.CENTER);
        base.add(txt,BorderLayout.NORTH);
        add(base,BorderLayout.CENTER);        
    }
    
    public void actionPerformed(ActionEvent e) {
        
    if(e.getSource()==btn1) {
           txt.setText("1");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn2) {
           txt.setText("2");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn3) {
           txt.setText("3");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn4) {
           txt.setText("4");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn5) {
           txt.setText("5");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn6) {
           txt.setText("6");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn7) {
           txt.setText("7");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn8) {
           txt.setText("8");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn9) {
           txt.setText("9");
           str_number+=txt.getText();
           txt.setText(str_number); }
    else if(e.getSource()==btn0) {
           txt.setText("0");
           str_number+=txt.getText();
           txt.setText(str_number); }
     else if(e.getSource()==plus) {
            if(operation==0 & str_number!="") {
            number1=Integer.parseInt(str_number);
            txt.setText("+");
            str_number+=txt.getText();
            txt.setText(str_number);
            operation=1;
            }
            else {txt.setText(str_number);}
            }
     else if(e.getSource()==minus) {
         if(operation==0 & str_number!="") {
            number1=Integer.parseInt(str_number);
             txt.setText("-");
             str_number+=txt.getText();
             txt.setText(str_number);
             operation=2;
             }
             else { txt.setText(str_number); }
             }
     else if(e.getSource()==times) {
         if(operation==0 & str_number!="") {
            number1=Integer.parseInt(str_number);
             txt.setText("*");
             str_number+=txt.getText();
             txt.setText(str_number);
             operation=3;
             }
             else { txt.setText(str_number); }
             }
     else if(e.getSource()==divide) {
         if(operation==0 & str_number!="") {
            number1=Integer.parseInt(str_number);
             txt.setText("/");
             str_number+=txt.getText();
             txt.setText(str_number);
             operation=4;
             }
             else { txt.setText(str_number); }
             }
     else if(e.getSource()==ekwals) {
         if(operation!=0 & str_number!="") {
             txt.setText("=");
               str_number+=txt.getText();
               txt.setText(str_number);
     
     switch(operation) {
             case 1: {
   str = str_number.split("\\+");
                 number2=Integer.parseInt(str[1].replace("=",""));
                 result=number1+number2;
                 txt.setText(Double.toString(result));
                 break;
             }
             case 2: {
                 str = str_number.split("\\-");
                 number2=Integer.parseInt(str[1].replace("=",""));
                 result=number1-number2;
                 txt.setText(Double.toString(result));
                 break;
             }
             case 3: {
                 str = str_number.split("\\*");
                 number2=Integer.parseInt(str[1].replace("=",""));
                 result=number1*number2;
                 txt.setText(Double.toString(result));
                 break;
             }
             case 4: {     
                 str = str_number.split("\\/");
                 number2=Integer.parseInt(str[1].replace("=",""));
                 result=number1/number2;
                 txt.setText(Double.toString(result));
                 break;
             }
             }
             btn0.setEnabled(false);
             btn1.setEnabled(false);
             btn2.setEnabled(false);
             btn3.setEnabled(false);
             btn4.setEnabled(false);
             btn5.setEnabled(false);
             btn6.setEnabled(false);
             btn7.setEnabled(false);
             btn8.setEnabled(false);
             btn9.setEnabled(false);
             plus.setEnabled(false);
             minus.setEnabled(false);
             times.setEnabled(false);
             divide.setEnabled(false);
             ekwals.setEnabled(false);
         }
         else { txt.setText(""); }
     }
     else if(e.getSource()==btn_clr) {
         txt.setText("");
         str_number = "";
         operation = 0;
         number1 = 0;
         number2 = 0;
         result = 0;
        btn0.setEnabled(true);
        btn1.setEnabled(true);
        btn2.setEnabled(true);
        btn3.setEnabled(true);
        btn4.setEnabled(true);
        btn5.setEnabled(true);
        btn6.setEnabled(true);
        btn7.setEnabled(true);
        btn8.setEnabled(true);
        btn9.setEnabled(true);
        plus.setEnabled(true);
        minus.setEnabled(true);
        times.setEnabled(true);
        divide.setEnabled(true);
        ekwals.setEnabled(true);
     }
}
    
    public static void main(String[] args) {        
        calculator calc = new calculator();
        calc.setVisible(true);
        calc.setSize(200,200);
        calc.setResizable(false);
        calc.setTitle("Calculator");        
    }
}

If you have any question about the code, just comment below. :)

Show Search Results in a Pop-up Div

It uses MySQL as the database. Basically, the search results will pop up.

Here's the code below:

Can't get enough of Attack on Titans?

JAPAN!!!
Levi's driving it!! LOL

Load MySQL Data using JQuery


Of course, you won't be redirected to another page to see the result. That's the best thing about JQuery, although AJAX can also do it.

Anyway, here's the code snippet for the user's side..

<input id="datepicker" maxlength="20" type="text" />
<div id="refresh_img">Select Date to Load images..</div>

<script type="text/javascript">
$(document).ready(function(){
    $('#datepicker').change(function(){
    var variable= document.getElementById('datepicker').value;
    $('#refresh_img').load('query/getprojimg.php',{"variable": variable}).fadeIn("slow");
 });
});
</script>

And for the server side.

Love Of My Life

I got bored, t'was brownout and with just a candle on the table.

Here it goes...


I love sad songs, makes me think that I'm not the saddest person on Earth but the one who wrote it.

I love romantic movies, 'cause I may learn from it.

I love cute people, who doesn't?

I love shades of black. I'm neutral, just a little bit of anything, that's me.

I love writing, especially when I don't need to use my brain.

I love thinking right before I sleep.

I also love sleeping. The idea of closing our eyes and possibly travel anywhere is just great.

I love girls. Once, twice, thrice...is too much. I don't invest my feelings that much. It's like my defense mechanism.

I love talking, not in public but to the people who listens and responds.

and lastly You, whoever you are. hahahaha! :D

Simple Log-in/Logout and Registration with Session and Blowfish Encryption

This simple login and logout PHP script uses Blowfish Encryption for its password security here's the screenshot:
Database Name: dblogin