Saturday, January 07, 2012

Add-on: User Agent Switcher

The User Agent Switcher extension adds a menu to Mozilla browser and a toolbar button to switch the user agent of a browser. It is a wonderful tool for developers and designers to view different types of user agents in same browser. You can set a default user agent and can switch between different agents like Internet Explorer, Mozilla, IPhone and other Search robots. See the below image how you can switch between user agents.

image

You can edit the User agent options by editing user agents from toolbar menu. See this image to see available user agents.

image

You can download this add on for Mozilla here or you can search for this add on at Mozilla.

Wednesday, January 04, 2012

Time, Anger and Disrespect

Time is precious to everyone. It’s a bad habit to keep other people waiting. Almost everyone feels that one of their most valued commodities is their time. This being the case, one of the ultimate slaps and most sure way to annoy someone is to keep them waiting. While most people are somewhat forgiving, keeping them waiting is a sign of disrespect. The subtle message is, “My time is more important than yours.”
Deep down, we all know that no one likes to be kept waiting. Therefore, it’s highly stressful to keep other people waiting because you know you are disappointing someone. In the back of your mind, you know well the person is looking at his watch, wondering why you are late. You may be keeping him from personal or professional commitments and that could make him angry.
There are obviously exceptions to the rule – times when factors beyond your control prevent you from being on time. Things happen to all of us, and no one has a perfect record. Truthfully, however, a vast majority of the time, being late is preventable by planning ahead, allowing a little extra time, or making allowances for unexpected problems.
Many times we compound the problem by making excuse like “traffic was horrible,” when, in reality, traffic is virtually always horrible. The problem wasn’t traffic – but the fact that we didn’t factor enough time in our schedule for the traffic. It’s likely the case that, even if traffic was horrible, or you got off to a late start, or whatever the excuse, the other person isn’t going to be interested or impressed.
I wouldn’t underestimate the negative impact of making someone wait. It drives some people crazy. And, even if they don’t express their frustration to you directly, it can show up in other ways – not taking you seriously, avoiding you when possible, being disrespectful, choosing to spend their time with others instead of you, showing up late to your future appointments, etc.

Friday, December 02, 2011

What is a Virtual Machine?

Virtual machine is a tightly isolated software container that can run its own operating systems and applications as if it were a physical computer. A virtual machine behaves exactly like a physical computer and contains it own virtual (i.e., software-based) CPU, RAM hard disk and network interface card (NIC).
An operating system can’t tell the difference between a virtual machine and a physical machine, nor can applications or other computers on a network. Even the virtual machine thinks it is a “real” computer. Nevertheless, a virtual machine is composed entirely of software and contains no hardware components whatsoever. As a result, virtual machines offer a number of distinct advantages over physical hardware.

VMs are created within a virtualization layer, such as a hypervisor or a virtualization platform that runs on top of a client or server operating system. This operating system is known as the host OS. The virtualization layer can be used to create many individual, isolated VM environments.

Typically, guest operating systems and programs are not aware that they are running on a virtual platform and, as long as the VM's virtual platform is supported, this software can be installed in the same way it would be deployed to physical server hardware. For example, the guest OS might appear to have a physical hard disk attached to it, but actual I/O requests are translated by the virtualization layer so they actually occur against a file that is accessible by the host OS.

Virtual machines can provide numerous advantages over the installation of OS's and software directly on physical hardware. Isolation ensures that applications and services that run within a VM cannot interfere with the host OS or other VMs. VMs can also be easily moved, copied, and reassigned between host servers to optimize hardware resource utilization. Administrators can also take advantage of virtual environments to simply backups, disaster recovery, new deployments and basic system administration tasks. The use of virtual machines also comes with several important management considerations, many of which can be addressed through general systems administration best practices and tools that are designed to managed VMs.

Saturday, November 26, 2011

Reopen the Last Browsing Session in Firefox

Mozilla Firefox offers tabbed browsing, the ability to open several Web pages in a single instance of Firefox, each page opening in a new tab. One convenient feature available in Firefox is the ability for the browser to save opened tabs from a session then restore them when you re-open the browser. This way you can pick back up browsing wherever you left off. Additionally, you can access tabs from a previous browsing session, even if this feature is disabled, if you accidentally closed the browser before you were finished working. Recently I ran into a problem by accidentally closing window. But no worries we can restore by setting few settings in Firefox.

Setup Firefox To Automatically Restore Browsing Session

  1. Open the Firefox browser on your computer.
  2. Click on the "Firefox" option from the file menu and select "Options." A new window will open.
  3. Click on the "General" tab in the Options window.
  4. Click the "When Firefox starts" drop-down menu under the "Startup" section and select, "Show my windows and tabs from last time."
  5. Click "OK" to save your settings. Each time you close the browser Firefox saves any open tabs or windows and re-opens them automatically when you start the browser again.

Restore Tabs from Previous Browsing Session

  1. Open the Firefox browser on your computer.
  2. Click on the "Firefox" option from the file menu, select "History" then hover over "Recently Closed Tabs." A list of closed tabs from your previous browsing session will appear.
  3. Scroll down and click on one of the recently closed tabs. It will automatically open in a new tab within Firefox.
  4. Repeat Steps 2 and 3 until all tabs from your previous Firefox session appear in the browser.

Sunday, November 13, 2011

Validators Control to allow only Integers

Here are few different ways you can use native .NET validation controls to validate to allow only integers. We can do it in two ways one by using regular expression and one with compare validators

Method 1: Compare Validator
<asp:TextBox ID="NewMobileTextBox" runat="server" Width="280px" autocomplete="off"
CssClass="signuptxtbox" ></asp:TextBox>
<asp:RequiredFieldValidator ID="NewMobileRequired" runat="server" ControlToValidate="NewMobileTextBox"
CssClass="failureNotification" Display="Dynamic" ErrorMessage="New Mobile is required." ToolTip="New Mobile is required." ValidationGroup="ChangeNewMobileValidationGroup">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="NewMobileCompare" runat="server" ControlToValidate="NewMobileTextBox" CssClass="failureNotification" Display="Dynamic" Operator="DataTypeCheck" ErrorMessage="Mobile Number should be numeric only." ValidationGroup="ChangeNewMobileValidationGroup" Type="Integer">*</asp:CompareValidator>


Method 2: Regular Expression Validator

<asp:TextBox ID="NewMobileTextBox" runat="server" Width="280px" autocomplete="off"
CssClass="signuptxtbox" ></asp:TextBox><asp:RequiredFieldValidator ID="NewMobileRequired" runat="server" ControlToValidate="NewMobileTextBox"
CssClass="failureNotification" Display="Dynamic" ErrorMessage="New Mobile is required." ToolTip="New Mobile is required." ValidationGroup="ChangeNewMobileValidationGroup">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="mobileRGEX" runat="server"
ControlToValidate="NewMobileTextBox" CssClass="failureNotification"
ErrorMessage="Please Enter Only Numbers" ValidationExpression="^\d+$"
ValidationGroup="ChangeNewMobileValidationGroup"></asp:RegularExpressionValidator>