Posts

Showing posts from November, 2014

This Week I Learned - Week #86

Image
This Week I Learned - -  On October 28th, W3C officially recommended HTML5 .  The W3C has declared HTML5 done and is moving on to HTML5.1, which will include all the features that didn’t make the first cut.  -  The W3C has been meeting for twenty years, led by its director, Tim Berners-Lee, the principal creator of the Web. Its membership is drawn from close to four hundred academic, not-for-profit, and corporate organizations. Among its most engaged participants are large companies that build Web software and host enormous Web sites—ones like Google, Microsoft, and Facebook. They all pay dues for spots at the table—sixty-eight thousand five hundred dollars a year for the biggest U.S. firms -  We still call Web pages “pages,” but many of them are actually software applications—“apps” -  The Web is a Millennial . It was first proposed twenty-five years ago, in 1989. -  Apple.com has one HTML5 validation error . The New York Times has a hundred...

Show off your book collection with this AngularJS script & Google Spreadsheet

I'm a book lover and I have a size-able collection of books, many of which I've left incomplete or unread. To save on storage space, I've been buying ebooks & Kindle books. While learning AngularJS, I thought I should build a webpage to track the books I have as they are in scattered & in different formats. Having discovered that data stored in a table in Google Spreadsheet can be exposed as a JSON feed, I'll being using that as my back-end . I'll keep adding or deleting books and it will reflect on the web page instantaneously. The table to store my books has just 2 columns - the book name (cell A1: bookname) & Amazon's unique identifier for the book, ASIN (cell B1: asin). I use the ASIN to generate an image for the book as well as append my affiliate id to that book's page on Amazon. Here's how the finished page looks now (with a small set of my books). Evidently, there is some work left to do with the CSS. The entire page is less ...

reCAPTCHA MAY let you through even if you get part of it right

Image
CAPTCHA or Completely Automated Public Turing Test To Tell Computers and Humans Apart , is a technique to stop bots from signing up for online accounts or automatically filling up forms. It works on the assumption that Humans can understand distorted text presented in a CAPTCHA image but not bots which may have a basic training in OCR (Optical Character Recognition) A Stack Exchange forum user found out that he could get past the CAPTCHA barrier even though he didn't type the last character  in the distorted text that is shown. Stack Exchange uses  reCAPTCHA - Google's implementation of CAPTCHA . I don't agree with Google  when they claim " Our easy CAPTCHAs are a breeze for legitimate users. " Also see:  Lazy-Developer-CAPTCHA Text Extractor Bookmarklet

HOW TO bulk archive a web page along with linked pages in PDF format - needs IE

Image
Imagine this - you're in the middle of an interesting online article and you have to turn off your computer for some reason. You can choose to save that web page as a PDF but what if that page contains linked articles that you want to read as well? Internet Explorer has a option called Print all link documents If you have a PDF printer utility installed, instead of send those files to a printer you can print a selected web page and the linked files as PDF files in a single shot for offline reading. I found it strange that the Foxit PDF Printer doesn't make the links clickable whereas you can click on links within a PDF generated by Chrome. On a related note, to export the URLs of the open tabs of a Firefox window to go through later there is a nice convenience in Firefox. Under Tools > Options , in the General tab look for the Use Current Pages button in the Startup section. When you click on the Use Current Pages button, all the URLs of the pages open in diff...

This Week I Learned - Week #85

Image
This Week I Learned: - Difference between Visual Studio Express Editions & Visual Studio Community Edition:   ~ VSE does not allow users to use extensions (aka. plugins).  There are over 5000 great plugins for Visual Studio in Visual Studio Gallery. With Visual Studio Community (similar to Professional) Edition, you can access all of them   ~ There are 3 different Visual Studio Express Editions targeting specific platforms. Visual Studio Community Edition lets you develop projects targeting cross-platforms. - Google Spreadsheet has a feature to scrape a specific portion of web pages using the ImportXML() formula. Firefox and Chrome Developer Tools can easily generate the XPath for a selected element which is a required parameter for ImportXML. -  Some of the video tutorials on Microsoft Virtual Academy are also available on Channel 9 . Channel9 shows the file size of videos in different formats. If you're looking for the lowest sized file, you...

HOW TO use a Google Spreadsheet as a read-only database for a web app

Image
The data in a Google Spreadsheet can be accessed in JSON and JSONP format through a URL .  The trick is to extract the key from a spreadsheet's URL (the key looks something like this - 0AtMEoZDi5-pedElCS1lrVnp0Yk1vbFdPaUlOc3F3a2c ) and place it in the position indicated in the below URL: https://spreadsheets.google.com/feeds/list/ KEY /od6/public/values?alt=json-in-script&callback=  This approach can be useful when a limited number of people manage a database but when it has to be publicly viewed by users of a website. You can even use Google Spreadsheet formulas (like ImportXML()) to create dynamic values for a column. So if you have data in a Google Spreadsheet whose schema is defined by the names in the first row, it is possible to get that data as a JSON feed and use it to programmatically display the list on a web page Retrieving a feed without authentication is only supported for published spreadsheets. On a related note - Microsoft too has an API tha...

Notes from the MVA course "Fundamentals of Visual Studio Online"

Image
The Microsoft Virtual Academy course Fundamentals of Visual Studio Online  is a level 300 course that provides an high level overview of Visual Studio Online (VSO) in less than 2 hours. I wish it also dwelled a little on Process templates & covered best practices. Notes from the course and elsewhere - - Visual Studio Online is a cloud-based platform of tools and services that helps you plan, deploy and manage your application. - VSO competes with Github.  GitHub lets developers work for free with public code repositories but there is a charge for those who want to work with private code repositories.  It is possible to migrate a project from GitHub to Visual Studio Online - VSO is free for the first five users and it is an included benefit for MSDN subscriptions. - VSO offers cloud-hosted application lifecycle management (ALM) as a service. It provides TFS (centralized) and Git (decentralized) source control systems . - Visual Studio Online isn't...

Search all your ebooks with a keyword by putting them on Google Drive

Image
If you research a lot and have a large collection of ebooks, you can search within those books first  before hitting the Web to search from external resources. If you upload these ebooks onto Google Drive, it will index the content for you. So when you have to search with a keyword, instead of searching each ebook individually you can use the search box within Google Drive. Google Drive was able to fetch results for a specified keyword from an uploaded ebook, even though I didn't ask for it to "Convert text from PDF and image files to Google documents". The "Convert text from PDF and image files to Google documents" feature only works PDF files less than 10MB in size. I found it annoying that Google doesn't validate the file size immediately upon upload but rather accepts the upload & then informs that it cannot convert thereby wasting bandwidth.

This Week I Learned - Week #84

Image
This Week I Learned: -  The beta of Netscape version 6.0 was released almost three years after version 4.0 - an awfully long time in the Internet world. There never was a version 5.0 . - Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever intentionally backwards incompatible Python release. -  toastr jQuery notification plugin was simple to setup & deploy compared to iGrowl as it doesn't have too many dependencies. The CSS & JS files for toastr are available on CDN JS . - The 219 million mobile-only users now make up close to 20% of Facebook's total user base. - Facebook mobile advertising now represents 41% of its overall ad revenue. - The Building Apps for Windows blog recommends optimizing apps to run on low memory phones, with 512MB or less, as these devices generate roughly 60% of phone downloads . - The ISO-8601 Date format: YYYY-MM-DDTHH:mm:ss.sssZ is supported by JavaScript. It is endorsed by W3C, RFC3339 & XKCD ...

Transform JSON field names in feed to match FullCalendar jQuery plugin's Event object format

FullCalendar jQuery plugin can help you show your own events in a calendar when the event data is in a specified format. If your JSON feed data follows a different schema, FullCalendar has a way for you to adapt the field names to match  FullCalendar's Event object format. The following snippet shows how a Azure Mobile Services generated data feed can have its field names modified so that it can be be hooked to FullCalendar. While you navigate across months in the calendar the relevant data will be pulled automatically. Link to code snippet on Github Gist In the snippet, start and end dates are UNIX-style dates. For the Azure Mobile Services endpoint to understand the date, it is converted to ISO 8601 format with the JavaScript  Date object's  toISOString() method.

Date Picker for FullCalendar event calendar plugin

Image
FullCalendar is a promising jQuery-based event calendar plugin. It has comprehensive documentation , its own tag on StackOverflow forums , responsive UI, and its library is hosted by CDNJS  (so you don't have to host it on your own server, if you so desire) For navigating across days, months and years, you'd have to go in small increments; you can't jump across months and years with a few clicks. However, jQuery UI DatePicker can be integrated with FullCalendar. I put together a working sample from a snippet that I found online

Nature stories from the book "The Case of the Bonsai Manager"

The book The Case of the Bonsai Manager uses a number of Nature stories and correlates them with Management topics. Some of the fascinating biology facts excerpted and paraphrased from the book: - A vervet monkey categorizes its predators and gives suitable signals to other vervets - The human brain is under three percent of the body weight but consumes a quarter of the energy used by the body - The neo-cortex or the "cabbage part of the brain is the repository of complex emotions. For example, it can hold multiple and opposite emotions simultaneously. This is why you can hate someone's guts, yet appear polite and loving towards him. An animal cannot do that. It either loves you or hates you. Dogs are loved because they cannot feel one way and behave another way towards you; they always appear faithful in exactly the same way. - The growth of a crocodile can be stunted by confining it to a small enclosure soon after it has emerged from the egg. Bonsai crocs are creat...

This Week I Learned - Week #83

Image
This Week I Learned: - A  Google Spreadsheet can be used as a JSON backend - The creator of the open-source Chrome extension, Postman , which is a great tool for testing REST calls,  is Abhinav Asthana of Bangalore, India -  Google fields over 100-billion search queries every month, a service which generated most of its $55 billion (Rs 3.3 lakh crore) revenue in 2013. Google Voice Search now supports Hindi. -  The Wordament game serves the same word puzzle on Android, Windows Phone, Windows 8. I was under the impression that a different puzzle is served for each platform. -  The Indian Railways has 11 different types of quotas for different categories . If the intent of Indian Railways is to make profits like private airlines with the new quota category "Premium Tatkal Quota" and dynamic pricing of tickets, I wonder why this entity shouldn't be privatized and run more professionally. - Foreign institutional inflows (into India), includin...

My experience with Azure Mobile Services

Image
Impressed with the way the MVA (Microsoft Virtual Academy) SPA (Single Page App) tutorial uses the WAMS (Windows Azure Mobile Services) feature of  back-end as a service , I've started using it for a simple hobby project. While building it, I had to go through several interesting articles to fill the gaps in my understanding of Azure Mobile Services that were specific to my project. Rather than add the bookmarks to the existing pile, I thought I should organize the facts for easy future reference - The code name for WAMS prior to its public release was Zumo . That explains why header keys have Zumo in them. - Azure Mobile Services should have been called "Backend in a Box" or "Azure Backend Accelerator" . - Rather than creating your own RESTful service with CRUD (Create, Read, Update, Delete) to return JSON stored in a database, you can show Mobile Services what your data should be shaped like and it lets you query it dynamically - You can use Fiddler ...

Bug bounty programs of Indian websites & others open for Indians

Paytm started off as a site that offers online recharges for mobile phones but now provides a online bill payment service for public utility services as well as online shopping. As per this Quora thread there aren't any bug bounty programs in India but Paytm appears to be among the first to offer an incentive for researchers to report bugs on their site . * Paytm expects researchers to find bugs only within the scope below: - Remote code execution - Cross Site Forgery Protection - Cross Site Scripting - Cross-Site Script Inclusion - Flaws in Authentication/Authorizations - Denial of Service ..and highlights the things it does not want to receive: - Personally identifiable information (PII) - Credit card holder data * OYO lists areas in scope for a bug bounty *  Mobikwik has a bug bounty program  for all their Web and Mobile application platforms. The minimum bounty they offer is ₹1000 With the growing popularit...

A quick way to check latest values of Sensex, Nifty, Gold, Silver, USD-INR currency

Image
I occasionally like to catch up on how the Indian stock exchanges are faring. I like the Economic Times newspaper website for its brevity and focus on facts & numbers. The homepage of their website is quite bulky with lots of ads, so I started using their mobile version of their site as it loads faster - m.economictimes.com Most of the times, I'm just interested in the indices. I realized today that I can just look at their continuously updating JSON feed -  http://json.bselivefeeds.indiatimes.com/homepagedatanew.json The data is less than 1KB. Though it has poor readability, I get what I want pretty quickly. I also discovered that there are plenty of online JSON Viewers that present information as a tree view. While I found some online viewers that were open-source and could load a public JSON feed URL , I could not find any online viewer that could handle JSONP and  strip everything outside the main opening and closing braces like function name, commen...

This Week I Learned - Week #82

This Week I Learned: -  Azure Websites supports direct integration with CDN . A typical CDN URL will look like this: http://<CDNNamespace>.vo.msecnd.net/ - To use jQuery in Node, browser extensions, and other non-browser environments, use only 2.x releases. 1.x does not support these environments. -  iGrowl is a lightweight jQuery plugin that generates growl-like notifications with an emphasis on icons. Alerts are fully responsive and CSS animations are used to provide optimal performance. - Developers at Google built AngularJS and  Polymer . The creator of jQuery, John Resig, is a former Mozilla engineer. -  A YouTube uploader can track if viewers have watched a video completely . -  Amazon India has exceeded gross merchandise sales of more than $1 billion within a year of launching in India. - Rather than apologize that a demo may not work during a live presentation, you can say something along the lines of what Jon Galloway says in the M...