Showing posts with label HOWTO. Show all posts
Showing posts with label HOWTO. Show all posts

HOW TO delete an email address from GMail auto-complete list without deleting Contact

Supposedly friendly features like spell-check & auto-completion can be a bane sometimes. Imagine if your boss & best friend share the same name & you excitedly send a very private message to the boss instead of the friend because GMail cleverly fills the email address while you type a few characters of the name. If such a scenario rings a bell, here is one option to prevent GMail from supplying names you don't want to see in the email auto-complete list that appears while composing a mail.

The easy way is to delete the contact. But if you want to prevent an email address from showing up in GMail auto-complete list when you try names in the To:, CC: or BCC: fields, then you can consider moving the email address from the Email field in the form for that Contact to the Notes field.
click on image to enlarge

Read More

HOW TO block images/image ads originating from a specific domain in Firefox 4 & above

Firefox 3.x used to have an option to block pesky images that were not part of the context of page that you were viewing - like image ads. You just had to right click on the image, & select "Block images from {domain serving the image}" to never see any images from that domain again. That context menu option is missing from Firefox 4  & above.

It turns out that it is still there but there are some additional steps to reach it. Right click on the image on the page you are viewing in Firefox & from the context menu, you have to select View Image Info & click on the checkbox "Block images from {site name}".
Thanks RalphB


Also see:
HOW TO block IFRAME based ads
Read More

HOW TO check what HTML5 features a browser supports

Now that I'm getting my feet wet in HTML5, I thought I should spend more time with features that are supported by all popular browsers rather than digging into HTML5 features that are implemented by only one or two browsers.
Table showing browser support for HTML5 Input types from W3Schools.com
I noticed a nice demo by Craig Shoemaker in the Pluralsight HTML5 Fundamentals course on feature detection with Modernizr that lists all supported features. Not finding any readymade sample similar to his script after some googling and lazy to write it on my own, I tweeted him to ask if could share his code.

I appreciate that he did and I got it working locally after tweaking the CSS a bit to ignore a few images that he had used in his slightly old (it uses Modernizr 1.6) original code. I hope to work on it further while I learn more about HTML5 & Modernizr.

Meanwhile, here is the HTML5 Feature detection script using Modernizr 1.6 (red indicates a feature is 'not supported' while green means 'supported')

Update: haz.io & the Modernizr Test Suite  show a much larger list of HTML5 features supported by a browser opening their test page.

Browserscope compares all browsers on supported HTML5 features in a single page. I wish the first row & column of the table there were frozen for better readability.
Read More

HOW TO see how your web pages are ranking in realtime

Google tells us not to focus on PageRank or “PR”, the famous part of their ranking algorithm, as a metric for success. It acknowledges that PageRank being a number is easier to measure than relevance which is what actually counts. Google removed PageRank distribution data from Webmaster Tools but if you still want to see in real-time how your web pages are faring, use StatCounter analytics.

Note that the Search Rankings vary when searches are conducted from different parts of the world and at different times. The ranking you see displayed in your StatCounter account is the actual rank position that your visitor saw (for your web page) from the location they are in, at the time they did the search.


Currently, this information is only available for some Google searches so you will not see a ranking beside every Google query or beside non-Google queries.


In Google AJAX SERPs (Search Engine Results Page), when you click on a link Google redirects you to the search page and also passes some referrer information that analytics providers can use to track rank. For example, the cd= parameter contains the exact ranking position of the search listing within the SERP -
http://www.google.co.uk/search?sa=t&source=web&cd=4&ved=0CEk.... [trimmed]

This is possibly the method that StatCounter uses to identify the rank of a page.

Related:
Comparison of free Web Analytics tools
Read More

HOW TO export Contacts from a LG CDMA Mobile to newer phones

I recently needed to copy Contacts from a LG-Reliance CDMA Mobile handset to a GSM smartphone. After a bit of monkeying around with the available options, I found that you can copy Contacts to the CDMA SIM.




I inserted the CDMA SIM into the GSM smartphone and could successfully copy the Contact details to the smartphone.

Read More

HOW TO detect unused CSS style definitions

As your web app project & the team size get larger,  there is a chance that the CSS style definitions within the stylesheets grow uncontrollably due to lack of coordination among the developers. This could lead to duplicate style definitions & gradually this could impact web page performance.

Luckily, there are tools to detect unused CSS selectors per page & weed them out manually -

  • Dust-Me Selectors is a Firefox Extension (Firefox version 4 is not currently supported) that scans all the definitions inline & within external stylesheets and reports the unused ones.
  • Audit tab within Google Chrome Developer Tools (Ctrl+Shift+I) lists unused selectors as part of its performance recommendations 



Also see:
HOW TO cut & paste just the text in a browser, not the formatting
Read More

HOW TO try Windows Azure for free (without any credit card)

Windows Azure, Microsoft's cloud platform offers .NET developers a great opportunity to extend their skills to this new platform. You don't have to spend a bomb to get started. While there is a free trial offer that doesn't have any upfront costs, you may have to submit your credit card.

The free Windows Azure Platform 30 Day Pass doesn't need a credit card to register. I've seen promo codes that are needed to get a Pass in various MSDN blog posts & Codeplex. The promo codes don't last forever so you may have to grab them when you see it or keeping looking at those places for new promo codes if you want it gratis.

Here are some free Azure learning resources I've found (work in progress):
Pluralsight currently has 5 Beginner & Intermediate level online training courses of totally 15 hours duration. Having received an annual subscription as a Pluralsight offer for MVPs, I've watched some of them & found them to be very helpful (will post a review shortly). Their monthly subscription price of $14.50 or roughly Rs. 700  in India for their entire course collection looks like a great deal to me.
Read More

HOW TO study (or copy) code related to JavaScript effects from websites you envy


To build web apps with a great UI, its ok to draw inspiration from the best sites on the web. Sometimes the good-looking websites with great JavaScript effects may obfuscate their code knowingly or unknowingly or the code may be difficult to understand by just viewing the HTML source. 

Visual Events is a nifty bookmarklet that shows the events attached to each of the elements in a webpage. The keyboard & mouse events are represented as icons & when you mouse over any icon the source code related to it is shown. This is helpful because on JavaScript intensive sites you don't have to rummage through the entire source to find a small code block that you need.

For instance, when you mouse over a Tag button on the StackOverflow site, it shows a tooltip

If you call the Visual Event bookmarklet while this page is loaded, you will see this icon  over the javascript Tag button  indicating that there is a mouseover event attached to it. The complete mapping of icons & their corresponding events is listed on the Visual Event bookmarklet's homepage. When you hover your mouse pointer over the icon, the Visual Event bookmarklet scans through the source code & fetches just the code corresponding to the javascript Tag button's mouseover. The code window also informs that this particular StackOverflow webpage uses jQuery version 1.5.1 

Click image to enlarge 
This bookmarklet can detect event handler code that is written using one of these libraries -
  • DOM 0 events
  • jQuery 1.2.x +
  • YUI 2.6.x (2.x might work!)
  • MooTools 1.2.x
  • Prototype 1.6.x
  • JAK (Events 2.2)
  • Glow
Visual Event is beta grade software. It doesn't currently work in IE

Also see:

Read More

HOW TO track time for multiple time zones in Windows 7 & Vista

In our highly globalized world, we may sometimes have to keep track of not just our time but also the time in other countries due to business reasons or to follow a live sports or event broadcast on TV that is happening in another part of the world.

Did you know, you can track the time in up to two countries/time zones besides your own, right from the system tray in Windows 7 & Vista?

To configure the extra clocks, click on the time in the system tray & within the dialog box that opens, click on the "Change date & time settings..." link.  In the new dialog box that opens, select the Additional Clocks tab & configure them to show upto 2 new clocks.

If just two are not enough for you, pick a gadget from the Windows Live Gallery, that can handle even more.

While the additional clocks cannot handle Daylight Saving Time(DST), the primary clock is intelligent enough to do the conversion for you.
Read More

HOW TO display Word, Excel, PowerPoint documents within the browser

If a Word, Excel or PowerPoint document (.doc, .docx, .xls, .xlsx, .ppt, .pptx formats) hosted on the web is accessed through a browser, it typically asks if you want to open or save the file. You can then view it if you have MS Office or the corresponding Word/Excel/PowerPoint Viewer (freely downloadable) installed.

To increase the reach of the content in those Office documents among non-PC/Mac users, you can use Google Docs Viewer to embed them within a web page. Google Docs Viewer now supports 12 new file formats including Excel & Powerpoint.

You can generate the HTML tag for the embedded viewer that you can paste into your own web page from the home page of Google Docs Viewer. You can alternatively use the example below to append the URL of the Office document to the url querystring of the service -

<iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fdocs.google.com%2Fviewer%3Furl%3
Dhttp%253A%252F%252Flabs.google.com%252Fpapers%252F
bigtable-osdi06.pdf&embedded=true" style="border: none;" 
height="780" width="600">
</iframe>


You can also tweak the dimensions of the embedded Viewer within the browser.
Embedded Viewer displaying an online PowerPoint file within a webpage

Read More

HOW TO cut & paste just the text in a browser, not the formatting

Typically when I have to paste formatted text within a rich text box of a web app, I paste it into the search box of the browser first to remove the formatting & then paste the un-formatted text in a rich text editor. What a pain!

I learnt from the WebApps StackExchange forum that in Chrome, you can use the keyboard shortcut Ctrl + Shift + V to paste the unformatted version of the copied text.

While monkeying around to see if there is any trick to make this work in browsers other than Chrome, I serendipitously discovered that  Ctrl + Shift +C opens Developer Tools in Chrome & triggers the Inspect element hotkey that shows a tooltip for a webpage element that you hover upon.



Also see:
Keyboard shortcuts common to Firefox & IE
Read More
HOW TO open your favorite set of websites in new browser tabs at once

HOW TO open your favorite set of websites in new browser tabs at once

Ignore this post if you live on the web & rarely turn off your computer.

On the other hand, if you have a favorite set of websites that you open everyday, you can automate the process of starting these sites in multiple tabs within a single Firefox window by using a Windows Batch file. To create such a Windows Batch file, open Notepad or any text editor & paste these lines -
@echo off
start firefox.exe "stackoverflow.com" "twitter.com" 


Change the URLs in the example to your own favorites & save the file with a valid name and a .bat extension.

Related: Setting Browser Tabs to Open at Start-Up
Read More
HOW TO sarcastically tell someone to google for their answer

HOW TO sarcastically tell someone to google for their answer

Before Google became popular, it was common to see the expression RTFM (or in polite terms, Read The Fine Manual) used in internet forums if a poster asked a question without doing any homework. These days it is more common to see messages directing such users to Google or Bing instead of the manual.

LMGTFY.com (the word LMGTFY represents the initial letters of "let me google that for you") is one among a bunch of sites that sarcastically explains how to use Google. It lets a responder create a shortened URL for a saved search query for a question that a poster may have posed without putting any effort to solve it by himself.

The popular Q&A site, StackOverflow discourages impatient responders from posting LMGTFY-like links.
Read More

HOW TO make Gmail Labels act like Hotmail Folders

If you apply a Label to an email in Gmail, it will appear under both the Inbox & the Label category chosen. This is unlike in Hotmail where an email can appear only under one Folder category.

To address this issue, Gmail introduced a "Move to" option that will place an email under a single Label or category. This option can help in maintaining a clutter-free, cleaner Gmail Inbox but requires manual intervention. A poster on the StackExchange Web Apps forum wanted to know how he can automatically filter emails on arrival so that they are placed under a single category as in Hotmail.

Here are the steps -
1. Click on the "Create a Filter" link that's next to search box in Gmail

2. As we want the filter to act upon ALL emails that are recieved, set the To: textbox to your own email address & click on the "Next Step" button


3. Choose the first option to Skip the Inbox alongwith "Apply the label:" option to move an incoming email to a specific label/category. This way every mail that you get will be automatically categorized, thereby simulating Hotmail Folders.


If you want to view all your emails uncategorized at any point of time,  click on the "All Mail" option in the left menu
Read More

HOW TO find readability level of search results & books

Google's “Instant Preview” lets you visually preview a search result page before you actually visit a page. A new advanced search filter called Readability level now lets you predetermine whether the result pages you want to see Basic, Intermediate or Advanced. I could not find details on what methodology Google uses to judge the readability level.

Amazon.com has been carrying a Text Stats feature in the "Inside This Book" section of most book-detail pages since a long time that can help you gauge the readability level of books.

They are calculated based on the following rating techniques  -

  • The Fog Index was developed by Robert Gunning. It indicates the number of years of formal education required to read and understand a passage of text.
  • The Flesch Index, developed in 1940 by Dr. Rudolph Flesch, is another indicator of reading ease. The score returned is based on a 100 point scale, with 100 being easiest to read. Scores between 90 and 100 are appropriate for 5th and 6th graders, while a college degree is considered necessary to understand text with a score between 0 and 30.
  • The Flesch-Kincaid Index is a refinement to the Flesch Index that tries to relate the score to a U.S. grade level. For example, text with a Flesch-Kincaid score of 10.1 would be considered suitable for someone with a 10th grade or higher reading level.

Read More
HOW TO use IIS 7.5 on Windows XP, Vista with Visual Studio 2010

HOW TO use IIS 7.5 on Windows XP, Vista with Visual Studio 2010

The free download IIS Express brings the IIS 7.x feature-set to Windows XP SP2+ (which comes with IIS 5) & Windows Vista (which hosts IIS 7). With the upcoming Visual Studio 2010 SP1 (a beta is now available), enabling integration with IIS Express will be easy. IIS Express will bring the best of both existing web server options in Visual Studio - ASP.NET Development Server & the native IIS.

The advantages of IIS Express paraphrased from Scott Guthrie's post -
  • IIS Express will work with VS 2010 and Visual Web Developer 2010 Express, will run on Windows XP and higher systems, does not require an administrator account, and does not require any code changes to use. 

  • It’s lightweight and easy to install (less than 10Mb download and a super quick install)

  • It does not require an administrator account to run/debug applications from Visual Studio

  • It enables a full web-server feature set – including SSL, URL Rewrite, Media Support, and all other IIS 7.x modules

  • It supports and enables the same extensibility model and web.config file settings that IIS 7.x support

  • It can be installed side-by-side with the full IIS web server as well as the ASP.NET Development Server (they do not conflict at all)

  • It works on Windows XP and higher operating systems – giving you a full IIS 7.x developer feature-set on all OS platforms

  • It does not require any registration/configuration steps.

  • In addition to supporting ASP.NET, IIS Express also supports Classic ASP and other file-types and extensions supported by IIS.

IIS Express FAQ lists more of its features:
  •  IIS Express is the Web server that is included with WebMatrix. You can also install IIS Express all by itself 

  • You can also manually launch IIS Express from the command line and use it with Visual Studio 2008, using the custom web server option. 

  • Versions 2.0, 3.0, 3.5, and 4.0 of ASP.NET framework are supported.

  • IIS 7.5 Express supports 64-bit architectures using the WoW64 subsystem. Full 64-bit support will be considered for future releases.

  • The IIS 7.5 Express license allows the MSI to be redistributed. You can include the MSI in your product or chain your installer to it. You can't distribute IIS Express in any other manner at the moment.

  •  IIS Express supports both the “Integrated” and “Classic” managed pipeline modes from IIS 7.

  • The core IIS Express runtime is xcopy-deployable. However, as of this time, xcopy deployment is not an officially supported feature.

  •  By default, only requests over localhost are serviced; however, you can modify the bindings to enable external traffic. For security reasons, you should have Administrator user rights on the machine to set this up.

  •  IIS Express does not include an FTP service. 

  • Similar to IIS, IIS Express supports multiple applications under the same site running in the same process.

  •  IIS Express support WCF applications. As noted above, WCF is only supported over HTTP or HTTPS. WCF over MSMQ and net.tcp is not supported.

  • SharePoint won’t run on IIS Express because it uses IIS features that aren’t supported.

  • IIS Express can run side-by-side with other Web servers as long as there are no conflicting bindings. 

Read More

HOW TO move items between Lists with jQuery

Moving items between list-boxes is a common UI pattern in Windows applications.

To simulate that in web applications with jQuery, check my no-frills code sample which uses an Unordered List instead of list-boxes. When items are moved back to the original List, the sequential order is maintained. This sample can be extended to have multiple Child Lists whose items can be moved to a single Master List.

When an item is moved from the parent List, it is only hidden & its clone is added to the second List. When the same item is deleted in the second List, that element is removed explicitly & the corresponding hidden item is shown in the List where it originated from.
Read More

HOW TO view size of files in Google Docs

Google Docs has some amazing features but there is one small detail thats conspicuous by its absence. File sizes are not shown in the summary view. If you are running out of space, there is no easy way to know which are the bulky files in case you wanted to remove some of them.

Thankfully, there is at least a roundabout way that a nice person on the forums has identified & shared -
  • Create a folder for the files whose size you want to know or better still, cultivate the habit of saving files into specific folders (at least till Google adds a Size column to the file listing in the tabular view)
  • Right click on the folder and select Show Details to view a column with the file sizes

Read More
HOW TO monitor performance and availability status of  public APIs & websites

HOW TO monitor performance and availability status of public APIs & websites

If you use Public APIs (like Bing Search, Google Maps APIs) in your applications, it helps to be aware of performance and availability issues that those services may face.

Thankfully, there are some free tools that monitor popular APIs & websites -
Also see:
How LARGE websites manage performance & scalability
Read More

HOW TO prevent 3rd-party browser extensions from being installed in IE

There can be some sneaky programs that install not just what they explicitly claim to do but also things like toolbars & add-ons within IE. As most people agree to a software publisher's Terms & Conditions without reading them, they may have deviously add a line that says one of your kidney & your PC are their property.

These add-ons known as browser helper objects may contain flaws such as buffer overruns which impact Internet Explorer's performance or stability.

If you wanted to play safe & prevent any 3rd-party browser extensions from being installed at all in IE8, there is a setting, I came across on IEBlog, that you can use.

Open GPEdit.msc (Local Group Policy Editor) using the Run option in XP or the Search bar in the Start menu. Open Administrative Templates > Windows Components > Internet Explorer > Internet Control Panel > Advanced Page, and set the policy "Allow 3rd-party browser extensions" to DISABLED.


Under the Internet Explorer category referred above, there are a whole lot of other settings that you can also configure. For instance, there is a setting there to "Turn on menu by default". Before you change the setting, you can also read a detailed explanation about that setting.

Also see:
HOW TO disable automatic META tag refresh/redirect through your browser
Read More