Wednesday, September 28, 2011

Common Features of JQUERY

JQUERY is gaining its popularity day by day. Its because of its simplicity and the features it provides. The JQUERY common features can be sorted like below.

Core Functionality Category
This feature is extended up to the implementation of the JQUERY functions and also some commonly used utility. 

Selection and Traversal Category
JQUERY provides the features for finding contents in the document and also navigating among the contents. These features are categorized as Selection and Traversal Category.

Manipulation and CSS Category
JQUERY has functions for working with CSS and also for changing and editing the documents. This is one the most powerful feature that makes JQUERY so popular.

Event Category
The event category simplifies the procedure of working with modern DOM events and also provides some event helping functions.

Effect
This is also the other popular feature of JQUERY. It contains the showing and hiding content, animation like fading in and out , moving objects etc.

Ajax
JQUERY provides utilities for working with ajax. This includes loading content from pages, working with JSON data etc. 

UI Category
It is the Abbreviation of User Interface. It’s an official plug in for providing the commonly used interface widgets 

Extensibility
It covers the construction of JQUERY plug ins that enhance the functionality of the base library.

Your First JQUERY webpage : an example with explanation

Now to prove that JQUERY works on your pc you write a simple program and we run it in different browser and see what happens. Our program is to show a alert when the page loads.

Program for Showing alerts when the web page loads
First step:
First of all we have to include a reference to the jQUERY library in our web page. For this we insert a script reference to the jQUERY. To do this insert the following code in <head></head> section after <title></title>.
<script type="text/javascript" src="jquery-1.x.x.x.js"> </script>
On the src attribute provide the full path where your save the downloaded jQUERY library. Also provide the name as downloaded copy.

Second Step:
The second step is to select the event handler that triggers when the page load complete. Normally the traditional javascript code we use for this is as follow

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>First jQUERY Example</title>
</head>
<body>
<script type="text/javascript">
window.onload = whenload;
function whenload(){
                alert("page loaded");
                }
                </script>
</body>
</html>
But the problem with this code is that this event trigger when all the page content such as image are fully loaded. So when you have larger website that will be a problem. Also it’s very hard to run multiple onload functions too, you need use DOM event model which different for different browser. But using jQUERY we can do it very easily. JQUERY has an event that runs when the DOM of the page is ready. So no need to load all the contents to run this event, Just DOM of the page need to be ready. It is the document.ready event.

So now you can write your first jQUERY statement. jQUERY object is represented by $(dollar) sign.

<script type="text/javascript">
$("document").ready(function() {
     alert("page loaded");
        });
    </script>

What will happen here we can explain. With $ sign we write the jQUERY object and calling the function with parameter of document and then .ready and passing an anonymous function for simplification and it will show a message page loaded when DOM is ready.
Another advantage of this document.ready event is that you can run it for multiple times independently. Now add this script tag.
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title> First jQUERY Example </title>
    <script type="text/javascript" src=" jquery-1.x.x.x.js "></script>
    <script type="text/javascript">
        $("document").ready(function() {
            alert("The page just loaded!");
        });
    </script>
</head>
<body>

</body>
</html>
 
Be sure your src attribute name is ok and you put your js formatted library file on the root folder. Otherwise you need to provide the full path.

What is JQUERY?

What is JQUERY?
JQUERY is an open source JavaScript library. JQUERY contains all the highly interactive and responsive tools that are needed in modern web pages. Its main feature is WRITE LESS AND DO MORE.

JQUERY supports the entire modern world browser. Another main advantage of JQUERY on my point of view is that when we code we always consider about how it will look in different individual browser but when you work with JQUERY you don’t need to think about that and so you can solely concentrate on your design. 

Some area of expertise of JQUERY is that in JQUERY the page content manipulation is very easy and simple which is normally we do this by DOM (Document Object Model). JQUERY makes it very simple to work with modern browser event model. The other important thing is its library. JQUERY has a great library with various effects, animations, transitions that can be used easily.

JQUERY syntax is a lot more like the CSS, so if you know CSS you find it familiar when you work with JQUERY. It is very helpful as everybody know CSS well. Statement chaining is also another feature of JQUERY. With it you can perform more than one operation on a set of elements with one line of code. Now lets see how can you download and install it for your web page.

Installing JQUERY
JQUERY is available in version. One is the production version and another one is the developer version.  The production version is minified and compressed. So you have to download them before use. Which one you use depends on your job nature. If you are intending to develop then you use the development version because it is much easier to debug. And you want use them in your server then use the production version. There is no difference in code between the production and the development version.  To download the latest version of the JQUERY visit JQUERY website http:\\jquery.com and download any of JQUERY's latest version. It will download directly in js format. Its better put this file in the root directory, otherwise you need to specify the path in your web page. 

Tuesday, September 27, 2011

Make your Firefox startup faster

Firefox is the most popular web browser nowadays. It's because of it's safe. Also lots of plugins and extensions are easy get for Firefox. But the most common problem regarding Firefox user is that its start up is very slow. Its because of its default settings of update and it take more memory to load. So we can make Firefox to react much faster by disabling the updates and compressing the DLL and executable.

First trick:Disabling the Firefox update
Before complete start up Firefox checks for updates of itself, plugins and search engines. To disable this, open Firefox, then for Toos menu select options. Go to Advanced tab and uncheck all the check box and click ok. Restart Firefox.
Disable Firefox updates
Second Trick:Compressing the DLL and executable
The basic is that UPX is a zipper software that can zip various types of files lie exe files dll files. But unlike other zip software the zipped files needed not to unzip for reading. They can execute in this zipped condition with out help of any third party software. Hence UPX reduced this file size more then 50%. So this files need much more less memory to start thus increase the speed. Moreover this is a free software.
This process is a little bit tricky. Follow the steps
* Go to the address http://upx.sourceforge.net/#download and download the UPX.
* By default Firefox installation directory in windows xp is C:\Program Files\Mozilla Firefox, if you don't change it.
* Unzip the the zip file of UPX and on the same folder create a bat file with following code and save it with a name

pushd "%ProgramFiles%\Mozilla Firefox" for %%v in (*.exe *.dll components\*.dll plugins\*.dll) do upx "%ProgramFiles%\Mozilla Firefox\%%v"
popd

If you don't know how to create a bat file don't worry.  Open a text document past this code and save it as "name.bat", don't forget the inverted commas.

Now double click on this bat file and you see the decompressing started. To measure how much volume decompressed first see the initial size and then see the finished size.

Shutdown your PC Faster

On normal Shutdown process operating system do some scheduled task that are by default enabled. Such as cleaning pagefiles, closing background application and services etc. With a very easy trick we can minimize this process. For this you need to modify some registry files. But it is recommended to backup up registry before any modification of registry. Otherwise abnormal condition may come. So first backup your registry before doing this.

In Run (Start-->Run) type regedit and then go to HKEY_CURRENT_USER\Control Panel\Desktop
HKEY_CURRENT_USER
On the right side you see a list of variables find out the following three variables AutoEndTask, HungAppTimeout and WaitToKillAppTimeout. First double click on the AutoEndTask, normally by default its value it set to 0(zero) change it to 1(one), it will enable the AutoEndTask service. Then Change HungAppTimeout to 1000, normally it is set to 5000 and finally change the WaitToKillAppTImeout to 2000, normally it is set to 20000. Now restart your computer to take the change. From next time see your system showdown time lessen or not.


Click on this link to see the all tips about Speeding up your PC on a single page.

Send Unlimited Free International SMS TEXT

Nowadays there are lots of site providing free sms text service. Its a kind of their promotional service for them. They put their web address on the end of every free sms sent. One of such site is http://www.freesmscraze.com  
Free SMS text site
But its main advantage is that you don't need to register to send free sms text. Just go to site home page, put your number and the destination number and send it. Also the another interesting feature is that you number won't be sent. So it got the privacy aspect. So I think it's very helpful. 
Send your free sms text worldwide
You can also register for getting some extra feature along with this free SMS text service such as receiving 2 way message, to save your sent message etc.

Free Hosting with 000webhost

Another amazing site for free hosting is 000webhost.com. It free features are also huge. You will get 1500MB of disk space with 100GB of traffic per month. Free database of MySQL with 2 database. Apache server 2.2.19 (Unix), PHP version 5.2.*, MySQL version 5.1. Also has Fantastico Autoinstaller for server side installation. 5 email accounts.
Go to http://www.000webhost.com/ and create a free account for starting the free hosting process. Before proceeding you will also need a domain address for this hosting. You can buy a domain or can create a free domain.
Fill with correct information as required with a domain name or they also provide free domain. Then you will got the following message.
Click on activate account and you get the following notification.
It will need about 24 hours to activate your account. Check your account after the scheduled time and click on the active account. Then you will see the following window:
Confirm Email
Then click on the Confirm my Email and go to your email account account and confirm through the link you have got within 5 minutes. Then you will see the following window.
Confirmation
Now go in your webhost account and click on the Go to CPanel. Then on the next page you will find CPanel with two dns address.
DNS address
Now you have to configure your domain. In you domain account setup you account with name server. And put the two dns address for completing the setup. See How to configure Domain for details