Sunday, 2 October 2011

How to use "Voice Search" on Google

Hi Friends..!! Today I am back with sonthing interesting. have you thought how it would be easy to search any thing in Google without writing a single character? Yes Google has launched this feature of voice search. We will understand this feature step by step
Step1. use URL https://encrypted.google.com/
Step2. Click on a symbol of mic in Searching input Text Box.
Step3. when you click on mic symbol you will get a message Box Start to say anything (prefer to speak English Words)
You can go to encrypted Google directly by clicking click Here Now Enjoy this feature.
Thanks Google
with regards...

Saturday, 2 July 2011

How to replace ' by \' in a string in Apex


Mostly This problem came in front when You need to use dynamic Query in which you can not use String with single quote so We have to replace ' in to \' 
There are two  Approach as follows :
If your String is InputString = "sj'ase'aa'"
First Approach
===========
Use String Method
string.escapeSingleQuotes(InputString);
output would be sj\'ase\'aa\'
Second Approach:
============

if(InputString.contains('\'')){
                       InputString= InputString.replaceAll('\'', '\\\\\'');
                                   
}

But Second Approach is limited up to only single quote but when you use back slash you can not use this approach.
so go to first one.