Posts

Showing posts from March, 2013

Yahoo! Weather report for India

Image
In my last post I showed  how to find weather information for a place based on its WOEID using YQL & Yahoo! Weather API . The Yahoo! API will get you weather info for ANY place that has a WOEID - including a country. How do you generalize weather conditions for a country as big and diverse as India? The current conditions description (Smoke!) made me chuckle. Also see: JavaScript: The Good Parts - photo gag "Had to scramble to get dressed when someone wanted video on a call." The trouble with Kindle is...

HOW TO find weather information for a place based on its WOEID using YQL & jQuery

There are many free Weather APIs that can fetch your weather details for a location but if you had to fetch it based on WOEID , you can turn to  YQL or the Yahoo! Query Language & Yahoo! Weather API . Interestingly, unlike other free Weather APIs, YQL can also return JSONP results over HTTPS. Here's the code (from  my first GitHub Gist ) - The default unit of measurement of the temperature in the results returned by the API, is Fahrenheit. You can specify "c" or "f" for the unit parameter to get results in Centigrade and Fahrenheit respectively. Note that lower-case "c" or "f" has to be used. Also see: Screen scrape with jQuery, AJAX, JSONP & YQL How can I bulk query the Yahoo Weather API for more than one location at a time? StackOverflow Yahoo Weather API, YQL Q & A

HOW TO play videos from mobile YouTube on your desktop Firefox browser

Image
If want to check a YouTube video without waiting for it to buffer while you're on a low bandwidth Internet connection or just want to preview a video quickly on a decent connection, you can try out the mobile version of YouTube. However, the videos on m.youtube.com use the Real Time Streaming Protocol (RSTP) to show videos in 3gp format so it won't normally play on a desktop browser. You can copy this URL to play it in VLC Media Player. Alternatively you can use the  Vlc context menu Firefox add-on  to the add URLs of  mobile YouTube video files to VLCs playlist via the context menu of your Firefox browser. Open m.youtube.com in Firefox and search for the video  you want to watch. After you locate it, right click on the Watch Video link & choose Add URL to VLC Playlist option Is the Vlc context menu Firefox add-on safe to use? I don't know. It has been in the Mozilla Add-on directory since August, 2010 with 7 user reviews and 30K+ users so it's probably sa

The many uses of Virtual Machines

My first experience using a VM was with a Virtual PC VHD that Microsoft offered to test IE. Over the years, I've worked with VMWare Player and Hyper-V virtual machines and I love the convenience they provide - so much so that whenever I start a major project, I prefer having a new VM. For those that have not experienced the joy of VMs, here is a list of its uses: * Save time on environment build-outs - building a development environment from scratch can be a time-consuming affair. With a VM ready, you can instead focus on real work and never worry about any rogue software messing up your environment. With a backup of that VM in hand, you lose no time in getting up and running again. * Testing new software without disturbing your host environment - whether its beta software or a version of a software that cannot parallely with what's already on the host OS, VMs help you play safe. * Manage hardware crunches - when you don't have the luxury or budget to have physical

HOW TO find the latitude, longitude of a location based on WOEID

Yahoo! has devised a unique identifier called the Where on Earth ID, or WOEID - for almost any named place on the Earth. This is used by APIs like Twitter Trends , flickr etc. However, a majority of geo-location related APIs require latitude, longitude of a place to provide their services. So if you're building a mash-up that has to deal with latitude, longitude and WOEID, you can resolve a WOEID to a place with this call: http://where.yahooapis.com/v1/place/2507854?appid=[YourYahooAppidHere] Replace, 2507854 in the above example with the WOEID of the location whose co-ordinates you want to find. The results can be requested in XML or JSON format.

SQL Azure Q & A - 1

The Stack Overflow forum's Azure section is a great place to know about real-world issues and find answers to them. As part of my learning, I plan to collect short summarized answers of questions that I find useful, for quick reference - Q.  What is the difference between the Web Edition and Business Edition of SQL Azure? The two editions are identical except for capacity. Both offer the same replication and SLA. Web Edition scales from 1GB to 5GB, whereas Business Edition scales from 10GB to 50GB in 10GB increments, plus 100GB and 150GB. Q.  How to change maximum capacity or edition of a SQL Azure database? To increase (or decrease) capacity - ALTER DATABASE Test MODIFY (EDITION='WEB', MAXSIZE=5GB) To switch to the Business Edition - ALTER DATABASE Test MODIFY (EDITION='BUSINESS', MAXSIZE=10GB) You can also change the size of the database through the Azure SQL portal. Simply choose the database and go to the scale tab and select the size you want.

Search for free eBooks from the Google Books collection

Image
I & my wife have a fascination for Web APIs that return results in JSON or JSONP format. We wrote a web app that simplifies the process of downloading ebooks from the Google Books collection that are free using the  Google Books API  after we noticed that Google Books doesn't readily show if a out of copyright book is available for free download in PDF or EPUB format. You have to go through multiple steps using Advanced Search to find this. Luckily, Google provides a Google Books API that exposes this information and it returns the results in JSON format so anyone can build a interface to access just filtered details. Though the books are free & old, they are invaluable, especially if you love books. You may not be able to get a physical copy of some of them even if you wanted to. Here is a list of books that I found and liked. The H5BP template's view for Mobile The app uses a responsive HTML5 Boilerplate template generated using  Initializr . Some ot

Big Data and Machine Learning make protecting your online privacy even more challenging

Image
Your personal details are safe only if the people you've shared it with also realize the importance. With the cost of computing power and storage drastically coming down, it's getting cheaper & easier for social media to entice you and your connected circle into revealing personal information to forward their commercial interests by breaching your trust. image from Google Play TrueCaller is a mobile app that will show you the name of a caller that's not already on your mobile contact list. The app's website claims that it is a collaborative  global phone directory with over 700 million numbers. Don't be surprised if your carefully guarded phone number is in their database. The novelty of finding the identity of an unknown caller may have suckered someone known to you to give away their contact list that includes your number. Thanks to Big Data and Machine Learning, the individual datapoints (phone number, date of birth etc) can be aggregated to pain