Thursday, June 18, 2009
Thursday, May 21, 2009
A nice song for a great leader - Ayubowewa Maha Rajanane
This is one of my favorite song. It is written for our great president Mahinda Rajapaksha. He has all characteristics of a great king as mentioned in this song. We are very lucky to have such a great leader.
Labels:
Mahinda Rajapaksha,
Song
| Reactions: |
Monday, May 18, 2009
LTTE Terrorist Leader Prabhakaran dead: Sri Lanka is free from from terror after 30 years.
Today is a victorious day for All Sri Lankans. Sri Lanka Defence Forces has killed the ruthless murderer Prabhakaran today. http://www.afp.com/afpcom/en/taglibrary/activity/web/multimedia/afp-online-news
Monday, May 4, 2009
Children of LTTE Leader and LTTE Child Soldiers - How Prabhakaran & LTTE reperesent Tamil peoples
This is how so called "sole representative of Tamil people" treats his children and children of other Tamils who he says that he represents.
This left side picture shows a Tamil child killed by LTTE terrorists, because he refused to join LTTE as a child soldier. And Right picture shows LTTE leader Prabhakaran's wife and his son Charles Anthony. Look the difference. For living a luxurious life for Prabhakaran's family, other little children have to live in a hell and they even don't have a right to live if they refuse to join their canibal organization.
This left side picture shows a Tamil child killed by LTTE terrorists, because he refused to join LTTE as a child soldier. And Right picture shows LTTE leader Prabhakaran's wife and his son Charles Anthony. Look the difference. For living a luxurious life for Prabhakaran's family, other little children have to live in a hell and they even don't have a right to live if they refuse to join their canibal organization.
Left side of these two photos shows a LTTE woman soldier and a child soldier. Right picture shows the LTTE leader Prabhakaran's daughter Dhavaraga. Look in the first photo of these two, what Prabhakaran has given to these women soldiers to wear in the neck is a Cyanide capsule. But what he has given for his daughter is a Perl necklace. While those young girls in his terrorist organization hold AK47 guns in their hands, what his daughter holds in her hand is a nice rose flower. See the difference. See how the so called leader of the freedom fighters treats his family and his own people who he says to liberate and represent. While thousands of Tamil children were forcefully dragged from schools to join his terrorist organization, his children went abroad to learn in foreign universities.LTTE is a ruthless terrorist organization built on heaps of lies and try to deceive international community and Tamil diaspora by those lies and try to justify their crimes using those lies. They have created lot of pains to Tamil people. They have killed almost all of Tamil intellectuals who stands for democracy and who refuse violent actions of LTTE. They have prevented getting education by those Tamil children in North & Eastern of Sri Lanka. All Tamil peoples in those regions had to live in a hell like environment and with the fear that any moment LTTE will kidnap their loving children to use as child soldiers. These all brutalities should finish one day. Thanking to the Sri Lankan defense forces, I hope within weeks it will be over and Tamil, Sinhalese, Muslim and all other peoples in Sri Lanka can live in harmony after finishing these LTTE barbarians.
Now Sri Lanakan defense forces have defeated almost all of LTTE and going to free those suffered Tamil peoples from the clutches of LTTE barbarians. Sri Lankan army has showed their professionalism and their humanity by achieving their targets by preventing casualties for civilians at all cost.
[images taken from an email]
Sunday, May 3, 2009
Swine Flu [Influenza A(H1N1)] Outbreak 2009
The 2009 swine flu outbreak is the epidemic of a new virus strain of influenza A ( H1N1) virus, which is commonly called the swine flu. It is currently a phase 5 outbreak, one level below an official pandemic. Currently Mexico, USA and some European countries such as UK are the countries which are mainly affected by the Swine flu.
The Spanish flu which spread throughout the world in 1918 is also caused by a strain of same H1N1 virus. Spanish flu is estimated to have affected nearly one billion people which was more than half of then world population and it is estimated that 70 to 100 million peoples were killed. In 1976, there was another outbreak of swine flu (Influenza A or H1N1 virus), but it was limited to Fort Dix in USA.
These are some important links related to Swine Flu or Influenza A (H1N1).
The Spanish flu which spread throughout the world in 1918 is also caused by a strain of same H1N1 virus. Spanish flu is estimated to have affected nearly one billion people which was more than half of then world population and it is estimated that 70 to 100 million peoples were killed. In 1976, there was another outbreak of swine flu (Influenza A or H1N1 virus), but it was limited to Fort Dix in USA.
These are some important links related to Swine Flu or Influenza A (H1N1).
- FAQ at WHO: http://www.who.int/csr/disease/swineflu/frequently_asked_questions/en/index.html
- Swine Flu Distribution Map: http://flutracker.rhizalabs.com/
- Wikipedia Page for Swine flu outbreak: http://en.wikipedia.org/wiki/2009_swine_flu_outbreak
Labels:
H1N1,
Influenza A,
swine flu
| Reactions: |
Wednesday, April 22, 2009
Upload a file to another webpage through a Java Servlet
In past few days, I had to work on implementing a functionality for sending an HTTP request to another url and upload a file with that HTTP request and then get the response for the HTTP request from a Java servlet. This is the code I finally created for achieving my task. It does,
Below function is called inside the protected void processRequest(HttpServletRequest request, HttpServletResponse response) of a Servlet in my project. I have put the relevant code for achieving this task in below.
// Import these packages
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
// Code
private String uploadFile(String urlstring, String dataXML) {
try {
String itemname = "formFile";
String tempfilename = "test.xml";
String lineEnd = "\r\n";
String twoHyphens = "--";
String boundary = "---------------------------24464570528145";
URL url = new URL(urlstring);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setUseCaches(false);
connection.setRequestMethod("POST");
connection.setRequestProperty("Connection", "keep-alive"); connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
connection.setRequestProperty("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
DataOutputStream dataoutputstream = new DataOutputStream(connection.getOutputStream());
dataoutputstream.writeBytes(twoHyphens + boundary + lineEnd);
dataoutputstream.writeBytes("Content-Disposition: form-data; name=\"" + itemname + "\"; filename=\"" + tempfilename + "\"" + lineEnd);
dataoutputstream.writeBytes("Content-Type: text/plain" + lineEnd + lineEnd);
// dataXML is File data, writes a string as the file content of the uploading
// file
dataoutputstream.writeBytes(dataXML);
dataoutputstream.writeBytes(lineEnd);
dataoutputstream.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd); dataoutputstream.flush();
dataoutputstream.close();
String inputLine;
StringBuffer sbResponseData = new StringBuffer();
// Get the response data for the previous HTTP request
DataInputStream dis = new DataInputStream(connection.getInputStream());
while ((inputLine = dis.readLine()) != null) {
sbResponseData.append(inputLine + "\n");
}
dis.close();
return sbResponseData.toString();
}
catch (Exception ex) {
logger.error("Exception in initiating outdial call request: Details: " + ex.toString());
}
}
- Connect to another given URL
- Upload given string as a file to the above url
- Then read the response for the above HTTP request.
Below function is called inside the protected void processRequest(HttpServletRequest request, HttpServletResponse response) of a Servlet in my project. I have put the relevant code for achieving this task in below.
// Import these packages
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
// Code
private String uploadFile(String urlstring, String dataXML) {
try {
String itemname = "formFile";
String tempfilename = "test.xml";
String lineEnd = "\r\n";
String twoHyphens = "--";
String boundary = "---------------------------24464570528145";
URL url = new URL(urlstring);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setUseCaches(false);
connection.setRequestMethod("POST");
connection.setRequestProperty("Connection", "keep-alive"); connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
connection.setRequestProperty("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
DataOutputStream dataoutputstream = new DataOutputStream(connection.getOutputStream());
dataoutputstream.writeBytes(twoHyphens + boundary + lineEnd);
dataoutputstream.writeBytes("Content-Disposition: form-data; name=\"" + itemname + "\"; filename=\"" + tempfilename + "\"" + lineEnd);
dataoutputstream.writeBytes("Content-Type: text/plain" + lineEnd + lineEnd);
// dataXML is File data, writes a string as the file content of the uploading
// file
dataoutputstream.writeBytes(dataXML);
dataoutputstream.writeBytes(lineEnd);
dataoutputstream.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd); dataoutputstream.flush();
dataoutputstream.close();
String inputLine;
StringBuffer sbResponseData = new StringBuffer();
// Get the response data for the previous HTTP request
DataInputStream dis = new DataInputStream(connection.getInputStream());
while ((inputLine = dis.readLine()) != null) {
sbResponseData.append(inputLine + "\n");
}
dis.close();
return sbResponseData.toString();
}
catch (Exception ex) {
logger.error("Exception in initiating outdial call request: Details: " + ex.toString());
}
}
Wednesday, April 15, 2009
Previewing the URL of a TinyUrl
Nowadays, many of us use TinyURL s instead of using long urls for the ease of use. Think that a site you visited has a tiny url like http://tinyurl.com/c8yvgr. We can not directly say whether this tiny url links to a good site or a porn site or a other malicious site by looking at given tiny url . But now you can preview the actual URL before visiting the target site using a feature provided by http://tinyurl.com. What you have to do is go to http://tinyurl.com/preview.php and then click on the link Click here to enable previews. After enabling that, each time you click on a tinyURL, it will first show the preview of actual url and then you can proceed as you wish. You can later disable the preview settings using the same page.
Subscribe to:
Posts (Atom)


