Pages

Tuesday, 15 October 2013

JavaScript Tutorial.

What is JavaScript ?

JavaScript started life as LiveScript, but Netscape changed the name, possibly because of the excitement being generated by Java.to JavaScript. JavaScript made its first appearance in Netscape 2.0 in 1995 with a name LiveScript.
JavaScript is a lightweight, interpreted programming language with object-oriented capabilities that allows you to build interactivity into otherwise static HTML pages.
The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers
The ECMA-262 Specification defined a standard version of the core JavaScript language.
JavaScript is:
  • JavaScript is a lightweight, interpreted programming language
  • Designed for creating network-centric applications
  • Complementary to and integrated with Java
  • Complementary to and integrated with HTML
  • Open and cross-platform

Client-side JavaScript:

Client-side JavaScript is the most common form of the language. The script should be included in or referenced by an HTML document for the code to be interpreted by the browser.
It means that a web page need no longer be static HTML, but can include programs that interact with the user, control the browser, and dynamically create HTML content.
The JavaScript client-side mechanism features many advantages over traditional CGI server-side scripts. For example, you might use JavaScript to check if the user has entered a valid e-mail address in a form field.
The JavaScript code is executed when the user submits the form, and only if all the entries are valid they would be submitted to the Web Server.
JavaScript can be used to trap user-initiated events such as button clicks, link navigation, and other actions that the user explicitly or implicitly initiates.

Advantages of JavaScript:

The merits of using JavaScript are:
  • Less server interaction: You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.
  • Immediate feedback to the visitors: They don't have to wait for a page reload to see if they have forgotten to enter something.
  • Increased interactivity: You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.
  • Richer interfaces: You can use JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.

Limitations with JavaScript:

We can not treat JavaScript as a full fledged programming language. It lacks the following important features:
  • Client-side JavaScript does not allow the reading or writing of files. This has been kept for security reason.
  • JavaScript can not be used for Networking applications because there is no such support available.
  • JavaScript doesn't have any multithreading or multiprocess capabilities.
Once again, JavaScript is a lightweight, interpreted programming language that allows you to build interactivity into otherwise static HTML pages.

JavaScript Development Tools:

One of JavaScript's strengths is that expensive development tools are not usually required. You can start with a simple text editor such as Notepad.
Since it is an interpreted language inside the context of a web browser, you don't even need to buy a compiler.
To make our life simpler, various vendors have come up with very nice JavaScript editing tools. Few of them are listed here:
  • Microsoft FrontPage: Microsoft has developed a popular HTML editor called FrontPage. FrontPage also provides web developers with a number of JavaScript tools to assist in the creation of an interactive web site.
  • Macromedia Dreamweaver MX: Macromedia Dreamweaver MX is a very popular HTML and JavaScript editor in the professional web development crowd. It provides several handy prebuilt JavaScript components, integrates well with databases, and conforms to new standards such as XHTML and XML.
  • Macromedia HomeSite 5: This provided a well-liked HTML and JavaScript editor, which will manage their personal web site just fine.

Where JavaScript is Today ?

The ECMAScript Edition 4 standard will be the first update to be released in over four years. JavaScript 2.0 conforms to Edition 4 of the ECMAScript standard, and the difference between the two is extremely minor.
The specification for JavaScript 2.0 can be found on the following site:http://www.ecmascript.org/
Today, Netscape's JavaScript and Microsoft's JScript conform to the ECMAScript standard, although each language still supports features that are not part of the standard.
JavaScript Syntax
A JavaScript consists of JavaScript statements that are placed within the <script>... </script> HTML tags in a web page.
You can place the <script> tag containing your JavaScript anywhere within you web page but it is preferred way to keep it within the <head> tags.
The <script> tag alert the browser program to begin interpreting all the text between these tags as a script. So simple syntax of your JavaScript will be as follows
<script ...>
  JavaScript code
</script>
The script tag takes two important attributes:
  • language: This attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.
  • type: This attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/javascript".
So your JavaScript segment will look like:
<script language="javascript" type="text/javascript">
  JavaScript code
</script>

Your First JavaScript Script:

Let us write our class example to print out "Hello World".
<html>
<body>
<script language="javascript" type="text/javascript">
<!--
   document.write("Hello World!")
//-->
</script>
</body>
</html>
We added an optional HTML comment that surrounds our Javascript code. This is to save our code from a browser that does not support Javascript. The comment ends with a "//-->". Here "//" signifies a comment in Javascript, so we add that to prevent a browser from reading the end of the HTML comment in as a piece of Javascript code.
Next, we call a function document.write which writes a string into our HTML document. This function can be used to write text, HTML, or both. So above code will display following result:
Hello World!
To understand it in better way you can Try it yourself.

Whitespace and Line Breaks:

JavaScript ignores spaces, tabs, and newlines that appear in JavaScript programs.
Because you can use spaces, tabs, and newlines freely in your program so you are free to format and indent your programs in a neat and consistent way that makes the code easy to read and understand.

Semicolons are Optional:

Simple statements in JavaScript are generally followed by a semicolon character, just as they are in C, C++, and Java. JavaScript, however, allows you to omit this semicolon if your statements are each placed on a separate line. For example, the following code could be written without semicolons
<script language="javascript" type="text/javascript">
<!--
  var1 = 10
  var2 = 20
//-->
</script>
But when formatted in a single line as follows, the semicolons are required:
<script language="javascript" type="text/javascript">
<!--
  var1 = 10; var2 = 20;
//-->
</script>
Note: It is a good programming practice to use semicolons.

Case Sensitivity:

JavaScript is a case-sensitive language. This means that language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.
So identifiers TimeTIme and TIME will have different meanings in JavaScript.
NOTE: Care should be taken while writing your variable and function names in JavaScript.

Comments in JavaScript:

JavaScript supports both C-style and C++-style comments, Thus:
  • Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript.
  • Any text between the characters /* and */ is treated as a comment. This may span multiple lines.
  • JavaScript also recognizes the HTML comment opening sequence <!--. JavaScript treats this as a single-line comment, just as it does the // comment.
  • The HTML comment closing sequence --> is not recognized by JavaScript so it should be written as //-->.

Example:

<script language="javascript" type="text/javascript">
<!--

// This is a comment. It is similar to comments in C++

/*
 * This is a multiline comment in JavaScript
 * It is very similar to comments in C Programming
 */
//-->
</script>


Saturday, 5 October 2013

How to disable USB, CD/DVD drives Autoplay in Windows 7

You might have noticed that, when ever you plugin your USB into the port or when you insert a CD/DVD into the drive, Autoplay option automatically gets executed. Today, I am going to tell you the most important computer tutorial to disable USB, CD/DVD drives Autoplay in Windows 7. By performing these easy steps, you will be able to disable Autoplay of any removable drives such as CD/DVD, Pen drives etc. It is important to disable their autoplay because in many cases, CD/DVDs and USB drives containing virus automatically gets executed resulting your computer affected by virus or Trojan horses. So it is very dangerous to allow any drive autoplay on its own, specially USB drives. So we must disable USB, CD/DVD drives Autoplay as quick as possible. I recommend that whenever you install a fresh Windows on your PC, you must disable this autoplay on priority basis. Method to disable USB, CD/DVD drives Autoplay in Windows XP is already discussed. Procedure to disable USB, CD/DVD drives Autoplay in Windows 7 is given below:

TUTORIAL TO DISABLE CD/DVD AND USB AUTOPLAY

To view and understand step by step guideline for disabling Autoplay of any removable drives such as CD, DVD, Pen drives etc; just read and follow the points given below:-
  1. Click on Start button and go to Run.
  2. In the Run Command Box type GPEDIT.MSC and press Enter.
  3. Go to Computer Configuration,  then on Administrative Templates and atlast System.
  4. Locate the entry for “Turn autoplay off“.
  5. Now double click on it.
  6. Then click on Enable.
  7. Select All Drives to disable all drives including USB drives or only CD Rom drive.
  8. Now click on apply.

Thursday, 3 October 2013

1- How to Disable Error Reports in Widows XP

Remove Error in Windows Xp.
            Some time an error occurs while you are using XP. A little dialogue box appears asking if you want to send report to Microsoft for this accident or not? Mostly when we press the button “Don’t send” The software we are using, turns off and we do not get any chance to save our working data. You can solve this problem simply and after this process you will not see this error box again. Just follow these steps.

1- Right click on “My computer” and click on ‘Properties”
2- On system properties dialogue box click on ‘advance tab”
3- Click on the error reporting button.
4- Click on “Disable error reporting”
It’s better for you to Place checkmark on “But notify me when critical errors occurs”

Now click Ok.

Tuesday, 20 August 2013

Improve your Internet Speed

Many of you are not happy with your slow internet connection speedNeed to increase your Internet connection speed, and then there are a number of tricks out there that will enable you to maximize your system’s performance. We will show you how to increase internet speed and maximize the performance of your web connected devices.
Step 1: go to desktop à My computer-(right click on) à properties à then go HARDWARE tab à Device managerà now u see a window of Device manager
Step 2: then go to Ports à Communication Port (double click on it and Open)
Step 3: after it opens, you can see a Communication Port properties
Step 4: go to Port settings
Step 5: now increase your “Bits per second” to 128000
Step 6: “Flow control” change 2 Hardware

Try this trick once and you will get better net speeds and browsing speed.

Monday, 19 August 2013

Copy Text from Images

If you want information in the form of text from scanned copies or images, then you write the text by typing or use OCR software. OCR (optical Character recognition) software is used to extract text from images. It will recognize the handwritten, printed or typewritten text and reproduce them into editable word or txt format. They are not 100% accurate and the converted document still needs some editing. But it is better to use OCR software and do some editing rather to type the whole Document.
If you have Microsoft office in your computer then you won’t require any other software. You can use Microsoft Office OneNote to copy text from image. In this article I have given the tricks on how to copy text from images using Microsoft office.
  • Install MS-Office on your system.
  • StartàAll ProgramsàMicrosoft OfficeàMicrosoft Office OneNote.
  • Copy and paste the image into MS-OneNote window which you want copy the text.
  • Right Click on the image and select ‘Copy Text from Picture option’.
  • Open a new Notepad or MS-Office word and paste the content.
 Now you have the whole text in editable format. Then you can edit or format it for accuracy.

Wednesday, 14 August 2013


Learn to Create Websites

Click the following link to Learn 
HOW TO SET ANY VIDEO AS WALLPAPER IN WINDOWS 7
Hey friends, the topic we are talking about sounds cool..Right!! We are going to share today that how you can set any video as your wallpaper in seconds. Please note, if you have a slow PC then you are advised to try this and remove this. Others can go free and keep it.
Just follow the steps given below:

How E-mail Really Works.

Email is based around the use of electronic mailboxes. When an email is sent, the message is routed from server to server, all the way to the recipient's email server. More precisely, the message is sent to the mail server tasked with transporting emails (called the MTA, for Mail Transport Agent) to the recipient's MTA. On the Internet, MTAs communicate with one another using the protocolSMTP, and so are logically called SMTP servers (or sometimes outgoing mail servers).

The recipient's MTA then delivers the email to the incoming mail server (called the MDA, for Mail Delivery Agent), which stores the email as it waits for the user to accept it. There are two main protocols used for retrieving email on an MDA:
  • POP3 (Post Office Protocol), the older of the two, which is used for retrieving email and, in certain cases, leaving a copy of it on the server.
  • IMAP (Internet Message Access Protocol), which is used for coordinating the status of emails (read, deleted, moved) across multiple email clients. With IMAP, a copy of every message is saved on the server, so that this synchronization task can be completed.
For this reason, incoming mail servers are called POP servers or IMAP servers, depending on which protocol is used.


Monday, 12 August 2013

"""How to "Delete administrator Password" without any software"""

Method 1
Boot up with DOS and delete the sam.exe and sam.log files from Windows\system32\config in your hard drive. Now when you boot up in NT the password on your built-in administrator account which will be blank (i.e No password). This solution works only if your hard drive is FAT kind.

Method 2

Step 1. Put your hard disk of your computer in any other pc .
Step 2. Boot that computer and use your hard disk as a secondary hard disk (D'nt boot as primary hard disk ).
Step 3. Then open that drive in which the victim’s window(or your window) is installed.
Step 4. Go to location windows->system32->config
Step 5. And delete SAM.exe and SAM.log
Step 6. Now remove hard disk and put in your computer.
Step 7. And boot your computer 

How to include an image in Google search results

To add an image to Google Images search results, the first step is to add your image to a website along with a descriptive text for your image. While you can’t directly upload images into search results, many searchable images that are posted on a website can be added to our search results. Just like Google does for webpages, Google Images crawls the web for pictures to include in its results.

Add your image to the web so Google can find it

  1. Post your image to a website
    If you'd like your photograph or image to appear in Google Images search results, you'll need to post the image on a website. If you don't own a website, here are some free content hosting services that you can use:
    • Upload your images to a social network like Google+
    • Add the images to a blog using Blogger
    • Create your own website using Google Sites
  2. Make sure the image you post is public and searchable
    By posting the image on a public and searchable website, you'll make it possible for Google to find your image and add it to the Images index. When you upload the image, make sure that the webpage containing your image is publicly accessible. For example, if you posted the photo on Google+, make sure the privacy setting was Public. For more tips on posting on a site that Google will crawl, read about adding a site to Google.

Tips to help your image appear

To help your image appear in Google search results, follow these best practices to help your images appear in searches, including:
  • Include descriptive text. Include descriptive text somewhere near the image like in an image "alt" tag or a caption. This helps Google understand what the image depicts and what searches it will be relevant to.
  • Upload high quality photos. Great image content is an excellent way to build traffic to your site.
  • Be patient. Images you upload to the web won’t instantly appear in search results. You’ll need to wait until your site is indexed by Google before your images begin appearing.