How to create stylish text for whatsapp message

How to create stylish text for whatsapp message

WhatsApp, most widely used chatting application, used to send text messages, documents, audio or video files in any part of the globe. But while sending text messages WhatsApp uses it's own font and size. WhatsApp has not yet provided in built fonts or anything that provide to style the text. This post provides different ways to send stylish text messages. Use following tricks or app to do the same.
1. Using Inbuilt Tricks
A. If you want to apply bold face to text  message or some portion of text message then put this message or portion of message in *. Message will be sent by creating bold face of text.
For example : If you want to send 'hello friends' in bold, then type '*hello friends*'. Message will be given in bold.
B. If you want to create text message in Italic format then put message in _.
For example : If you want to send 'hello friends' in italic format, then type '_hello friends_'. Message will be given in italic format.
C.  If you want to create strike through message then put message in ~.
For example : If you want to send 'hello friends' in strike through format, then type '~hello friends~'. Message will be given in strike through format.
2. Stylish Text Android App
This is most simple and easy to use android application to send text message on WhatsApp in various good looking styles. In following two simple steps you can send the message:
A. Open app and type message or if you have copied message then just long hold to paste the same message.
B. Then choose the style that you liked most and select icon against it to share message to WhatsApp contact or Facebook friend on messenger.
3. Style My Text Android App
This is another simple app to convert simple text message in stylish format. Basically this app is used to flip the contents of the message. App is available  in free as well as pro versions. In pro version more styles are available.
4. Text Art Android App
In this app you can customize your message very easily. But your message will be shared as image in WhatsApp. With this app you can use text art preset, and background image with some fine texture as background. You can also change font and color of text with text layouts. Once you finished, you can also save this image in your storage.
I hope this post helped you to create stylish text messages in WhatsApp chatting.
How to search information from XML document using SAX parser

How to search information from XML document using SAX parser

XML (eXtensible Markup Language) is platform independent file having hierarchical structure of elements to hold meaningful data. Parser is used to read, search, and edit information from XML document as XML document will do anything on its own.Simple API for XML (SAX) is one of the parser. It is sequential event driven, fast, memory intensive, read only API available to deal with XML. Follow these steps:

1. Creating XML document
 <?xml version="1.0"?>
<addressbook>
 <record>
  <name>C.Chandran</name>
  <city>Koimattur</city>
 </record>
 <record>
  <name>Prathmesh</name>
  <city>Ichalkaranji</city>
 </record>
</addressbook> 


2. Java Program to search information
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.Attributes;
import java.util.*;
import java.io.*;

public class searchxml extends DefaultHandler
{
 static Scanner sc=new Scanner(new InputStreamReader(System.in));
 int flag=0;
 String temp;
 static String categary;
 static String skey;
 public void startElement(String uri, String local, String row, Attributes attrs) throws SAXException
 {
 }
 public void characters(char []ch, int start, int len) throws SAXException
 {
  temp=new String(ch,start,len);
 }
 public void endElement(String uri, String local, String row) throws SAXException
 {
  if(row.equals(categary) && temp.equals(skey))
  {
   System.out.println("Record Found.");
   flag=1;
  }
 }
 public void endDocument() throws SAXException
 {
  if(flag==0)
  {
   System.out.println("\nRecord NOT Found.");
  }
 }
 public static void main(String argd[])
 {
  try
  {
   searchxml sx=new searchxml(); 
   System.out.print("\n\nEnter Categary : ");
   categary=sc.next();
   System.out.print("\nEnter Search Key : ");
   skey=sc.next(); 
   SAXParserFactory factory = SAXParserFactory.newInstance(); 
   SAXParser saxParser = factory.newSAXParser();
   saxParser.parse("addressbook.xml",sx);
   
  }catch(Exception e)
  {
   System.out.print(e); 
  }
 }
}



3. Output
Enter Category: name
Enter Search Key: Prathmesh
Record Found
How to send email from localhost XAMPP server's gmail account to email address using PHPMailer

How to send email from localhost XAMPP server's gmail account to email address using PHPMailer

Trying to send email from localhost XAMPP server using gmail account to specified email address. Follow the following steps.

1. Download PHPmailer and extract it to applications home directory e.g.C:\xampp\htdocs\MyApp.

2. Copy the following program and save it with mail.php
<?php
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->isSMTP();                                      // Mailer uses SMTP to send mail
$mail->Host='smtp.gmail.com';                         // Host  
$mail->SMTPAuth = true;                               // Allowing SMTP authentication
$mail->Username = 'test@gmail.com';                   // SMTP username
$mail->Password = 'Test123!';                         // SMTP password
$mail->SMTPSecure = 'tls';                            // Enable TLS encryption
$mail->Port = 587;                                    // TCP port to connect to
$mail->setFrom('test@gmail.com');                     // From address
$mail->addAddress('test2@gmail.net');                 // Add a recipient
$mail->isHTML(true);                                  // Set email format to HTML
$mail->Subject = 'Mail Subject';
$mail->Body    = 'Body of email';
if(!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
    echo 'Message has been sent';
}
This PHP script uses gmail's SMTP host to send mail with SMTP authentication. This SMTP authentication needs your gmail account's username and password. For secure transmission of mail use TLS or SSL. For TLS use 587 as port number and for SSL use 465. Then create message by setting sender's, receiver's email id along with subject and message body.

3. Now set "less secure app" to sender's email account so that account can send email to other email ids. For this first login in gmail account and then search "less secure app" in google. After clicking on less secure app link in search result just on "Allow less secure app" option

4. But if still not able to send mail then download this script and paste in extracted folder of phpmailer for allowing SMTP server to send mail.

Note : For sending e-mail make sure that network is proxy free.