Saturday, August 28, 2010

Debugging Javascript, CSS, HTML and PHP using FireBug and FirePHP


There are number of firefox add-on every webdeveloper love, in which one of the best add-on is firbug.
Fire bug let's you debug your javascript, html, css code. Thinking even more  it' can debug PHP also using FirePHP. It include debugger, error consol and commandline.

After you install  firebug add-on you will see a 'firebug'  in statusbar of firefox .Click on that bug firebug in open for you at bottom of your page.

If you bored using javascript alery(myVar); function for debugging you may use console.log(myVar); like console on most development tools.
Also firbug helps you to inspect each every corner of DOM using your mouse.

Debugging PHP using Firebug, FirePHP


First you need to install firebug add-on then firePHP add-on. Then download FirePHPCore from http://www.firephp.org/  and add FirePHPCore in your PHP 'include' or root or somewhere you like. Include it in you PHP file.
using
require('FirePHPCore/fb.php');
and call fb() function passing a single argument that you need to pass in to Console
try{
        echo "hello";
       }
   (Exception $e) {
    fb($e);
    fb("Error in data ".$foo);
   }
 


FirePHP writes this to console using  HTTP headers – in particular, X-FirePHP-Data headers in the response.
So you need to use ob_start();

This will initialise output buffering, so that any HTML you output is held up till the end of script execution.

Referances

More about Firebug and FirePHP

You can get Firbug Add-on from here  http://getfirebug.com/enable

FirePHP Project     http://www.firephp.org/

Friday, August 27, 2010

Google Call- Call to phone from Gmail Inbox FREE for US and Canada


Now you can use your Gmail to call your friends phone. This new feature from Google is under testing. This feature will not be available to non US Canada users, also to Google App for non-profit. In coming days google will launch this feature to more countries. However the call rates and comparison rates to different countries now available. To see this feature go to http://gmail.com/call. You need to install Voice video plug-in to use this feature. To know more about this Visit Google Official Blog

Tuesday, August 24, 2010

Cheap Reliable Web hosting India

If you are looking for reliable web hosting with good support, We recommend Yuvawebhosting . Host your site now with confidence. We are(Our website: Codeglobe) running on Yuvawebhosting.

They are running promo now . 50% Off on web hosting plans

cochin webdesigns hosting development

Monday, August 23, 2010

Undo Send option in Gmail- Will help us to re-think whether to undo a send mail

Sometimes I regret sending a message the morning after. Other times I send a message and then immediately notice a mistake. I forget to attach a file or email the birthday girl that I can't make her surprise party. I can rush to close my browser or unplug the Internet — but Gmail almost always wins that race.

An email to the wrong Larry pushed me over the edge. I could undo just about any other action in Gmail — why couldn’t I undo send? Many people agreed, including Yuzo Fujishima, an engineer in the Tokyo office. My theory (which others shared) was that even just five seconds would be enough time to catch most of those regrettable emails.

And now you can do just that. Turn on Undo Send in Gmail Labs under Settings, and you’ll see a new “Undo” link on every sent mail confirmation. Click “Undo,” and we’ll grab the message before it’s sent and take you right back to compose.



This feature can't pull back an email that's already gone; it just holds your message for five seconds so you have a chance to hit the panic button. And don't worry – if you close Gmail or your browser crashes in those few seconds, we'll still send your message.

I've had Undo Send turned on for a while and it's saved me several times. Let us know if it saves you too.

(Thanks to Google official blog)

Google Transliteration IME released - Google Input Method: Type anywhere in your language

Google Input Method: Type anywhere in your language

Google Transliteration IME is an input method editor which allows users to enter text in one of the supported languages using a roman keyboard. Users can type a word the way it sounds using Latin characters and Google Transliteration IME will convert the word to its native script. Note that this is not the same as translation -- it is the sound of the words that is converted from one alphabet to the other, not their meaning. Converted content will always be in Unicode.


Google Transliteration IME is currently available for 19 different languages - Amharic, Arabic, Bengali, Farsi (Persian), Greek, Gujarati, Hindi, Kannada, Malayalam, Marathi, Nepali, Punjabi, Russian, Sanskrit, Serbian, Tamil, Telugu, Tigrinya and Urdu.

Features

  • Offline Support
    No dependency on internet connection.

  • Word Completions
    Dictionary based word completions for prefixes.

  • Personalized Choices
    Remember user corrections along with macro and canonical support.

  • Easy Keyboard
    Dictionary enabled keyboard to enter rare and complex words.

  • Quick Search
    Single click web search for highlighted word.

  • Cool Customization
    Customize suggestions page size, display font and more.

Google Transliteration IME is an input method editor which allows users to enter text in one of the supported languages using a roman keyboard. Users can type a word the way it sounds using Latin characters and Google Transliteration IME will convert the word to its native script. Note that this is not the same as translation -- it is the sound of the words that is converted from one alphabet to the other, not their meaning. Converted content will always be in Unicode. For example, typing "hamesha" transliterates into Hindi as: Hindi transliteration example and typing "salaam" transliterates into Persian as: Farsi transliteration example

Google Transliteration IME is available for 19 different languages - Amharic, Arabic, Bengali, Farsi (Persian), Greek, Gujarati, Hindi, Kannada, Malayalam, Marathi, Nepali, Punjabi, Russian, Sanskrit, Serbian, Tamil, Telugu, Tigrinya and Urdu.

Sample status window and the edit window for Hindi IME are shown below. For simplicity, Hindi IME is used as an example at most places in this help page.
Hindi IME

Install

To install, download (If you are on a 64-bit Windows, make sure you have selected the 64-bit radio button in the download page) and run the installer and follow the instructions on screen.

  • More than one language IME can be installed on the same client machine.
  • Requirements are Windows 7/Vista/XP 32-bit/64-bit operating systems.
  • Only one instance of IME will be installed per machine but the configuration is done for each user using IME.

    Install Window

    Install Window

    Install Window

Uninstall

To uninstall, follow these steps:
  1. Click on the "Start" menu.
  2. Select "Control Panel" and then go to "Add or Remove Programs".
  3. In the program list, select the "Google Input", click on "Change/Remove" button.
  4. By default, "Retain my personal data with settings" option will be checked, which will not clean your personal customizations like display font, user correction cache etc., as part of uninstall. Uncheck the option, if you want to clean all your personal settings information.
  5. In the "Uninstall Google Input" dialog box, click "Yes".

    Uninstall Window

If you want to use IME with any application like notepad, you must first open the application and then open our IME. IME can be opened by clicking on the language bar on the desktop and then selecting the IME language icon or through a shortcut key if it's already configured. To close IME, you can change the language in language bar or try right clicking on the current application to see whether it supports 'Close IME' popup menu option or by closing the current application.

Displaying Language Bar

  • In desktop, right click on tool bar and select Toolbars -> Language bar

    Language Bar


Enabling Language Bar

If the 'Language bar' option is not visible in 'Toolbars', then it needs to be enabled through control panel:

Windows 7/Vista

  1. Control Panel -> Regional and Language Options -> Keyboard and Languages tab
  2. Click on Change keyboards... button to open Text services and input languages dialog
  3. Navigate to Language Bar tab
  4. Enable the radio button Docked in the taskbar under Language Bar section
  5. Apply all settings and try to display language bar as mentioned in previous section.

Windows XP

  1. Go to Control Panel -> Regional and Language Options -> Languages tab -> Text services and input languages (Details) -> Advanced Tab
  2. Make sure that under System configuration, option Turn off advanced text services is NOT checked.
  3. Go to Control Panel -> Regional and Language Options -> Languages tab -> Text services and input languages (Details) -> Settings Tab
  4. Click Language Bar
  5. Select Show the Language bar on the desktop. Click OK.
  6. If you are installing the IME for East Asian language or Right-To-Left language, go to Control Panel -> Regional and Language Options -> Languages Tab
  7. Make sure that options Install files for complex scripts and right to left languages and Install files for East Asian languages are checked in the checkboxes. This requires installation of system files and the system will prompt to insert the Operating System Disc.
  8. Apply all settings and try to display language bar as mentioned in previous section.


IME Shortcut

A shortcut key sequence can be applied to the IME as follows which can be used to quickly enable IME for any in-focus application:

Windows 7/Vista

  1. Control Panel -> Regional and Language Options -> Keyboard and Languages tab
  2. Click on Change keyboards... button to open Text services and input languages dialog
  3. Navigate to Advanced Key Settings tab
  4. If Google Input is not listed in Installed Services box, then click Add and in Add Input languagedialog box, go to the language for which you want to enable IME in the languages tree and expand the node. Check the checkbox next to Google Input in the list.
  5. In Hot keys for input languages Select To - Google Input
  6. Press Change Key Sequence
  7. Select Enable Key Sequence
  8. Select option like Left ALT + SHIFT + Key 1
  9. Apply all changes
  10. Now opening an application like notepad and pressing Left ALT + SHIFT + Key 1 should open the IME.

Windows XP

  1. Control Panel -> Regional and Language Options -> Languages tab -> Text services and input languages (Details) -> Settings Tab
  2. If either or Google Input not listed in Installed Services box, then click Add and in Add Input language dialog box, select in Input language and Google Input in Keyboard layout/IME. ClickOK
  3. Press Key Settings
  4. In Hot keys for input languages, Select Switch to -Google Input
  5. Press Change Key Sequence
  6. Select Enable Key Sequence
  7. Select option like Left ALT + SHIFT + Key 1
  8. Apply all changes
  9. Now opening an application like notepad and pressing Left ALT + SHIFT + Key 1 should open the IME.

Status Window

Whenever you enable our IME for an application either through a shortcut or through language bar, its status window will be visible on the screen. By default it will be placed at the bottom right corner of your desktop which can also be moved around. It is used for more configuration and controlling various features of our IME. It has three to five icons (depending on the language and features available) with leftmost being the application icon. Next to it are IME language indicator button, keyboard button (not present for Amharic and Tigrinya), canonical mode button (This button will be present if you have anycanonical schemes associated with the IME) and menu button in that order.

Status Window

Edit Window

When the IME is enabled for an application like notepad and you start typing, IME displays the edit window with the typed text and the corresponding word choices in IME language. In the below example, user has typed 'googl' and the IME has displayed five choices numbered 1 to 5.

Edit Window

Navigation and Selection

By default the leftmost choice will be highlighted indicating active choice. Active choice can be changed by navigating other choices through BOTTOM-ARROW or TAB key - which moves the selection to the right; or through UP-ARROW or SHIFT+TAB keys - which moves the selection to left. To select one of the choices as the new word for your application, use ENTER key which inserts the active choice to the application at its current cursor position. Using SPACE or any other PUNCTUATION CHARACTER also inserts the active choice to the application along with the typed punctuation character. Exception will be when IME thinks that there is a better choice of word containing the punctuation character as part of the word itself. All the above controls only insert the active choice (highlighted) into the application. Another way to insert any choice even if it is not active is using its position number as: CTRL+.

Navigation

Word Completions

When you type a word, the choices displayed in edit window will be either in BLACK or BLUE color. Intuitive partial word choices for the typed content are displayed in BLACK color which will always be grouped on the left side. If there are any better dictionary-based word completions for the typed content, they are displayed in BLUE color and grouped on the right side.

Paging

In the example being discussed, IME displays only 5 choices in the edit window which is the page size setting of the edit window. It can be configured through the menu button of the status window. If there are more choices than the page size set, then it will be displayed in the next page. Page navigation can be done through the small arrow buttons at the right bottom corner of the edit window or through PageUPand PageDown keys. Even when you navigate the choices with arrow or tab keys, the control moves to the next or previous page from either end of the edit window.

Paging

Search

At anytime while typing in edit window, if you click the Google image on top right corner of the edit window, it triggers a web search for the active/highlighted choice in google.com. Search can also be triggered for non-active choice by right-clicking on any choice and then clicking the Search... drop-down button.

Search

User Cache

There will be scenarios where the leftmost choice is not the one you are looking for and you select some other choice (second choice in the below example for typed word 'program') which will be inserted into the application.
User Cache
IME remembers this selection for the current user and when the user next types 'program' again, the last selected choice will now be displayed as the leftmost choice. To share this information across all applications for a user, this is persisted at user level even after closing the application. But this persisting behavior can be disabled through the 'Disable User Cache' option from menu button of status window. Note that caching doesn't apply if you select word completions. It is only for word choices shown in BLACK color.

User Cache

Switch to English

If you want to add both roman alphabet (typically English) content and IME language content to any application, there is an easy way to switch between the two. In one mode IME gives you choices in its language and in another mode it just emits what you have typed. Toggling can be done by clicking the IME language button in status window or through shortcuts: CTRL+G or F12.

Toggle Language

Keyboard

When you don't get some words as expected choices for any rare complex words; you can use the flexible keyboard to input any possible word. You can open the keyboard by clicking the keyboard button on status window or through the shortcut CTRL+K. Mouse is used to enter characters from the IME keyboard which also triggers word completions in the edit window. Keyboard can be closed by clicking the keyboard button again on status window or through shortcut keys: CTRL+K or ESC. There is also option to enter Zero Width Joiner (ZWJ) and Zero Width Non Joiner (ZWNJ) characters.

Keyboard

Customization

You can customize many features through IME's menu. Options available through the menu popup in status window are:

  • Change or activate one of the available canonical schemes (Option available only if there is atleast one scheme in the Schemes directory).
  • Select the font and size to be used to display the choices in IME language inside edit window (Suggestion Font).
  • Select the font and size to be used to display the English/Roman characters inside edit window.
  • Set the page size for edit window to restrict its size through number of choices.
  • Enable or disable the persistence of user cache.
  • Add/Edit or Delete macros using Manage Macros option.
  • Information about the IME like version.
  • Help, linking to this page.

Customization

Special Cases

There are some special cases in how IME behaves for some characters in some languages:

  • Example in Arabic for special case of SPACE where it is part of the typed word.
    SPACE Special
  • Example in Arabic for special case of PUNCTUATION where it is part of the typed word.
    PUNCTUATION Special
  • Example in Greek for special case of CAPITALIZATION where only first character being in uppercase in input retains its casing.
    Camelcase Special
  • Example in Greek for special case of CAPITALIZATION where all uppercase word in input retains its casing.
    Camelcase Special
  • Example in Greek for special case of DIGITS where number is converted digit wise instead of its whole value.
    Digit Special

IME supports adding custom user defined macros. Macros are short character sequences mapped to a word of your choice. When you type a character sequence, if there is a word corresponding to that sequence in the user-defined macros collection then it will be shown as the first choice in the Edit Window. You can manage the macros by choosing the 'Manage Macros...' option from the IME's menu.

Macros Menu

When you select this option the 'Manage Macros' dialog opens, allowing you to add, modify and delete the set of macros.

Macros Dialog

Adding a Macro entry

Click on the 'Add' button. This will add an empty row to the Macros List. You can double click (or select the cell and press F2) on the cell to add the new Macro entry.

  • Macro Text should consist of only alpha-numeric characters and the length should not exceed 100 characters. Macro Text is case-sensitive.
  • Macro Target should not contain any spaces and the length should not exceed 50 characters.


Removing a Macro entry

Select the cells you want to delete (Use Shift+Click to select a range or Ctrl+Click to select multiple disconnnected cells) and click on the 'Delete' button. Note that you cannot delete single cells. If you delete a cell, the full row will be deleted.

Modifying and Saving Macro Entries

  • You can edit any cell by double clicking it (or selecting the cell and pressing F2 key).
  • You can cancel the edit anytime by pressing the 'Esc' key or clicking outside the cell. Press the 'Enter' key to complete the edit.
  • After all edits are completed you need to click on the 'Save' button to save your changes.
  • You can click on the 'Discard' button anytime to discard all the changes made so far (after the previous save action).

Once you have the Macros in place you can use them while typing. For example if 'Mon' is mapped to Macro Text in the Macros, then when you type 'Mon' you will see Macro Text as the first option.

Macros In Action

    LinkWithin

    Related Posts with Thumbnails