Google Phone Search 1-800-41-999-999

Google Phone Search

Voice Search is now available for Bangalore

Use google phone search to find out the local business info, flight & movie timings. One of the cool product from google India labs. This service be can be accessed from any phone and google sends the search results as SMS to your mobile @ free of cost.
All you need to do is dial 1-800-41-999-999 from any phone. Its a toll free number.

Its worth giving a try.

Other similar services:

Sulekha - http://yellowpages.sulekha.com

Justdial - http://wwww.justdial.com/

Install DBD::Oracle for Windows

Install DBD::Oracle for Windows


Recently i was in need to install DBD::oracle for windows so scoured google for it. Found that many people have trouble with installing the module.
Activestate site says:
Using PPM: "DBD::Oracle Oracle no longer provides the Oracle client libraries for free, so we can no longer provide DBD Oracle as a PPM/PPM3 module. The DBD-Oracle package for ActivePerl 5.6 is the last package compiled before the licensing changed that is still available on our site. If you wish to compile this module locally, the source may be obtained from www.cpan.org. Instructions on using CPAN are at: http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/CPAN.html. If you are using Windows, an easy workaround for you might be just to use DBD-ODBC instead."


I encountered with following errors 
ppm install failed: The PPD does not provide code to install for this platform

Many suggested to use ftp://ftp.esoftmatic.com/, which is no longer exists.
Later found this site(http://www.cedet.dk/perl/). It gave me the solution to install DBD::Oracle for Active State Perl 5.8.x. But i am using perl, v5.10.0 built for MSWin32-x86-multi-thread.

http://trouchelle.com/perl/ppmrepview.pl is a good site with a whole lot of ppd repository.

Finally this helped me to solve the problem.
 

C:\>ppm install http://trouchelle.com/ppm10/unstable/DBD-Oracle.ppd
Downloading DBD-Oracle-1.22...done
Unpacking DBD-Oracle-1.22...done
Generating HTML for DBD-Oracle-1.22...done
Updating files in site area...done
  16 files installed


Point to be noted.
  • Dont use graphical interface(ppm) to install DBD::Oracle. Use install command from the command prompt.
  • Install oracle client. If still problem persists (error message like entry point not found) try replacing oci.dll

Perl Mechanize

WWW-Mechanize


I used Perl mechanize to test my web application. Found it awesome. If you have plans to test your web app then, give a try with mechanize. It will make your job easier. 
Thanks to Andy Lester . Download WWW::Mechanize from here


lets see a small example with www::mechanize


Load necessary modules.
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;


Create agent
# create agent
my $mech = WWW::Mechanize->new();
$mech->get("http://search.cpan.org");
if(! $mech->success) {
   print "Failed to load\n";
}


Get the list of module category URL 

# Get all the links from the page that matches the given pattern.
my @links = $mech->find_all_links(url_regex => qr/modlist\/(.*)/);
foreach my $modlist (@links) {
 print("The URL is " . $modlist->url_abs . "\n");
}

The output of the above will be like this



The URL is http://search.cpan.org/modlist/Archiving_Compression_Conversion
The URL is http://search.cpan.org/modlist/File_Name_System_Locking
The URL is http://search.cpan.org/modlist/Option_Parameter_Config_Processing
The URL is http://search.cpan.org/modlist/Bundles
The URL is http://search.cpan.org/modlist/Graphics
The URL is http://search.cpan.org/modlist/Perl6
The URL is http://search.cpan.org/modlist/Commercial_Software_Interfaces
The URL is http://search.cpan.org/modlist/Internationalization_Locale
The URL is http://search.cpan.org/modlist/Pragmas
The URL is http://search.cpan.org/modlist/Control_Flow_Utilities
The URL is http://search.cpan.org/modlist/Language_Extensions
The URL is http://search.cpan.org/modlist/Security
The URL is http://search.cpan.org/modlist/Data_and_Data_Types
The URL is http://search.cpan.org/modlist/Language_Interfaces
The URL is http://search.cpan.org/modlist/Server_Daemon_Utilities
The URL is http://search.cpan.org/modlist/Database_Interfaces
The URL is http://search.cpan.org/modlist/Mail_and_Usenet_News
The URL is http://search.cpan.org/modlist/String_Language_Text_Processing
The URL is http://search.cpan.org/modlist/Development_Support
The URL is http://search.cpan.org/modlist/Miscellaneous
The URL is http://search.cpan.org/modlist/User_Interfaces
The URL is http://search.cpan.org/modlist/Documentation
The URL is http://search.cpan.org/modlist/Networking_Devices_IPC
The URL is http://search.cpan.org/modlist/World_Wide_Web
The URL is http://search.cpan.org/modlist/File_Handle_Input_Output
The URL is http://search.cpan.org/modlist/Operating_System_Interfaces


Now lets see how to use forms. On top of the page you can see the search form. Lets search for mechanize. To do that,



1  #search something
2  $mech->submit_form(
3    fields => {
4        query => 'mechanize'
5     }
6   );






In line number 4 query is the name of the form field.





< \input type="text" name="query" value="mechanize" size="35"> 

Fetch all the urls from search output
my @search_links = $mech->find_all_links();

Get all the URL that ends with .pm extension 
foreach my $search_list (@search_links) {
    if ($search_list->url_abs =~ /(.*).pm/) {
        print "I found mechanize module and the URL is $1 \n";
    }
}


Note: @search_links bring only the 1st page's URLs. The actual search output have more than 6-7 pages.


Using Fork 
If you think the test takes more time then you can use fork to create a child process.


Example to create a child process:





 if ( !defined ($child_pid = fork()) ) {
  die "cannot fork: $!";
  }
  elsif ($child_pid == 0) {
  # I'm the child
  }
  else {
  # I'm the parent
  } 

If you have a array with huge number of URLs, you can split that into two and process them in child and parent. This will make the task easier.

Source code:


#!/usr/bin/perl -w


use strict;
use WWW::Mechanize;


# create agent
my $mech = WWW::Mechanize->new();
$mech->get("http://search.cpan.org");
if(! $mech->success) {
   print "Failed to load\n";
}


# Get all the links from the page that matches the given pattern.
my @links = $mech->find_all_links(url_regex => qr/modlist\/(.*)/);


foreach my $modlist (@links) {
 print("The URL is " . $modlist->url_abs . "\n");
}


#search something
$mech->submit_form(
    fields => {
        query => 'mechanize'
    }
);


my @search_links = $mech->find_all_links();
foreach my $search_list (@search_links) {
    if ($search_list->url_abs =~ /(.*).pm/) {
        print "I found mechanize module and the URL is $1 \n";
    }
}

See also:
Test::WWW::Mechanize
Test::WWW::Mechanize::Catalyst

Savior to google notebook

Google Notebook has announced that is has stopped development. Which means new users cant sign-up for this feature but the existing users can still use the service. Google notebook is knows for its: simple, design, effective, friendly, and well suited to a getting things done.Its one of the best tool of google and i use it extensive. Keep it alive. Petition to save Google Notebook. So now its time look for alternatives. I found some good alternatives for google notebook.
Evernote is worth a try. It handles web links, text notes, pictures, voice memos. Overall its a rich media note-taking system. With evernote its easy to import your google notebook notes.
Zoho Notebook is very similar to googe notebook. It handles text, image, audio, video etc. It also has a version control, Zoho Notebook plugin for firefox. You can even import your google notebook.
To import your notes from Google Notebook, select a notebook, click “export”, choose the Atom option, and save to disk. Repeat this step for each notebook you want to import into Evernote. When you’re done,
Login into the Evernote website
click on Settings, find the “Import into Evernote” section, click the link, and then select Google Notebook. You’ll need to import notebooks one by one.
Below is the video to help yourself

Login into the Zoho Notebook website
Click Import Google notebook, on top of the page. Start importing notes one by one.
Thats simple.
Have a look at this to try some other note taking applications.