Google Apps standard account alternative - Zoho Apps Lite suite

Note - Zoho's offerings for the various apps mentioned in this article may have changed. Please visit Zoho's website for the latest details.

Also see - Google Apps standard account alternative - Microsoft Outlook.com

Google Apps Standard vs Zoho Lite

Recently, Google discontinued its free version of Google Apps for businesses. The free version of Google Apps, also known as Google Apps Standard, offered 10 user accounts per organization and access to free versions of all Google Apps - Google Mail, Google Drive/Docs, GTalk, Google Sites, Calendar and much more. This free account was perfect for small businesses and startups. 

With the standard Google Apps account being discontinued, Zoho offers a very good alternative/replacement with a free business account for its apps called Zoho Lite. Zoho Lite hosts 1 domain only and offers maximum 3 user accounts per organization with the free/personal versions of the following Zoho products available for each account -
  • Zoho Mail - The lite/free version of Zoho mail offers -
    •  3  5 user accounts (Zoho's Lite plan offerings have changed including a new referral program which awards 5 bonus users per referral)
    • 3 mailing groups
    • 5GB storage per user account
    • Contact management
    • All standard features available in most email apps (labels, filters, forwarding, themes, archiving etc.)
    • IMAP and POP access (this means that Zoho Mail can also be configured with email clients like Outlook and Thunderbird)
    • Overall, Zoho Mail competes very well with GMail.
  • Zoho Docs
    • 1 workspace with 1GB storage per account. 
    • Document version history
    • File sharing
    • Support for editing documents (Zoho Writer), spreadsheets (Zoho Sheet) and presentations (Zoho Show) online
    • Real-time collaboration with chat (similar to Google Docs) 
    • and more
  • Zoho Calendar - All standard calendar features like event sharing, invitations, reminders etc.
  • Zoho Chat - Chat is integrated with the Zoho mail interface (similar to Google Talk) and can be used separately as well. Zoho Chat also supports other instant messaging platforms (IM) like Google Talk, Facebook, Yahoo!, MSN, AIM and more.
  • Zoho Wiki - As the name suggests, this is an online collaboration and knowledge sharing platform. The following wiki features are included under the Zoho Lite package - 
    • 1 wiki per organization
    • 3 wiki workspaces per organization
    • 3 wiki users per organization (same as in Zoho Lite)
    • Total 50 MB attachment storage space
    • Unlimited pages and revisions
    • Does not support custom domain
    • and more
  • Zoho Discussions - The free version of Zoho Discussion is offered under the  Zoho Lite plan.
  • Zoho Notebook - Allows creating online note-books with revision history.
  • Zoho Bookmarks/Links - Integrated into the zoho apps dashboard. 

Zoho is mobile ready

Zoho Docs has apps for iPhone, iPad and Android. Documents can also be accessed in read-only mode via Zoho's mobile website.

Zoho Mail and Calendar are available via Zoho's mobile website.

Signing up for Zoho Lite

You'll need a registered domain name for your business/organization before signing up for Zoho Lite. Once the domain name is registered, initiate the Zoho Lite sign up process through this link and follow the instructions.

Zoho Lite admin account

During the sign up process, you'll be asked to create a zoho personal account. This account will be the administrator account for your Zoho Lite business/organization account. This admin account will be used to create user accounts (@your-domain.com) and add/remove, enable/disable and configure Zoho apps for these user accounts.

The admin account can also be updated to have an organization email address (@your-domain.com) later.

Enabling and Configuring Zoho Apps

After your Zoho Lite sign up is complete including the domain verification, follow these steps to enable the various Zoho Apps available under the Zoho Lite plan -
  • Login to Zoho Mail using your organization's admin account.
  • Click on the 'Control Panel' link on the top right hand side.
  • Inside the control panel, click on the 'Applications' menu entry.
  • Click on the 'Add Apps' link next to the 'Office Suite' title/heading.
  • Select the Zoho apps that you'd like to enable for each user account for your organization and save your selection.
Configuring Zoho Apps from the Control Panel.



This is how the Zoho dashboard looks with all free Zoho Apps enabled. All apps can be easily accessed from the left navigation menu.

Zoho Apps dashboard.

Alternatives for Twitter Bootstrap's affix navigation menu component

Bootstrap provides an affix navigation menu component which can make a nav-bar sticky while scrolling within a certain section of a page.

At the time of writing this article, this component is known to have cross-browser compatibility issues which are not yet fully fixed in Bootstrap's version 2.1.1 - e.g. flickering and violent movement of the affix menu when it reaches the bottom of its defined scrolling area/limit.

There are two jQuery based alternatives which can be used to provide a similar functionality -

The only drawback in these alternatives is that when used with menus, they do not provide automatic highlighting of the current menu entry (which is in view) on scrolling as seen in Bootstrap's affix plugin.

Fixing the jQuery scrollTo bug in Chrome and Safari


Introduction
The jQuery scrollTo plugin provides a smooth scroll effect for navigating within a page. The target to scroll to can be provided in many ways - DOM element (id, class, jQuery element selectors), absolute position, relative position and much more.

A common use of this plugin is to add 'scroll to top' buttons/links on a page. Clicking on these buttons/links would smooth-scoll to the top of the page. The animation effect and its duration can be controlled by setting the appropriate plugin options.

Issue
If the target specified for scrolling is a CSS class/id applied to the HTML body tag, then the smooth-scroll does not work in webkit based browsers like Chrome, Safari and Dolphin (mobile browser).

Solution
Instead of using a CSS class/id associated with the HTML body tag, create a separate HTML element (<div> or <a>) and use its class/id for the scrollTo plugin. This element should be styled appropriately to ensure that it is positioned at the top of the page and its positioning is not affected by other elements and vice versa.

Example
jsFiddle - http://jsfiddle.net/U6gFZ/1/

Code -

<html>
 <head>
  <!-- CSS style to position the placeholder element at the top of the page and making it unobtrusive -->
  <style type='text/css'>
   #top {
    padding: 0px;
    margin: 0px;
    width: 0px;
    height: 0px;
    position: absolute;
    top: 0px;
   }
  </style>
  
  <!-- include jQuery and scrollTo plugin's javascript files -->
  <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
  <script type='text/javascript' src='http://demos.flesler.com/jquery/scrollTo/js/jquery.scrollTo-min.js'></script>
  
  <!-- initialize the scrollTo plugin on document load -->
  <script type='text/javascript'>
   $(document).ready(function() {    
    $('#scroll-to-top').bind('click', function(e) {
     try {
      e.preventDefault();
      target = this.hash;
      $('html, body').scrollTo(target, 1000); 
     } catch(error) {
      alert('error - '+error);
     }   
      });   
   });
  </script>
 </head>
 
 <body>
  <!-- the placeholder element for top of page -->
  <div id="top"></div>
  
  <!--  add some filler content -->
  <div style='background-color: #FAA; width: 100px; height: 500px; border: #000 solid 1px;'></div>
  <div style='background-color: #AFA; width: 100px; height: 500px; border: #000 solid 1px;'></div>
  <div style='background-color: #AAF; width: 100px; height: 500px; border: #000 solid 1px;'></div>
  
  
  <!-- 'scroll-to-top' link -->
  <a id='scroll-to-top' href='#top'>Go to top</a>
 </body>

</html> 

Fixing USB mouse or laptop touchpad freeze and hanging in Ubuntu

After upgrading from Ubuntu 12.04 to 12.10, I occasionally started facing a problem with my touchpad. All of a sudden the left and right clicks would stop working. Left click only worked on the unity panel (on the left) and the top Ubuntu menu bar (which contains the clock, network and sound icons). These are two three possible solutions to this problem -

1) Restart the laptop touchpad or USB mouse [1]
This can be done via the command line and does not require you to reboot or logout of your account.

To restart the laptop touchpad -
  • Open terminal (ctrl + alt + t) or press alt + f2 to bring up unity's command lens.
  • Execute the following commands (recommended to run using gksudo but can be run using sudo as well) - 
    • gksudo modprobe -r psmouse (removes the mouse interface from the linux kernel)
    • gksudo modprobe psmouse (adds the mouse interface to the linux kernel)
To restart a USB mouse -
  • Open terminal (ctrl + alt + t) or press alt + f2 to bring up unity's command lens.
  • Execute this command - 
    •  sudo /etc/init.d/hotplug restart
Edit - If you're using a laptop, you can also try this option (requires function keys). The function key combination might not be applicable on your laptop model.

2) Uncheck the 'Disable touchpad while typing' option [2]
This setting is specific to the laptop touchpad.
  • Go to System Settings -> Mouse and Touchpad (under Hardware section)
  • Click on the Touchpad tab and uncheck the Disable touchpad while typing option.

3) Ensure that the Unity HUD or any other Unity lens is off
I was watching a video in VLC fullscreen mode. I primarily use VLC's keyboard commands - ctrl + navigation keys & alt + navigation keys - to move around the playback. During playback I abruptly switched to another app. That's when I faced this problem yet again. I had already unchecked the option as mentioned in step 2 above sometime ago. I tried restarting my mouse by running the commands mentioned in step 1, but that didn't work as well.

While I was using the browser via my keyboard (alt + tab to the rescue) and searching google for help, I happened to press escape 2-3 times and lo and behold, the mouse started working again.

And then it struck me! Whenever you have any unity lens open - the application, video, audio lens or even the HUD - the only areas where you can click with the lens open are the unity panel on the left hand side and the top menu bar. You cannot click anywhere in the app display area when any lens is open. These were exactly the symptoms I was facing and it seems that pressing the escape button multiple times closed a lens which was open in the background (probably when VLC was in fullscreen mode).

To reproduce the above mentioned problem - open a video in VLC and switch to fullscreen mode. Press alt once - this does bring up the HUD for VLC, but it does not show up in front. Now since the HUD is active (but not visible though), you won't be able to use any keyboard commands in VLC! Press escape once which will close the HUD and you'll be able to use VLC keyboard commands again.

Alternatively, you can just open the unity lens once (by pressing the Windows/super button) and close it. This should fix the issue.

References -
[1] Restarting your touchpad/mouse in Ubuntu in simple steps
[2] Trackpad freezes often [closed]

Fixing the XAMPP/LAMPP phpMyAdmin access problem on Ubuntu

If you get a message like this on accessing phpMyAdmin, check this post for a fix -

Access forbidden!



New XAMPP security concept:
Access to the requested object is only available from the local network.
This setting can be configured in the file "httpd-xampp.conf".


If you think this is a server error, please contact the webmaster.

Backstetch - An awesome jQuery plugin for dynamically resizing background images to occupy full size!

Backstretch is a simple yet awesome jQuery plugin that lets you add background images to the whole page or specific div/blocks covering the full area.

While this can be achieved using CSS3's background-size property (using 'cover' as the value or the appropriate fixed/percentage length and width), there are still some issues with this approach -
  • This property is not supported by IE7 and IE8. Support was added in IE9.
  • You need to ensure that the dimensions of your body tag, especially the height, is set correctly to cover the full screen. This can be tricky to achieve across all browsers especially if your page content does not span the entire screen height or exceed it.

Backstretch automatically determines the dimensions and stretches the background images so that they cover the full area. And backstretch does this without skewing the width to height ratio which is an added advantage.

Background images can also be added as fully-stretched slideshows using backstretch!

And it's simple too. Adding a fully stretched background image to the whole page can be done in just one line with a single backstretch function call -

<!-- add jQuery before adding the backstretch plugin -->
<script src="jquery.min.js"></script>
<!-- add the backstretch plugin -->
<script src="jquery.backstretch.min.js"></script>

<script type='text/javascript'>
    $(document).ready(function() {
        $.backstretch("http://site.com/background-image.jpg");
    });
</script>

Check out the official backstretch page for download, demos and more.

Note: You can use this screen resolution simulator website to test your web page with different resolutions after adding backstretch.

Swing development tip: Migrate event listeners when setting models

Change this -

public void setTableModel(TableModel tableModel) {
    this.tableModel = tableModel;
}

to this -

public void setTableModel(TableModel tableModel) {
    //migrate listeners
    if(this.tableModel != null) {
        if(this.tableModel.getTableModelListeners() != null) {
            for (TableModelListener p : this.tableModel.getTableModelListeners()) {
                tableModel.addTableModelListener(p);
            }
        }
    }
    this.tableModel = tableModel;
}

Enable/Disable Unity/Compiz Window Animations and Visual Effects in Ubuntu 12.04 (Precise Pangolin) and Ubuntu 12.10 (Quantal Quetzal)

For Ubuntu 12.04 (Precise Pangolin)

To turn on/off Unity/Compiz window animations and visual effects in Ubuntu -
  • Go to System Settings from the Ubuntu dash
  • Under 'Personal', click on the 'MyUnity' icon
  • In the 'MyUnity' window, go to 'desktop' tab and set the 'Windows animations' property accordingly.

 

 

 For Ubuntu 12.10 (Quantal Quetzal)

  • Install the CompizConfig Settings Manager application
    • This is available via Ubuntu Software Centre
    • For installing via apt - sudo apt-get install compizconfig-settings-manager
  • Start the application and go to Category > Effects from the left panel
  • Enable or disable effects as desired.
Note: MyUnity does not work with Ubuntu 12.10. This is a known bug. Also, the MyUnity package was removed from the Ubuntu 12.10 repository.

Reference: 11 Tips To Speed Up Computers Running Ubuntu 12.04/Linux Mint 13 (Maya)

Auto-mounting drives on Ubuntu at startup

Find out the device name of the partition you want to mount. Check under /dev or open the partition in nautilus (Ubuntu's file browser/explorer) and run the "mount" command in terminal to identify the device name e.g. /dev/sda3

Go to Ubuntu dash (top right) -> Startup Applications


Add a new startup application as shown in the image below and you're all set! Command : /usr/bin/udisks --mount /dev/sda3


The drive will be mounted automatically when you login to Ubuntu. This solution works on Ubuntu 11.10 (Oneiric), Ubuntu 12.04 (Precise Pangolin) and Ubuntu 12.10 (Quantal Quetzal).

For further details, more advanced settings and system-wide mounting, check - https://help.ubuntu.com/community/AutomaticallyMountPartitions

Changing the default editor in Ubuntu

  • Open terminal (ctrl + alt + t) and type "sudo update-alternatives -–config editor"
  • This will show all available editors 
  • Enter the number of the editor that you want to set as default and press the Enter key (and you're done!)

Another way to do this via the GUI is described here - http://www.addictivetips.com/ubuntu-linux-tips/2-ways-to-change-default-text-editor-in-ubuntu/

Changing the sudo timeout in Ubuntu

By default, Ubuntu remembers the sudo login for 15 minutes - this means you won't be prompted for your password for performing sudo operations for 15 minutes following a successful sudo login. This could be risky and can be changed so that the sudo password will be prompted for on every sudo login irrespective of the duration/timeout -
  • Open terminal and type "sudo visudo"
  • Locate the "Defaults ...." line as shown in the image below
  • Add this to the end of the line - ",timestamp_timeout=0"
    • Setting the timeout to 0 will prompt for the sudo password on every login. Alternatively this timeout can also be set to a number - e.g. setting it to 5 will remember the sudo password for 5 minutes.
  • Save the file and exit


Further reference

Preventing/Disabling Automatic Shutdown/Hibernate on Critical Battery Level in Ubuntu

In Ubuntu 11.10, the critical battery level behaviour can be controlled view the Settings -> Power. But it has 2 options only - shutdown & hibernate. Either of these options will immediately shutdown/hibernate Ubuntu on critical battery level.


To gain more control over this  -
  1. Install dconf editor. This is available on Ubuntu software centre as well
  2. Open the dconf editor (terminal > type dconf-editor)
  3. Navigate to org > gnome > settings-daemon > plugins > power
  4. Set the critical-battery-action option as required.
Settings the critical-battery-action to interactive will display a popup asking you what to do as shown below with a automatic-shutdown-timer of 60 seconds -


Edit: This option works for Ubuntu 12.04 (Precise Pangolin) and Ubuntu 12.10 (Quantal Quetzal) as well.

Generic excel file processing with Apache POI

I'm assuming that you already have a working knowledge of Apache POI. If not, here are some good starting points -

Generic?
Generic here stands for a single piece of code that can read both xls (Excel 2003 and prior) and xlsx (Excel 2007 and onwards) files.

How?
POI provides different components/models for working with xls and xlsx files - HSSF for xls and XSSF for xlsx. These components are further divided into models which differ in the way they process files. A comparision between these is shown in the image below (borrowed from here) -


The SS model lies on top of HSSF and XSSF models and provides the genericity we're talking about here. POI code written using the SS model will work for both xls (HSSF) and xlsx (XSSF) files.

Code
There's just one catch that needs to be taken care of - loading the excel file generically. For this we'll use the SS model's WorkbookFactory class which automatically detects the type of excel file and loads it.

(Note - Code borrowed from Java Dev Tips )

public List<List<String>> parseSpreadSheet(InputStream inputStream) {
    Workbook workBook = null;
    try {
        workBook = WorkbookFactory.create(inputStream);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    Sheet sheet = workBook.getSheetAt(0);   
    List<List<String>> rowHolder = new ArrayList<List<String>>();
    int cellNum = sheet.getRow(1).getLastCellNum();   
 
    for (int i = 0; i <= sheet.getLastRowNum(); i++) {
        Row row = sheet.getRow(i);
        List<String> cellHolder = new ArrayList<String>();
 
        for (int j = 0; j < row.getLastCellNum(); j++) {
            Cell cell = row.getCell(j);          
            String cellValue = parseCellValue(workBook, cell);
            cellHolder.add(cellValue);
        }
 
        //add empty cells to the end if required
        while (cellHolder.size() < cellNum) {
            cellHolder.add(null);                  
        }
        rowHolder.add(cellHolder);   
    }
    return rowHolder;
}

Ubuntu - Software Checklist

Some softwares you should check out if you use Ubuntu -

  • iptux - Lan messaging and file sharing app. Works with ipmessenger on windows.
  • Banshee Rhythmbox - Default media player for Ubuntu (11.x 12.04 onwards). Plays music and videos only.
  • JDownloader - Download management app. Supports free-user-downloading from most online file hosting services. Doesn't always work well with Firefox + Flashgot.
  • FatRat - Another download management app. Not as great as JDownloader though IMO. But works well with Firefox + Flashgot.
  • FreeMind - Mind mapping tool
  • Docking Tools ** - 
  • DConf Editor - For tweaking system settings. E.g. preventing/disabling automatic shutdown on critical battery level.
  • XPad - Sticky notes 
  • zRam - Creates a RAM based block device which acts as a swap disk, but is compressed and stored in memory. See related blog posts here.
  • PlayOnLinux - A front-end for Wine to run Windows applications on Linux.
  • Meld - A diff comparision tool like WinMerge.

** A good comparision and review of the docking tools - http://www.hackourlife.com/awn-vs-cairo-dock-vs-docky-mac-style-linux-docks-reviewed/