Showing posts with label How do I... Show all posts
Showing posts with label How do I... Show all posts

June 6, 2011

How to find out most searched keywords in United States

In a recent personal task, I needed to extract most searched keywords in US on a daily or monthly basis. While doing some research, I found out that Google actually publishes something called Google Hot Trends on daily basis (on this site). What I wanted was exactly this but I wanted it in the text file so that an automation I had done in browser can read this file and take action.

I thought the best way to extract these keywords would be to write a small C# utility that extracts keywords for a given day.  Here is the source code I wrote to do just that.

   1: StringBuilder sb = new StringBuilder();
   2:  
   3: for (int counter = 0; counter < 15; counter++)
   4: {
   5:     string strURL = "http://www.google.com/trends/hottrends?sa=X&date=";
   6:     string strDateString = string.Format("{0:yyyy-M-d}", DateTime.Now.AddDays(counter * -1));
   7:     Console.WriteLine("Finding most searched keywords for : {0}", strDateString);
   8:     WebRequest request = WebRequest.Create(strURL + strDateString);
   9:     HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  10:     Stream dataStream = response.GetResponseStream();
  11:     StreamReader reader = new StreamReader(dataStream);
  12:     string responseFromServer = reader.ReadToEnd();
  13:     int nStartLocation = responseFromServer.IndexOf("Site Feed</a>");
  14:     int nEndLocation = responseFromServer.IndexOf("<script type=\"text/javascript\">", nStartLocation);
  15:     if (nEndLocation > nStartLocation)
  16:     {
  17:         string strStringtobeProcessed = responseFromServer.Substring(nStartLocation, nEndLocation - nStartLocation);
  18:         string[] delim = { "</a></td>" };
  19:         string[] strArray = strStringtobeProcessed.Split(delim, StringSplitOptions.RemoveEmptyEntries);
  20:         foreach (string strProcess in strArray)
  21:         {
  22:             string strTemp = strProcess.Substring(strProcess.LastIndexOf('>') + 1, strProcess.Length - (strProcess.LastIndexOf('>') + 1));
  23:             Console.WriteLine(strTemp);
  24:             if(strTemp != "\n") sb.AppendLine(strTemp);
  25:         }
  26:     }
  27: }
  28:  
  29: using (StreamWriter outfile = new StreamWriter(@".\SearchKeywords.csv"))
  30: {
  31:     outfile.Write(sb.ToString());
  32: }

If you put above code in any console based application (and add couple of using references on top like System.Net and System.IO), it will create a text file in the current directory called “SearchKeywords.csv” which will look something similar following. Basically it goes and fetches last 15 days most searched keywords and writes them into the file.


image


It also dumps on the command prompt, what it gets from HotTrends website.


image


Sometimes, its interesting to see what people are looking for (I love to go and find out why many people are searching for that, there’s a one or the other reason behind that!)

May 23, 2011

How to convert summarized RSS feeds into full text RSS feed?

Do you also feel annoyed by summarized RSS feeds where you have to go to actual website in order to read entire article? I hate it when I have to break my reading session by going to their website. In the past, I used to create Yahoo Pipe that iterates through all the RSS Items, fetch the destination URL and replaces summarized content with full page content but that’s a lot of work and when the destination site changes their page layout, Pipe breaks and I have to change it. So, its high maintenance way. I was always looking for a simpler way and recently came across this awesome site called, “Full Text RSS feed builder”.

Its very simple to convert Full Text RSS Feed using this service.

  • Go to http://fulltextrssfeed.com/
  • Enter the URL in the given box (This URL can be any RSS feed URL which has feed items as summary items) and click on Submit.

image

  • On the next page, you will be able to preview the full text RSS feed and edit box on that page will be the RSS feed URL which you should subscribe to in your favorite RSS reader (Google Reader is my favorite)

Awesome service and best of all totally free!

May 8, 2011

How to find location from IP address

If you want to find out Country/City information from IP address, use IP2Location website, it can map IP address to Country and City (including Lang/Lat and fairly accurate. It also provides ISP information!

In order to convert from IP to location, you have to enter the IP address on the right panel on the webpage and click on Find Location,

image

An example conversion!

image

Go to IP2Location website!

April 26, 2011

How to find search keywords that leads users to your Website using Woopra

As I have mentioned before (here and here), Woopra is one of the best Analytics engine I’ve seen. I think you’d love it if you like to see real-time traffic to your site. Installing Woopra to your site is not very hard, use the guide here. I use it on my blog and find very interesting facts about what people search for on various search engines to land on my blog.

On a fine weekend, I wanted to fetch all the search keywords people use to come to my blog and save it per day in a file. I knew that Woopra provides API access (REST), and I wanted to write something quick to save this data. Instead of choosing C#, I chose Powershell to do this and just wanted to share the small script I came up with. (Pardon my dirty code, its just something I wrote very very quickly haven’t got a chance to clean it)

   1: Add-Type -AssemblyName System.Web
   2:  
   3: $a = New-Object XML
   4: $today = Get-Date
   5: $currentDir = Split-Path -parent $MyInvocation.MyCommand.Definition
   6: $currentDir
   7: for($i=0; $i -le 3; $i++)
   8: {
   9:     $td = $today.AddDays($i*-1)
  10:     $dayString = $td.Day,$td.Month,$td.Year -join "/"
  11:     $strURL = "http://api.woopra.com/rest/analytics/getqueries.jsp?website=jigar-mehta.blogspot.com&api_key=XXXXXXXXXX&date_format=dd/MM/yyyy&start_day=" + $dayString + "&end_day=" + $dayString + "&limit=100&offset=0"
  12:     $a.Load($strURL)
  13:     $strDate = [string]::Format(".\{0:ddMMyyyy}{1}", $td, ".txt")
  14:     Write-Host "Fetching for" $td.ToLongDateString() "into" $strDate
  15:     "============================================================================ " + $td.ToLongDateString() | out-file $strDate -encoding UNICODE
  16:     foreach($iii in $a.response.items.item)
  17:     {
  18:         $strTemp = $iii.name -replace "\+", " "
  19:         [Web.Httputility]::UrlDecode($strTemp) | out-file $strDate -append -encoding UNICODE
  20:     }
  21: }

In order to use above script, you will need to replace website=”jigar-mehta.blogspot.com” with your website name and api_key=XXXXXXXXXX with your own account’s API key (You can get it at, https://www.woopra.com/members/settings/api.jsp?website=<YourWebsiteName>, assuming you are logged in).



It will create text files (something similar to following) in the same directory as powershell script with keywords that led users to your blog.


image


A sample output for single day queries to my blog looks as follows,



   1: ============================================================================ Friday, April 22, 2011
   2: dell inspiron 1525 drivers
   3: windows phone 7 icon
   4: dell inspiron 1525 wireless network driver
   5: download dell inspiron 1525 intel chipset utility for windows xp
   6: 1525 driver xp
   7: youtube gujarati natak comedy
   8: dell inspiron 1525 bluetooth driver download
   9: inspiron 1525 video driver
  10: windows phone style icons
  11: youtube gujarati natak
  12: how to install hyper-v manager on windows 7
  13: device driver for inspiron 1525
  14: jigar mehta
  15: free online bug tracking system
  16: ગુજરાતી નાટક
  17: youtube gujarati movie
  18: ગુજરાતી natak
  19: dell inspiron 1525 audio drivers
  20: gujarati drama bas kar bakula
  21: gujarati natak
  22: dell insprion 1525 driver download xp
  23: dell inspiron xp drivers
  24: functional testing visual studio 2010
  25: jigar container movers
  26: gujarati natak list
  27: dell inspiron 1525 network intel driver
  28: dell inspiron 1525 video drivers for windows xp
  29: download application bar icon for windows phone 7
  30: hosted isuue tracker free
  31: nayan ne bandh rakhine jyare tamne joya chhe lyrics
  32: dell inspiron 1525 audio driver
  33: sairam dave jokes from prem etle vahem download link
  34: extract vhd
  35: dell inspiron 1525 download drivers xp
  36: extract .vhd files .iso
  37: inspiron 1525 xp drivers
  38: online free jira
  39: sairam dave prem jokes.zip
  40: gujarati natak on youtube list
  41: videosearch.rediff.comvideo_play.php?id
  42: vhd extract
  43: side by side execution assembly
  44: youtube .gujarati.movei.new
  45: cr-48

Powershell rocks!

April 22, 2011

How to write in Gujarati without installing any software

Sometimes, when I have to write a few words in Gujarati, I use following method to quickly write them without installing any software on my system.

Go to Google’s Transliterate website and select Gujarati from first combo box in the toolbar.. Writing gujarati in this tool is very very simple. All you do is just start writing english spelling for any gujarati word and when you hit Space or Enter key, it will convert the word to Gujarati equivalent. Good part is, if you think the word it understood is not correct, hit backspace and it will give list of options to choose from! At least try it out if you know Gujarati!

Say for example, I have to write “કાગડો”, I just need to write “kagado” something like screenshot below,

image

when I hit space, it gets converted into,

image

and in case if I find that detected word incorrect, I can hit backspace and it will give me menu of all possible words from which I can choose with just one click.., which looks something like following,

ScreenClip(2)

What I generally do is, write words or sentences in Google Transliteration tool and finally copy the written words into clipboard and paste it anywhere I want (say in Blogpost, comment box, document or anywhere!)

Enjoy writing in Gujarati!

 

PS: You can use this same tool to write in other Indian languages too! At present the tool supports bengali, gujarati, hindi, kannada, malayalam, marathi, nepali, punjabi, sanskrit, tamil, telugu and urdu languages.

How to Install Hyper-V Manager on Windows 7

If you want to install Hyper-V Manager on Windows 7, follow the steps below.

  1. Download the Administration Tools package from the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkID=137379).

  2. Open the folder into which the package downloaded, double-click the package to unpack the files, and then start the Remote Server Administration Tools Setup Wizard.

  3. Complete all the steps that are required by the wizard, and then click Finish to exit the wizard when installation is completed.

  4. Click Start, click Control Panel, and then click Programs.

  5. In the Programs and Features area, click Turn Windows features on or off.

    If you are prompted by User Account Control to allow the Windows Features dialog box to open, click Continue.

  6. In the Windows Features dialog box, expand Remote Server Administration Tools.

  7. Select Hyper-V Tools from the features (As shown in the snapshot below), and then click OK.

image

Above steps will install Hyper-V Manager on your Windows 7 box. Just fire up start menu and type “Hyper-V” to launch it.

Note: Note that Windows 7 is a client operating system, so you will not be able to create VMs on your windows 7 box but using Hyper-V manager, you can connect to other Hyper-V server and manage VMs on those servers.

April 16, 2011

How to embed Excel document on your website

It is a very little known fact that you can use Office Web Applications to embed either entire excel document or part of it (Like just a chart) on your web page.

As an example, I have posted just a chart from my excel file below.

 

Step by step instructions are here, and somewhat advanced information about how to customize whats shown in embedded area is here. Those embeded sheets can even  be interactive like one below,

How to change Recent Posts or Drafts location in Windows Live Writer

I think Windows Live Writer is the best tool available out there for Blogging on Windows Platform. I’ve been using it from the very first beta version and have seen it improve a lot since its inception. One of the features I like about WLW is ability to go to any past post and modify/add content in it. Also, the UI is designed in such a nice way, it makes it very simple to open recent posts using Live Writer main menu. Internally the way this feature works is, all recently posted blog articles are saved as *.wpost files in C:\Users\<user name>\Documents\My Weblog Posts\Recent Posts folder. It is a very good feature. But as we use more than one machines in our day to day life, recently posted article on one machine doesn’t get available to another machine. There is an option to open recently posted items from Open menu but its little bit time consuming.

Anyways, ideal solution according to me would be that anytime I post a blog article, wpost file for that article should be there on all my machines. Well, I’d like to use Dropbox to sync wpost files to all my machines but the problem is Windows Live Writer does not allow you to customize the folder where it saves those wpost files.

I recently found a hack while reading a forum that there is a key which if you set, you can customize the folder where writer will store/load the wpost files. The Registry location is as follows,

HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer

Create a string “PostsDirectory” and set the value to path where you want to save wpost files (In my case, I’ve set it to a folder in my Dropbox folder)

image

 

Next time I want to modify or add content to any of my previous blog post, I just need to open wpost file for that blog post from my dropbox folder. No matter what machine I want to do that from!

January 31, 2011

How to disable Accelerators Feature in Internet Explorer

I know this is not a big deal but I wanted something to learn how to record my screen using new version of Communicator (now called “Lync”). Hope it will help someday somebody!

December 27, 2010

How to view files inside MSI and extract them

Recently, I had an MSI file that I wanted to crack open to see what are the contents of it because I wanted to check some files out even before running the MSI (before doing installation). There may be other ways to do this, but I found this slick way to do this and thought of sharing it here.

We can use the tool called Less MSI to do this very easily. Following is a snippet from the project home page to give an idea about the tool. You can download the tool from here for free.

Features

Windows Explorer Integration

Lessmsi also integrates with Windows Explorer so that you can right-click on a Windows Installer file (.msi file) and select "Extract Files" to extract it into a folder right there:

Just select Preferences from the Edit menu to enable (or disable) the explorer integration:

GUI

In addition to allowing you to extract files from the command line and from inside Windows Explorer, lessmsi has a graphical user interface that allows you to view detailed information about any MSI file.

MSI Table Viewer

Windows Installer (.msi files) are based on an internal database of tables. Lessmsi features a viewer for those tables. Useful for people who work a lot with installers.

July 10, 2010

How to watch YouTube videos in VLC Player

I love VLC Player. Its simple yet powerful and it can do many things that other media players cant do still its very quick. One of the VLC Player’s hidden gem is that it allows streaming of Youtube videos. That means you can watch YouTube videos without downloading them fully and skip any advertisements that new YouTube shows when you watch the thing on YouTube site.

The reason one would like to use VLC Player to watch YouTube videos is because you get benefit of VLC player like,

  • Adjusting audio/video delay
  • Adjusting speed of play (in case if you want to see the video in faster/slower mode – I personally like to watch things in little bit faster 1.20x, gives me feeling of saving some time)
  • Ability to watch videos on full screen on TV (I connect TV with Laptop through HD) while doing something on the laptop. YouTube player doesn’t allow you to do this.

 

So, in order to stream any YouTube video in VLC Player, all you need is URL of the video (something like http://www.youtube.com/watch#!v=Mmh6hhNIPYE), then follow the below mentioned steps.

Choose “Open Network Steam…” from Media menu in VLC Player.

image

 

Enter the URL and click Play.

image

And it starts playing the video in Streaming mode! Amazing!

September 30, 2009

How to convert Real media file to MP3

I recently had to find a way to convert Real Media files to MP3, thought I would share it here (just in case if I forget in future, I can refer back!)

  1. Download Boilsoft RM to MP3 Converter (24$)
  2. Download Real Alternative (Free)

That’s it! Convert all your RM to MP3 files.

 

Stay tuned..

September 13, 2009

How to download YouTube video…

I recently came across very nice full length Gujarati Play uploaded on Youtube (by the copyright holder) and was trying to figure out how to download those videos on disk, and came across this nifty trick, which is not only fast, but simplest of all.

Steps to download Youtube video is as follows,

  • Open the video on Youtube.
  • Go to Addressbar in the browser and change the URL’s domain part from Youtube.com to KissYoutube.com. So, for example,
  • All you need then is Java installed on the machine (if its not installed, there is a link on the kissyoutube page which lets you download the Java)
  • Once Java is installed, click on the green button and video is downloaded in FLV format.
    • To open FLV videos, you will need special player, the KissYoutube page has FLV player setup download link too.

Very neat!

Stay tuned..

June 28, 2008

How do I.. create my blog with my own domain name for free?

It was before few days, when I got an email from Hyperwebenable.com that they have been watching my blog for some time and would like to offer me a free domain name (.com/.org/.net/.info anything) that I would like and host it on their servers. They would show two banner ads on all pages that I show in exchange of that..

I went ahead with the offer and just got http://jigar-mehta.com

I am still in the process of setting it up and their administrator is working with me to allow me setup everything I want (Right now, I am enabling google talk/jabber chatting on that domain with email and calendar through google apps). Once I am fully done with new domain, thinking to transfer to the new domain! (though, for some time, I will continue cross posting..)

If you want to get your own domain name for your blog, go ahead and tell them about your blog..
http://tinyurl.com/3rryao

Shifting the blog got me in touch with Wordpress once again (my domain blog is wordpress based).. I feel like, wordpress is much more better than blogger! But anyways, blogger has got some pros too!

PS: Though they have not yet enabled advertisements on my blog but I guess they will do that in future!

Stay tuned.. Wave

June 25, 2008

How do I.. Keep my files synchronized between multiple machines..

This is the issue faced by many people using more than one computer/devices.

Well, at the same time there are multiple services out there in the cloud that tries to solve this issue..

I have used following services which can solve this issue..

  1. Windows Live Foldershare
  2. Microsoft Live Mesh
  3. DropBox

Dropbox and Live Mesh are still in private beta where you need an invite to join the service. Windows Live Foldershare is in beta but anybody having Live ID can join.

I am running out of Live Mesh invites right now, but I have few DropBox invites available.. If you want, leave a comment with your email id, will send one!

Stay tuned.. Wave

June 18, 2008

How do I.. “Download new wallpapers from internet and change desktop look automatically”

If you are using Windows 7, use this theme which downloads wallpapers dynamically from Microsoft servers (those which featured on Bing.com homepages).

Stay tuned.. Wave

June 7, 2008

How do I.. "Keep my notes accessible everywhere"

The problem is:

  • How to keep my Notes accessible everywhere! Such that,
    • If I am at my desktop machine, I can access them with just one click! (without opening any website and logging in!)
    • If I am roaming with my own laptop, I should be able to access / add / work with my notes over there, with just one click!
    • If I am outside and dont have access to any of my machines, I should still be able to access my notes and work with them!

Introduction:
I have been facing this problem from a long time! I tried many solutions! but none of them could make me speak "Perfect! Thats what I want".. So, search continued.. And just before couple of months, I read a blog post saying "Evernote is designing WebService based client as a next version!"

I had used Evernote previous version v2.0 which was not-so-effective for me! But this new version, Evernote v3.0 seemed interesting! I wanted to hear more about it so, followed Evernote on Twitter, Subscribed to their RSS and registered for Private Beta access for their new system! I did study with all that was available at the moment and found Evernote 3.0 can become Perfect solution for what I was looking for!

And one good day, I got access to Private Beta.. (Its still in private beta, if you need access, let me know)

Solution:

  • Evernote 3.0 has Three main components..
    • Desktop Client
      • They have Clients compatible for both Windows as well as Mac.
    • Web Client (Access it here)
    • Mobile Client
      • They have Client compatible with Windows Mobile as well as iPhone. (Though, iPhone Client is still in Development.. having iPhone SDK still in beta.. I think they will release it once SDK is fully released).
  • How it helps for the problem in discussion..
    • Desktop client can be downloaded and installed on windows and mac. After installation, You give your unique account credentials where your notes/images/snapshots will be stored.
    • This data is stored both locally as well as on the cloud.
      • Evernote provides 200 MB of space to store this data in Free Account, but I have heard they have Premium model as well.
      • It will automatically synchronize the data on all all your devices (be it PC, Mac, Windows Mobile, iPhone, Web).
      • By default your notes are Private (only you can see), but if you want you can also make them Public so Everybody can see them!
    • You can also add a note by sending an email to your 'special evernote email account!' As simple as that!
    • Most important feature of Evernote is, It can search for Text within Images (which has proved to be a life saver for me!)
      • Say for example, you take snapshot (PrintScreen saved Snapshot) of your computer screen and add it to Evernote, it will be able to search for text from that snapshot!
      • If you have taken a snapshot from your mobile phone for a product which had description written, you can search text in that photo!
    • In case, if you dont have access to your computers and want to access your notes in emergency, you can enter secure area of Evernote Website, provide your credentials and Voila! You get access to all your notes, search them, edit them and remember, all your devices are automatically in sync..!
  • Usability in desktop software!
    • They have got one of the best designed Desktop Client (I have tried on Windows)
      • You can tag, annotate, write notes with Ink, Group by various attributes and search your notes from desktop software! UI is designed with great ease.
    • They have a tiny application called Universal Launcher which is small but powerful app.
      • If you are in any application (be it Outlook, Notepad, Word or Browser.. anywhere).. You select any text and press "Win + A".. That will automatically add selected text to your Notebook in evernote! Just one keystroke! (I love this feature!)
      • If you dont have text to be added, you want to take a snapshot of your screen and add it to your Notebook, you can press "Win + PrintScreen" which will allow you to select area of screen to be clipped and once you are done, that will silently be added to your notebook!
    • They also have an AddIn for Outlook. Which will help you add your email message to Notebook with just one click!

I can just say one word after using Evernote.. "Perfect!!" My search stops here! I have been using it from few months and have got dependent on it!! It has saved me a lot of painful hours looking for information.. My account summary on Evernote website says (I have appx. 675 notes stored in my evernote account with lots of them Snapshots/Images!),

image

I think this is one of the S+S system which I dont have any suggestions for! Its truly Perfect! Infact, the icon they have chosen for Evernote is also cool!

image

Happy Evernote'ing.. Happy

Stay tuned.. Wave

How do I....

I was just thinking about starting a new category on this blog, named "How do I.." (like, I have another category, "How would it be.." where I write about my Design Ideas to improve a produce or service)

As the name "How do I.." suggest, my main goal is to share basic usage information about different software/system! (be it a website or software or device !!) I will start with a unique problem to be solved and will probably note down one or more solutions to it. Probably you will also find some of them as cool as I do!

I will write some post in this category shortly!

Stay tuned.. Wave