Tuesday, June 17, 2014

Strange gap or weird space between Identity icon and URL in Firefox 30 address bar

Recently switched back to Firefox. I am happy to break away from the Big Brother dictatorship of Google Chrome and use any extension I want (not Brother-Approved Extensions).

I found a strange space between the Identity icon* and the URL text of the address bar. It was about an inch wide.
 * Usually appears as a lock, sometimes expands to show the identity name, coloring in red or green depending on validation status.

This occurs on computers with a finger print reader hardware installed.

Firefox picks up the finger print authentication plugin (which however is not used by any Firefox built-in feature, though I'm not sure about Master Password), but it sets all plugins to "Ask to Activate" by default.

This causes the fingerprint reader plugin to remain disabled at start-up, causing the weird bug.

To solve the problem in Firefox 30.0:
  1. Click Menu (three stacked bars) > Add-ons.
  2. Click Plugins on the left side of Add-ons Manager.
  3. Find the plugin related to your fingerprint reader.
    • Most likely it is "TrueSuite" or "SimplePass"
    • You can look at about:plugins to help find the exact plugin name. Look for keywords like fingerprint, finger, authentication, pass, etc.
    • For more information, check here.
  4. Choose "Always Activate" in the drop-down for the plugin. (Both "Ask to Activate" and "Never Activate" will cause the bug.)
  5. Close Add-ons Manager and restart Firefox.

Sunday, March 03, 2013

Windows 8 Legacy Boot Menu

This tip was learned at WinAero: How to customize the Windows 8 boot experience. If the steps below are too advanced for you, check out their Boot UI Tuner portable application to easily do the same and more with just two simple clicks.

Many tips online suggest making Windows 7 the default OS to bring back the legacy boot menu (this doesn't load the OS before presenting the OS options). But what if you want Windows 8 as the default?

To keep Windows 8 as the default OS and still enjoy the speed of legacy (Windows 7 style) boot menu:
  1. Launch Windows 8. On the Start screen, type 'cmd' (there's no search box, you just start typing on the screen with tiles).
  2. When results appear on left, right-click on "Command Prompt".
  3. At the bottom bar, click "Run as administrator". (Your computer may appear to be idle for a couple of seconds. This is normal.)
  4. In the User Account Control dialog, click "Yes".
  5. In the Command Prompt window that opens, type the following and press Enter:
     bcdedit /set {default} bootmenupolicy legacy
  6.  If you got the message "The operation completed successfully", you're done.
    • You can type bcdedit and press Enter to verify that bootmenupolicy is set to 'Legacy' on the correct partition.
  7. Close the Command Prompt window. Restart your computer to see if it works. (Do not click Shut down. You must click Restart. Read below for why.)
Note that the Windows 7 version of bcdedit does not support editing the bootmenupolicy parameter as it does not recognize the parameter as valid. You must use Windows 8.

To reverse the above change, follow the steps again but in the Command Prompt window, type the following and press Enter:
bcdedit /set {default} bootmenupolicy standard

Why does this only work on actually "Restart-ing"?
Even if you set the bootmenupolicy to Legacy, you will still get Standard behavior if you click Shut down on the Power menu, then boot up the computer after it shuts down. This is because unlike previous versions of Windows, Windows 8 treats restarting and shutting down differently.

In previous versions, shutting down and powering up was exactly the same as restarting. But in Windows 8, when you shut down, Windows 8 boots up faster next time because of a form of "caching". When this caching is available Windows 8 can boot in half the time it would take on a fresh restart. The caching also forces Standard boot menu over Legacy one. When you restart Windows 8, no such caching is done and the computer always starts fresh. In this case, the Legacy boot menu will appear, allowing you to cut the time required to boot another OS.

Admittedly it would be ideal if the Legacy boot menu always appeared regardless of caching, but the above is still tolerable as Windows 8 loads much quicker when it is cached (which I believe is some form of mini-hibernation).

Backstory:
I was taken aback by the new Windows 8 boot menu. It's fancy but it's not ideal. While it's entirely possible to create a fancy boot menu that starts up quickly, Microsoft did not put any effort to finding out how - since most people will never see the boot menu anyway.

But for those of us on dual-boot configuration the fancy blue Windows 8 boot menu is frustrating especially if you want to keep using Windows 8 as the default OS. It loads Windows 8 first before presenting with the OS options. If you select an option other than Windows 8, the computer restarts fresh and loads the other OS. Every time you want to restart the other OS, you have to go through the process again - restart, load Windows 8, choose other OS, restart, load other OS.

Microsoft argues that since Windows 8 loads so "fast" it shouldn't matter. But the loading takes about 30 seconds on a hard disk, maybe even longer! The reality is, that loading time is a waste of time and resources, considering that the computer has to restart twice to boot into another OS. It's always more reasonable to present the OS options then proceed load the OS which the user chooses (or the default on timeout). It doesn't make any sense to load the default OS, then present with OS options, then discard the loaded default OS with a second restart when the user chooses something else!

At first it looked like the only way to get back the old text-based legacy boot menu (which shows first before loading any OS) is to set Windows 7 as the default OS. It works fine when the user intends to keep Windows 7 as the primary OS and simply try Windows 8 in his leisure. But it defeats the purpose when the user is upgrading to Windows 8 as a replacement (but keeping Windows 7 as an emergency fallback) as the user is forced to always manually select Windows 8 during boot time.

Thankfully, it's now possible with the above tip to revert to the text-based legacy boot menu and still keep Windows 8 as the default OS.

Sunday, January 20, 2013

Facebook Like button on Blogger blog

So how did I get that conspicuous Like button on all the posts in my blog?

Well it was pretty simple although I had to do a little bit of experimenting to get it work properly.
  1. Go to the Like Button Facebook Developers page.
  2. In the section "Step 1 - Get Like Button Code", select/enter:
    • URL to Like: http://example.blogspot.com (we will change this later!)
    • Send Button: this is up to you. Check and uncheck to see the difference on right.
    • Layout Style: button_count recommended, unless you have something else in mind.
    • Show Faces: highly recommended to turn this off! Otherwise people who didn't set their privacy settings properly may be shocked and appalled to find their face on your blog.
    • Width, Font, Color Scheme, Verb to display: leave as default (450, blank, light, like)
  3. Click on Get Code, then in the popup, click on XFBML at top. (You may use HTML5 but I recommend XFBML for more backwards compatibility). Note that you will have to copy code 1, 2 and 3 from here in later steps below.
       
  4. Now in another tab/window, launch your blogger dashboard and start managing your blog.
  5. On the left menu (or the More Options dropdown on your dashboard), click Template.
  6. Click Edit HTML.
  7. IMPORTANT! In the pop-up, click Expand Widget Templates to turn it ON.
  8. Cut the entire HTML code in the big box (click inside and hit Ctrl-A -> Ctrl-X).
  9. Open Notepad or your favorite text editor and paste it there. (This may be a good time to save a backup of your original HTML.)
       
  10. At the top, there will be an <html> tag with a bunch of attributes, like:
    <html b:version='2' class class='v2' .... .... xmlns:expr='http://www.google.com/2005/gml/expr'>
  11. Add a new attribute to the <html> tag. Copy this attribute alone from code 2. If you did it correct it should be like this:
    <html b:version='2' class class='v2' .... .... xmlns:expr='http://www.google.com/2005/gml/expr'  xmlns:fb="http://ogp.me/ns/fb#">
       
  12. Next, hit Ctrl-F and search for <body
    You will come across the <body> tag that looks like this:
    <body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
  13. Add a new line after this tag and paste code 1 here.
    <body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
    <div id='fb-root'/>
    <script> ... ... ... </script>

       
  14. Again, hit Ctrl-F and search for post-footer
    You will come across a <div> tag that looks like this:
    <div class='post-footer'>
  15. Add a new line after this tag and paste code 3 here.
    <fb:like href="http://example.blogspot.com" send="true" layout="button_count" width="450" show_faces="false"></fb:like>
  16. Modify the code you just pasted as follows. Note that href changes to expr:href, double quotes change to single quotes, and the URL changes to a special code that only Blogger understands.
    <fb:like expr:href='data:post.url' send="true" layout="button_count" width="450" show_faces="false"></fb:like>
       
  17. Copy the entire HTML code and paste it back in the big box in Blogger Template page (from step 8).
  18. Click the Preview button below. Check that everything is in order and you like your new Like button (no pun intended!).
  19. Once satisfied, click Save template. Once saved, click Close and go check out your blog.
Tips:

Sunday, August 26, 2012

Jumping Eclipse release train

So you have customized your Eclipse Helios (or whatever) installation, and now Eclipse Indigo or (recently) Eclipse Juno has been released. But you dread 'upgrading' your installation as you have to export all the customizations to the new release, transfer all plugins, etc, etc, and ensure everything works properly. Dread not, because you actually don't need to do any of these (well except the last thing).

One thing I noticed about Eclipse is that they never provided an official documentation on how to upgrade from (for examples) Helios to Indigo or Indigo to Juno. Everywhere I checked about upgrading Eclipse is vague, some even claiming that you should do what I just described (suggesting there's no other way than manual migration).

But Eclipse supports automatic upgrading and migration even if the development team is so sly about it. All you need to do is this: (I use Helios and Juno as examples - adjust accordingly.)

CAUTION: If you use Eclipse in mission-critical applications, be sure to make a proper back-up before proceeding, BOTH of your workspace(s) and your current Eclipse installation! For others, it will also be good to do a back-up in case something goes wrong or you don't like the new Eclipse version.
  1. In Eclipse Helios, go to Window > Preferences > Install/Update > Available Software Sites.
  2. Uncheck Helios, The Eclipse Project Updates and anything else Helios-related.
    • You may also uncheck anything else that you know aren't needed (keep repositories you added as checked).
    • If you see multiple entries named Helios, uncheck all of them.
  3. Click Add... button and enter the new release train name as Name, and for Location, find the correct repository location here (in the Links column, copy the URL of "Repository", "p2 Repository", etc.)
    • For Juno release train, the URL is http://download.eclipse.org/releases/juno
  4. Click OK > OK.
  5. Click Help > Check for Updates. After Eclipse checks the new repository, you will get the dialog box showing you updates available.
  6. Update your Eclipse installation as per normal (hopefully you already know how to do this).
  7. When prompted to restart, click Restart Now (You may click Not Now but never click Apply Changes Now - the chances of error are higher on such major update).
  8. After restart, you will find that Eclipse has now upgraded to Juno and you didn't need to migrate settings and plugins to a fresh installation.
    • You can remove repositories you unchecked in step 2.
    • You should also ensure all plugins work correctly (some plugins can break when upgrading to a new release train).
If it helped you, leave a comment below and let me know! Alert me of any problems to note too.

Keywords: Eclipse Java C/C++ IDE Callisto Europa Ganymede Galileo Helios Indigo Juno Kepler EE SE Classic Developers Mobile Modelling RCP RAP Automotive Scout

LinkWithin

Related Posts with Thumbnails