Wednesday, December 11, 2013

Arrow S2|E8


 Download  Arrow S2|E8


Nelson Mandela



The day 12.05.2013 the end of great leader, politician, and great human.
Name – Rolihlahla Mandela (He also called as Tata)
Birth day – 18 July 1918
Political party – ANC (African national congress)


In his life he faced to many challenges. He is fight against white leaderships to get freedom to black peoples in South Africa. In other word he is a antiapartheid leader in South Africa.I can write that incidents in Mandela’s word. From his life reveal Mandela’s humanity at its intense. It shows the human being in him. He is a son denied access to his mother at her dead bed and a father deprived of attending his son’s funeral.
Some of sensitive situations in Mandela’s life in his words is below. These things happen in dark years of his life (it means at 27 years in the imprisonment.)

Time may seem to stand still for those of us in prison. But it did not halt for those outside. I was remained of this when I was visited by my mother in spring 1968. I had not seen her since the end of the rivonia trial. Change is gradual & incremental. And when one lives in the midst of one’s family, one rarely notices differences in them. But when one rarely notices differences in them. But when one doesn’t see one’s family for many years at a time, the transformation can be striking. My mother suddenly seemed very old.

Several weeks later, after turning from quarry, I was told to go to head office to collect a telegram. It was from makgatho, informing me that my mother had died of a heart attack. I immediately made a request to the commanding officer to be permitted to attend her funeral in the Transkei, which he turned down. “Mandela,” he said, “while I know you are aman of your word and would not try to escape, I cannot trust your own people, and we fear that they would try to kidnap you.” It added to my grief that I was not able to bury my mother, which was my responsibility as her eldest child and only son.

A mother’s death causes a man to look back on and evaluate his own life. Her difficulties, her poverty, made me question once again whether I had taken the right path.
During this time I experienced another grievous loss. One cold morning in July 1969, three months after I learned of Winnie’s incarceration, I was called Robben Island and handed over a telegram. It was from my youngest son, makgatho, and only a sentence long. He informed me that his elder brother, my first and oldest son, Mabida Thembekile, whom called thembi, had been killed in a motor accident in Transkei. Thembi was then 25, and the father of two small children.

I turned to my cell and lay on my bed. I do not know how long I stayed there, but I didn’t emerge for dinner. Finally, Walter came to me and knelt beside my bed, and I handed him the telegram. He said nothing, but only held my hand. I do not know how long he remained with me. There is nothing that one man say to another at such a time.
I asked permission the authorities for permission to attend my son’s funeral. As a father, it is my responsibility to make sure that my son’s spirit would rest peacefully.
I thought back to one afternoon when thembi was a boy and he came to visit me at a safe house in cyrildene that I used for secret ANC work. Between my underground political work and legal cases, I had not been able to see him for some time. I surprised him at home and found him wearing an old jacket of mine that came to his knees. He must have taken some comfort and pride in wearing his father’s clothing, just as I once did with my own father’s. When I had to say goodbye again. He stood up tall, as if he were already grown, and said, “I shall look after the family while you are gone.”

These things help to show his humanity and show his great leadership.

You can enjoy with another article soon…..

Guest Writer  - S.S

Monday, December 9, 2013

Java Calculator


This is a sample code for simple java calculator.If you hava any questions commect bellow . happy cording.


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

class calculator extends JFrame implements ActionListener {
   
    private static final long serialVersionUID = 1L;
   
    JButton btn1 = new JButton("1");
    JButton btn2 = new JButton("2");
    JButton btn3 = new JButton("3");
    JButton btn_arti = new JButton("+");
   
    JButton btn4 = new JButton("4");
    JButton btn5 = new JButton("5");
    JButton btn6 = new JButton("6");
    JButton btn_eksi = new JButton("-");
   
    JButton btn7 = new JButton("7");
    JButton btn8 = new JButton("8");
    JButton btn9 = new JButton("9");
    JButton btn_carpi = new JButton("*");
   
    JButton btn0 = new JButton("0");
    JButton btn_clr = new JButton("CLR");
    JButton btn_del = new JButton("DEL");
    JButton btn_bolu = new JButton("/");
    JButton btn_esit = new JButton("=");

    TextField txt=new TextField(15);
   
    String str_number = "";
    int operation = 0;
    double int_number1 = 0;
    double int_number2 = 0;
    double result = 0;
   
    public calculator() {
       
        JFrame frame = new JFrame("CALCULATOR");
        frame.setSize(320,320);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setResizable(false);
        frame.setVisible(true);
       
        frame.setLayout(new BorderLayout());
       
        JPanel HeadPanel = new JPanel();
        JPanel NumberPanel = new JPanel();
        JPanel LabelPanel = new JPanel();
       
        LabelPanel.setBackground(Color.BLACK);
        HeadPanel.setBackground(Color.BLUE);
       
        NumberPanel.setLayout(new GridLayout(4,4));
        LabelPanel.setLayout(new FlowLayout());
       
        NumberPanel.add(btn1);
        btn1.addActionListener(this);
        NumberPanel.add(btn2);
        btn2.addActionListener(this);
        NumberPanel.add(btn3);
        btn3.addActionListener(this);
        NumberPanel.add(btn_arti);
        btn_arti.addActionListener(this);
       
        NumberPanel.add(btn4);
        btn4.addActionListener(this);
        NumberPanel.add(btn5);
        btn5.addActionListener(this);
        NumberPanel.add(btn6);
        btn6.addActionListener(this);
        NumberPanel.add(btn_eksi);
        btn_eksi.addActionListener(this);
       
        NumberPanel.add(btn7);
        btn7.addActionListener(this);
        NumberPanel.add(btn8);
        btn8.addActionListener(this);
        NumberPanel.add(btn9);
        btn9.addActionListener(this);
        NumberPanel.add(btn_carpi);
        btn_carpi.addActionListener(this);
       
        NumberPanel.add(btn0);
        btn0.addActionListener(this);
        NumberPanel.add(btn_clr);
        btn_clr.addActionListener(this);
        NumberPanel.add(btn_del);
        btn_del.addActionListener(this);
        NumberPanel.add(btn_bolu);
        btn_bolu.addActionListener(this);
       
        LabelPanel.add(new JLabel("NUMBER : "));
        LabelPanel.add(txt);
        LabelPanel.add(btn_esit);
        btn_esit.addActionListener(this);
       
        txt.setEditable(false);
        btn_del.setEnabled(false);
             
        HeadPanel.add(new JLabel("^^ SIMPLE JAVA CALCULATOR ^^"));
        frame.add(HeadPanel,BorderLayout.NORTH);
        frame.add(NumberPanel,BorderLayout.CENTER);
        frame.add(LabelPanel,BorderLayout.SOUTH);
       
    }
   
    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()==btn_arti) {
            if(operation==0 & str_number!="") {
            int_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()==btn_eksi) {
         if(operation==0 & str_number!="") {
            int_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()==btn_carpi) {
         if(operation==0 & str_number!="") {
            int_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()==btn_bolu) {
         if(operation==0 & str_number!="") {
            int_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()==btn_esit) {
         if(operation!=0 & str_number!="") {
             txt.setText("=");
               str_number+=txt.getText();
               txt.setText(str_number);
             switch(operation) {
             case 1: {
                    String[] kelime = null;
                    kelime = str_number.split("\\+");
                    int_number2=Integer.parseInt(kelime[1].replace("=",""));
                 result=int_number1+int_number2;
                 txt.setText(str_number+Double.toString(result));
                 break;
             }
             case 2: {
                    String[] kelime = null;
                    kelime = str_number.split("\\-");
                    int_number2=Integer.parseInt(kelime[1].replace("=",""));
                 result=int_number1-int_number2;
                 txt.setText(str_number+Double.toString(result));
                 break;
             }
             case 3: {
                    String[] kelime = null;
                    kelime = str_number.split("\\*");
                    int_number2=Integer.parseInt(kelime[1].replace("=",""));
                 result=int_number1*int_number2;
                 txt.setText(str_number+Double.toString(result));
                 break;
             }
             case 4: {
                    String[] kelime = null;
                    kelime = str_number.split("\\/");
                    int_number2=Integer.parseInt(kelime[1].replace("=",""));
                 result=int_number1/int_number2;
                 txt.setText(str_number+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);
             btn_arti.setEnabled(false);
             btn_eksi.setEnabled(false);
             btn_carpi.setEnabled(false);
             btn_bolu.setEnabled(false);
             btn_esit.setEnabled(false);
         }
         else { txt.setText("ERROR"); }
     }
     else if(e.getSource()==btn_clr) {
         txt.setText("");
         str_number = "";
         operation = 0;
         int_number1 = 0;
         int_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);
        btn_arti.setEnabled(true);
        btn_eksi.setEnabled(true);
        btn_carpi.setEnabled(true);
        btn_bolu.setEnabled(true);
        btn_esit.setEnabled(true);
     }
     //else if(e.getSource()==btn_del) {
     //}
}
   
    public static void main(String[] args) {
       
        new calculator();
       
    }

}

Java Program for client-server chat


client code ..



import java.net.*;
import java.io.*;

public class Client {

public static void main(String[] ar) {

 int serverPort = 6666; // make sure you give the port number on which the server is listening.
 String address = "127.0.0.1"; // this is the IP address of the server program's computer. // the address given here means "the same computer as the client"


try {
 InetAddress ipAddress = InetAddress.getByName(address); // create an object that represents the above IP address.
 System.out.println("Any of you heard of a socket with IP address " + address + " and port " + serverPort + "?");


 Socket socket = new Socket(ipAddress, serverPort); // create a socket with the server's IP address and server's port.
 System.out.println("Yes! I just got hold of the program.");


 // Get the input and output streams of the socket, so that you can receive and send data to the client.
 InputStream sin = socket.getInputStream();
 OutputStream sout = socket.getOutputStream();

 // Just converting them to different streams, so that string handling becomes easier.
 DataInputStream in = new DataInputStream(sin);
 DataOutputStream out = new DataOutputStream(sout);

// Create a stream to read from the keyboard.
 BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));

 String line = null;
 System.out.println("Type in something and press enter. Will send it to the server and tell ya what it thinks.");
 System.out.println();

 while(true) {
 line = keyboard.readLine(); // wait for the user to type in something and press enter.

 System.out.println("Sending this line to the server...");
 out.writeUTF(line); // send the above line to the server.
 out.flush(); // flush the stream to ensure that the data reaches the other end.
 line = in.readUTF(); // wait for the server to send a line of text.


 System.out.println("The server was very polite. It sent me this : " + line);
 System.out.println("Looks like the server is pleased with us. Go ahead and enter more lines.");
 System.out.println();
 }
 } catch(Exception x) {
 x.printStackTrace();
 }
 }
 }



Server Code - 



import java.net.*;
import java.io.*;

public class Server {

public static void main(String[] ar) {

int port = 6666; // just a random port. make sure you enter something between 1025 and 65535.

 try {
 ServerSocket ss = new ServerSocket(port); // create a server socket and bind it to the above port number.
 System.out.println("Waiting for a client...");

 Socket socket = ss.accept(); // make the server listen for a connection, and let you know when it gets one.

System.out.println("Got a client :) ... Finally, someone saw me through all the cover!");
 System.out.println();

 // Get the input and output streams of the socket, so that you can receive and send data to the client.
 InputStream sin = socket.getInputStream();
 OutputStream sout = socket.getOutputStream();

// Just converting them to different streams, so that string handling becomes easier.
 DataInputStream in = new DataInputStream(sin);
 DataOutputStream out = new DataOutputStream(sout);

 String line = null;
 while(true) {

 line = in.readUTF(); // wait for the client to send a line of text.

 System.out.println("The dumb client just sent me this line : " + line);
 System.out.println("I'm sending it back...");


 out.writeUTF(line); // send the same line back to the client.
 out.flush(); // flush the stream to ensure that the data reaches the other end



 System.out.println("Waiting for the next line...");
 System.out.println();
 }
 } catch(Exception x) {
 x.printStackTrace();
 }
 }
 }


Arrow goes to hell


Now Arrow Tv Series goes to the hell. because store is going to a some kind of mesh.
In First Session Story is well design.after Tomy's death it is boring .Isnt it. 





                                                             Arrow 2x09 "Three Ghosts" 


Sunday, December 8, 2013

System Programming -part 1

What is System Programming ?

According to Wikipedia  -
System programming  is the activity of computer programming system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce software which provides services to the user (e.g. word processor), whereas systems programming aims to produce software which provides services to the computer hardware (e.g. disk defragmenter). It requires a greater degree of hardware awareness.

All of the programming work in with operating system. eg -windows,linux. When we working with system programming linux is a very good practice because its free. Linux OS has two main modes ,those are  Kernel mode and Operative mode(user mode).
            Kernel Mode : where the machine operates with critical data structures, direct hardware                                            (In/Out or memory mapped), direct memory, IRQ, DMA, etc.

            User Mode: Users can run applications

Jobs 2013

Jobs is a nice movie ever i watched.We can get lot of things for our life watching this movie.

Jobs 
Biography | Drama – 16 August 2013 (USA)
Director 
Joshua Michael Stern
Writer
Matt Whiteley
Stars 
Ashton Kutcher, Josh Gad, J.K. Simmons, Dermot Mulroney, Lukas Haas




Download her .. Jobs 2013