Tech Knowledge!

Thursday, November 20, 2014

Do you wanna implement google custom search api, in an application (ios/android)? Alright!Here, this link will solve everything for you.Go check that!Checked? 'And' back! That means you are one of my kind, unlike the geniuses who understand the encrypted documentation of these tech giants.It took me 6-7 hours and tens of url keys (support URL and forum links) to decrypt the documentation they provided. I wanna save that time for you folk. Here is step by step process to for implementing google search api.Initial X step will be common for all, and last few steps are dedicated for the application developers. In this document you'll learn:

Steps to implement the search API

Pictorial detail of steps

Make a final run of your application

Brief Step of the process:

Create a Google account (ignore if you have one)

You may found some peace of information related to pricing at the bottom of this page helpful(you can ignore this too)

Now on the new tab, open Custom Search Engine page. On this page click on Create a custom search engine, button

That will lead you to create new search engine page, here give your domain name in "Sites to search" field. (If you don't have one no worries, give any thing, that have www. in the start and .com in the end)

Fill name, if it haven't pick one already, then click on create.

So you got a jumping robo to congratulate you? ;) Yeah that's it. In this page step up to "Modify your search engine", by clicking on, "Control Panel" button

There you are, now tern on the Image Search, (if you want to)

Also in "Sites to search" section, select, "Search the entire web but emphasize on included item", instead of, the default one, which is "Search only included site"

That is it at the bottom of this page click on update. And then come back to middle of the page and under the "Detail" title, click on Search engine ID, copy the Id, paste it somewhere.

In it replace, {API_KEY} which you have created under "Create project and generate API key" section

And replace {SEARCH_ENGINE_KEY} with the Search engine Id you just copy pasted

Call it with some different value, at query string, than 'a', https://www.googleapis.com/customsearch/v1?q=a&key={API_KEY}&cx={SEARCH_ENGINE_KEY} change a with any thing you wanna search you must have got the beautiful JSON of search result

Other Stuff

If you wanna see the request status, go back to your project page, that hoe may request placed, how many of those failed, ect. Click on the overview and you will get the graph for that, love you google

Friday, July 26, 2013

Well, I spend last 3 hours doing many things like leaning spring, and mailing and writing my diary about my day ad yeah cooking as well. But most important thing I did was "Installing Apache Tomcat7.0.42" on my Mac OS X, yeah not Lion.. not till yet, as I am looking forward for upcoming

Enough of chitchat, lets go to the point. I have been checking for various post while my search to install the TOMCAT. The one that help me a lot is Installing Tomcat on Mac OS X. As this link is for Tomcat 5.5 so don't be worried as I am here to provide you updated version for installing Tomcat 7.0.42 and may be it's later version as well. As with the zits that i got it's super easy to install tom cat on mac "Thank to Shell Script" for taking all load on it's head. Follow these easy X steps in order to install tomcat on your Mac OS X:

Now you have that in your downloads, so unzip that and copy the folder. Now paste it in any convenient place for you in "your system", for me it was my "java" inside my work folder, so here is path for my folder "/Users/arpitawasthi/Work/Java/Data" where I pasted "apache-tomcat-7.0.42".

As this the name "apache-tomcat-7.0.42" is heck so change it to "Tomcat7042"

Now open "terminal" navigate to "Tomcat7042" folder by using cd in this way Arpits-MacBook-Pro:bin arpitawasthi$ cd /Users/arpitawasthi/Work/Java/Data/Tomcat7042/

Now simply go one more step ahead to "bin" directory as Arpits-MacBook-Pro:Tomcat7042 arpitawasthi$ cd bin

Inside bin there's a shell script file named "startup.sh" so what you need to do now is execute this file as Arpits-MacBook-Pro:bin arpitawasthi$ sh startup.sh

That's it, that's all now you have tomcat installed in your system. To check this, type this URL http://localhost:8080/ on your browser. You should see something like: