Wednesday, December 26, 2007

Non-Smokers, avoid Second hand smoking, Beware of Smokers!!!

What Is Secondhand Smoke?

Secondhand smoke, also known as environmental tobacco smoke (ETS) or passive smoke, is a mixture of 2 forms of smoke from burning tobacco products:

  • Sidestream smoke: smoke that comes from the end of a lighted cigarette, pipe, or cigar
  • Mainstream smoke: smoke that is exhaled by a smoker
When non-smokers are exposed to secondhand smoke it is called involuntary smoking or passive smoking. Non-smokers exposed to secondhand smoke absorb nicotine and other toxic chemicals just like smokers do. The more secondhand smoke you are exposed to, the higher the level of these harmful chemicals in your body.

So, Smokers dont make harm to your friends and Non-smokers avoid standing near smokers when he smoke and if possible try to make your smoking friends to stop smoking..

Smokers, Please Stop smoking atleast when you are with your non-smoking friends. This is good for both of your health...

Google Search results in your mobile phone via SMS

Now, you can get the Google search results in your mobile phone via SMS.

Text message your search query to 54664 ('5GOOG' on most devices) and we'll text message back results.

Google SMS is a premium SMS service; queries sent to 54664 will be charged at the following rates:

  • Aircel: Rs. 3.00
  • Airtel: Rs. 2.00
  • BPL: Rs. 3.00
  • BSNL: Rs. 0.80/1.00 (post-paid/pre-paid)
  • Reliance: Rs. 3.00
  • Spice: Rs. 3.00
  • Tata: Rs. 3.00
  • Note: Incoming messages from Google are not charged.
For example,

If you are away from your computer, feeling hungry and you want to know the address of near by restaurants. At that time, you feel that if am in home or office i can search in Google for the nearby restaurants. Don't worry, Google is now providing an Google search SMS search. All you need is a mobile phone, no need of GPRS connection too..

Just send an SMS to 54664 with your search query, you will get the search results in a short while. The Provider may charge for this SMS and the charge varies between providers..

Enjoy!!! Google search anywhere, anytime from your mobile phone...

Monday, December 24, 2007

Geocode and Reverse Geocode

A Geocode (Geospatial Entity Object Code) is representation format of a geospatial coordinate measurement used to provide a standard representation of an exact geospatial point location at, below, above the surface of the earth at a specified moment of time.
The process of geocode is getting the latitude and longtitude values of the corresponding address and the Reverse Geocode is the process of getting the address of the corresponding latitude and longtitude values. This can be shown here...

We can also develop our own page with geocode and reverse geocode using this ArcWebservice

FPDF library to create pdf files

we can create pdf files using php through fpdf library.. I have downloaded the fpdf library and created a pdf file with some images in it..

Here is my code which requires fpdf.php and array of image file name with full path, which u can download from the above link..

require('fpdf.php');
$pdf = new FPDF();
foreach($fileList as &$filename)
{
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,substr(strrchr($filename,"/"),1));
$pdf->Image($filename,5,30,200,200,'jpg','');
}
$pdf->Output();
?>

Upload image using J2ME and KSOAP

I have used KSoap to upload photo from my mobile phone to my web server using J2ME..

Here, the UploadPhoto class calls the PaymentInfo function which is in the server side and passing parameters as soapobjects like savePaymentInfo and PaymentInfo which is send as a string and the image which is uploading is converted to Base64String which can be converted again to image in the server side...

To use this function, you have to download ksoap jar file and add it to the project library.

Here is the code from the client side i.e. mobile application

class UploadPhoto
{
try
{
SoapObject savePaymentInfo = new SoapObject("http://tempuri.org/", "SavePaymentInfo");

SoapObject PaymentInfo = new SoapObject("http://tempuri.org/", "PaymentInfo");

PaymentInfo.addProperty("AddLocation", addLocation);
PaymentInfo.addProperty("CreditCardId", "12345");
PaymentInfo.addProperty("Msisdn", "11111");

int length = new String(midlet.postCardString).length();
String stringToSend = new String(midlet.postCardString).substring(0,length-2);

PaymentInfo.addProperty("PostCards", stringToSend);
PaymentInfo.addProperty("ResizePhoto", resizePhototoPhone);
PaymentInfo.addProperty("SecurityCode", "5678");
PaymentInfo.addProperty("UploadPhotoServer", uploadPhototoServer);
PaymentInfo.addProperty("SendPhotoMyHome", sendPhototoPC);

if("true".compareTo(domesticPostcard) == 0)
{
PaymentInfo.addProperty("PostCardType", "Domestic");
}
else
{
PaymentInfo.addProperty("PostCardType", "InterNational");
}

savePaymentInfo.addProperty("paymentInfo", PaymentInfo);

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

envelope.bodyOut = savePaymentInfo;
envelope.dotNet = true;
envelope.encodingStyle = SoapSerializationEnvelope.XSD;

HttpTransport httpTransport = new HttpTransport("http://url.asmx");
httpTransport.debug = true;

httpTransport.call("http://tempuri.org/SavePaymentInfo", envelope);

SoapObject result = (SoapObject)envelope.bodyIn;
String res = result.getProperty("SavePaymentInfoResult").toString();

if( res.equals("true") )
{
yesNoAlertMessageType = "PostCard(s)";
textBox.setString("");

deleteSendData();
displayreadfileCanvas = true;
httpTransport.reset();

midlet.displayGaugeAlert = false;
midlet.stopProcess();
repaint();

midlet.displayYesNoAlert = true;
midlet.errorMessage = "Sent Successfully";
repaint();
}

else if( res.equals("false"))
{
yesNoAlertMessageType = "PostCard(s)";
textBox.setString("");

displayreadfileCanvas = true;
httpTransport.reset();
midlet.displayGaugeAlert = false;
midlet.stopProcess();
repaint();

midlet.displayYesNoAlert = true;
midlet.errorMessage = "Sending Failed";
repaint();
}
}

catch (IOException ex)
{
System.out.println(ex.getMessage());
midlet.displayErrAlert = true;
midlet.errorMessage = "Server does not Exist";
repaint();
displayreadfileCanvas = true;

}
catch (XmlPullParserException ex)
{
System.out.println(ex.getMessage());
midlet.displayGaugeAlert = false;
repaint();
midlet.displayErrAlert = true;
midlet.errorMessage = "Server does not Exist";
repaint();
displayreadfileCanvas = true;

}
catch(Exception ex)
{
System.out.println(ex.getMessage());
midlet.displayGaugeAlert = false;
repaint();

midlet.displayErrAlert = true;
midlet.errorMessage = "Server does not Exist";
repaint();
displayreadfileCanvas = true;
}
};

Wednesday, December 19, 2007

Google gear support for offline web applications

After filing some two pages of registration form in a particular site and your internet connection suddenly lost before submitting the registration form. What happened? your data will be lost and you have to retype the same what you have entered in the previous pages. So, hereafter no need to worry about these problem. You can create your own web page with the help of Google gear support.

For this, you have to install the google gear in your computer. Before that you have to know something about the google gear and how it works?

About Google Gears:

Google Gears is a library that enables our web applications to work offline. This includes three modules:

Local Server
Allows a web application to cache resources locally and serve them without a network connection. In other words, it’s a local proxy server with a JavaScript API

Database
Provides browser-local relational database storage that is accessible through JavaScript. It uses the open source SQLite database system

WorkerPool
Allows a web applications to run JavaScript code in the background, asynchronously. WorkerPool scripts don’t block script execution on the “main page,” which makes applications more responsive.

See this link for getting started with creating a web page with google gear support

Wednesday, November 14, 2007

My new Bike...



I love to roam in bike in the city... I bought a new CBZ Xtreme last month.. When i bought the bike and ride it, i feel like flying in the air.. B'coz i bought it in my own money... Very happy... This photo is taken with my mobile... This photo is taken with my new mobile nokia 5700..... The picture clarity is awesome rite....

My new mobile


I have bought a new mobile Nokia 5700, its a music edition phone with 2MP camera. Its my dream to buy a color mobile in my own money.. At last i bought it... and also am new to the blog..

This is my first post in my blog..