Sunday, 30 March 2014

Introduction to HTML lesson 3 - HTML Editors

Posted by Unknown
                      Many of us often concentrate more on programming part rather than the subject but you need to no more than that .If you want only programs you can visit many websites but there are very few websites that provide the concept you need for HTML/CSS along with programming.I want make you understand what you're doing.so let's start with tutorial.



HYPERMEDIA :


                                A hypermedia document is a document with a format that can be displayed online, in a browser. In practice, hypermedia documents are often called HTML files, although they may contain many other types of files.
                                   HTML standards are set and maintained by the World Wide Web Consortium
Hypermedia


WWW(World Wide Web):

                                            The Web, or World Wide Web, is the area of the Internet that allow you to display text and graphics and play videos, and movies. With appropriate equipment, we can even receive or broadcast live audio and video.
  A set of  html pages accessible using HTTP
  Hyper Text Transfer Protocol- HTTP is the protocol to exchange or transfer hypertext.
   Hypertext is structured text that uses logical links (hyperlinks) between  nodes containing text.

Hyperlink  

                     A hyperlink, or link, usually appears as colored, underlined text or a graphic on a Web page. A link is a jumping-off point for moving from one subject to another.
HTML Web page authors require three basic tools:
1.Computer with graphics capabilities
2.Text editor
3.Browser software application.
HTML editors :
                           There are many types of HTML editors that are used for writing HTML code .But Two of them are mostly used .They Are :
        1.Text editor
        2.WYSIWIG editor


        Text editor :

                         A text editor is a software application used to create and manipulate text, such as Notepad and WordPad. To start creating web pages, we do not need an expensive software package but you do need some knowledge of HTML. We can create web pages with a basic text editor like Windows Notepad.
—       Macromedia Homesite is a popular text-based HTML editor.                                       

WYSIWIG Editor :

                          WYSIWYG is generally an Acronym for "What You See is What You Get" .HTML editors do not require much HTML knowledge, they tend to be expensive. These editors allows you to directly work in the "design" or "preview" view instead of the code view.
       There are several popular WYSIWYG editors available:
       Microsoft FrontPage
      Adobe GoLive                                                                                                                   
If you want to know more about HTML  click here.

Features of Text Editor :

 Better control. Because text-based editors require knowledge of HTML, the developer has more control over what is written to produce a web page. In some cases, a software package (like FrontPage) may write proprietary code that may not be interpreted by all the brwosers.
Faster editing. we can quickly change your code unlike WYSIWYG editors. WYSIWYG editors require, for example, a lot of computer-resources to start-up or load/open a page.
More flexibility. we can edit your code directly at the desired location. This cannot be always done with WYSIWYG editors.

Features of  WYSIWYG editors :

Support for other scripting languages. WYSIWYG editors provide advanced features to code in other programming/scripting languages such as JavaScript, XHTML, ASP/ASP.NET, PHP, and JSP.
Faster/simplified development. WYSIWYG editors allows you to develop pages quickly as the software writes the necessary code in response to the layout you design for your web page.
Better organization. Dreamweaver, for instance, allows you to define a site folder that contains all the files that make up the website. By defining a local site folder, you have many advantages including moving of files (without breaking links), searching of a particular term or tag in the entire site (without having the file open!), and FTP support to move only changed or new files to the server. 

In the next lesson  we are going to create an HTML document and execute it .If you need any reference of specific topic you can contact me  or provide names of topic in comments section below.Thanks for reading .
Read More
Summary

THIS ARTICLE IS JUST A START OF LEARNING HTML /CSS AND MANY MORE LANGUAGES .

Saturday, 29 March 2014

Test your skill in Java Programming

Posted by Unknown
 Are you thorough with Java? Want to test your proficiency in java ?
                                   well ,here's your chance to test your skills in java.These questions were taken from a test that was conducted by my college.I recommend you to try it. Attempt it just like an online exam  and try to complete it within 35 min.I won't be updating answers coz u know where to look for it.



1.Which four options describe the correct default values for array elements of the types indicated?


1. int -> 0
2. String -> "null"
3. Dog -> null
4. char -> '\u0000'
5. float -> 0.0f
6. boolean -> true

A.1, 2, 3, 4
B.1, 3, 4, 5
C.2, 4, 5, 6
D.3, 4, 5, 6


2.Which one of these lists contains only Java programming language keywords?


A.class, if, void, long, Int, continue
B.goto, instanceof, native, finally, default, throws
C.try, virtual, throw, final, volatile, transient
D.strictfp, constant, super, implements, do
E.byte, break, assert, switch, include

3.Which will legally declare, construct, and initialize an array?


A.int [] myList = {"1", "2", "3"};
B.int [] myList = (5, 8, 2);
C.int myList [] [] = {4,9,7,0};
D.int myList [] = {4, 3, 7};

4.Which is a reserved word in the Java programming language?


A.method
B.native
C.subclasses
D.reference
E.array

5.Which is a valid keyword in java?


A.interface
B.string
C.Float
D.unsigned

6.Which three are legal array declarations?


1. int [] myScores [];
2. char [] myChars;
3. int [6] myScores;
4. Dog myDogs [];
5. Dog myDogs [7];

7.Which three piece of codes are equivalent to line 3?


public interface Foo
{
    int k = 4; /* Line 3 */
}
1. final int k = 4;
2. public int k = 4;
3. static int k = 4;
4. abstract int k = 4;
5. volatile int k = 4;
6. protected int k = 4;



8.What will be the output of the program?


public class MyProgram
{
    public static void main(String args[])
    {
        try
        {
            System.out.print("Hello world ");
        }
        finally
        {
            System.out.println("Finally executing ");
        }
    }
}


A.Nothing. The program will not compile because no exceptions are specified.
B.Nothing. The program will not compile because no catch clauses are specified.
C.Hello world.
D.Hello world Finally executing

9.What will be the output of the program?


class Exc0 extends Exception { }
class Exc1 extends Exc0 { } /* Line 2 */
public class Test
{
    public static void main(String args[])
    {
        try
        {
            throw new Exc1(); /* Line 9 */
        }
        catch (Exc0 e0) /* Line 11 */
        {
            System.out.println("Ex0 caught");
        }
        catch (Exception e)
        {
            System.out.println("exception caught");
        }
    }
}

A.Ex0 caught
B.exception caught
C.Compilation fails because of an error at line 2.
D.Compilation fails because of an error at line 9.


10.What will be the output of the program?


public class X
{
    public static void main(String [] args)
    {
        try
        {
            badMethod(); /* Line 7 */
            System.out.print("A");
        }
        catch (Exception ex) /* Line 10 */
        {
            System.out.print("B"); /* Line 12 */
        }
        finally /* Line 14 */
        {
            System.out.print("C"); /* Line 16 */
        }
        System.out.print("D"); /* Line 18 */
    }
    public static void badMethod()
    {
        throw new RuntimeException();
    }
}

A.AB
B.BC
C.ACD
D.BCD

11.What will be the output of the program?


public class Test
{
    public static void aMethod() throws Exception
    {
        try /* Line 5 */
        {
            throw new Exception(); /* Line 7 */
        }
        finally /* Line 9 */
        {
            System.out.print("finally "); /* Line 11 */
        }
    }
    public static void main(String args[])
    {
        try
        {
            aMethod();
        }
        catch (Exception e) /* Line 20 */
        {
            System.out.print("exception ");
        }
        System.out.print("finished"); /* Line 24 */
    }
}


A.finally
B.exception finished
C.finally exception finished
D.Compilation fails

12.What will be the output of the program?


public class RTExcept
{
    public static void throwit ()
    {
        System.out.print("throwit ");
        throw new RuntimeException();
    }
    public static void main(String [] args)
    {
        try
        {
            System.out.print("hello ");
            throwit();
        }
        catch (Exception re )
        {
            System.out.print("caught ");
        }
        finally
        {
            System.out.print("finally ");
        }
        System.out.println("after ");
    }
}

A.hello throwit caught
B.Compilation fails
C.hello throwit RuntimeException caught after
D.hello throwit caught finally after

13.What will be the output of the program?


public class X
{
    public static void main(String [] args)
    {
        try
        {
            badMethod();
            System.out.print("A");
        }
        catch (RuntimeException ex) /* Line 10 */
        {
            System.out.print("B");
        }
        catch (Exception ex1)
        {
            System.out.print("C");
        }
        finally
        {
            System.out.print("D");
        }
        System.out.print("E");
          }

    public static void badMethod()
{
        throw new RuntimeException();
    }
}

A.BD
B.BCD
C.BDE
D.BCDE


14.What will be the output of the program?


public class X
{
    public static void main(String [] args)
    {
        try
        {
            badMethod();
            System.out.print("A");
        }
        catch (Exception ex)
        {
            System.out.print("B");
        }
        finally
        {
            System.out.print("C");
        }
        System.out.print("D");
          }

    public static void badMethod()
    {
        throw new Error(); /* Line 22 */
    }
}

A.ABCD
B.Compilation fails.
C.C is printed before exiting with an error message.
D.BC is printed before exiting with an error message.

15.What will be the output of the program?


try
{
    int x = 0;
    int y = 5 / x;
}
catch (Exception e)
{
    System.out.println("Exception");
}
catch (ArithmeticException ae)
{
    System.out.println(" Arithmetic Exception");
}
System.out.println("finished");

16.What will be the output of the program?


public class Foo
{
    public static void main(String[] args)
    {
        try
        {
            return;
        }
        finally
        {
            System.out.println( "Finally" );
        }
    }
}

A.Finally
B.Compilation fails.
C.The code runs with no output.
D.An exception is thrown at runtime.


17.which statement, inserted at line 10, creates an instance of Bar?

class Foo
{
         class Bar{ }
}
class Test
{
    public static void main (String [] args)
    {
        Foo f = new Foo();
        /* Line 10: Missing statement ? */
    }
}

A.Foo.Bar b = new Foo.Bar();
B.Foo.Bar b = f.new Bar();
C.Bar b = new f.Bar();
D.Bar b = f.new Bar();

18.Which constructs an anonymous inner class instance?


A.Runnable r = new Runnable() { };
B.Runnable r = new Runnable(public void run() { });
C.Runnable r = new Runnable { public void run(){}};
D.System.out.println(new Runnable() {public void run() { }});


19.Which statement is true about a static nested class?


A.You must have a reference to an instance of the enclosing class in order to instantiate it.
B.It does not have access to nonstatic members of the enclosing class.
C.It's variables and methods must be static.
D.It must extend the enclosing class.

20.Which is true about a method-local inner class?


A.It must be marked final.
B.It can be marked abstract.
C.It can be marked public.
D.It can be marked static.

21.which one create an anonymous inner class from within class Bar?

class Boo
{
    Boo(String s) { }
    Boo() { }
}
class Bar extends Boo
{
    Bar() { }
    Bar(String s) {super(s);}
    void zoo()
    {
    // insert code here
    }
}

A.Boo f = new Boo(24) { };
B.Boo f = new Bar() { };
C.Bar f = new Boo(String s) { };
D.Boo f = new Boo.Bar(String s) { };

22.Which is true about an anonymous inner class?

A.It can extend exactly one class and implement exactly one interface.
B.It can extend exactly one class and can implement multiple interfaces.
C.It can extend exactly one class or implement exactly one interface.
D.It can implement multiple interfaces regardless of whether it also extends a class.


23.What is the numerical range of a char?

A.-128 to 127
B.-(215) to (215) - 1
C.0 to 32767
D.0 to 65535

24.Which is a valid declarations of a String?

A.String s1 = null;
B.String s2 = 'null';
C.String s3 = (String) 'abc';
D.String s4 = (String) '\ufeed';


25.Which three are valid declarations of a float?

1. float f1 = -343;
2. float f2 = 3.14;
3. float f3 = 0x12345;
4. float f4 = 42e7;
5. float f5 = 2001.0D;
6. float f6 = 2.81F;


                     If you have any doubts regarding the Questions then post your comment in comments section below .
Read More

Tuesday, 18 March 2014

COMPUTER VOCABULARY :The List of definitions of computer terms .

Posted by Unknown
        Before getting into programming ,there is a need to understand the basic terminology of computer .So this article gives you fundamental terms used in programming .



Data :

         Data is defined as collection of related facts about a person or an object .so let me ask a question "Is the word "Data" plural or singular?" .
             Obviously "Data" is plural because it is collection of related facts as mentioned above .Many of you would answer this easily but the Tricky Part of question is "If  'Data' is plural then what 
is it's singular ?"
              Most of us never really gave it a thought,right?. so here is your answer
The Singular form of Data is known as 'Datum'

let me explain you the difference between the datum and data with an example :
consider the following details
Aditya  vardhaman  b.tech ----> data
          
 In the above relation, aditya,vardhaman,b.tech are facts about a person which are independently called as 'Datums' and collectively called as 'data'
           Thus Data is defined as collection of 'Datums'.

Note : 

          Data is collection of facts it is not necessary that it should have meaning . 

--> Data may or may not provide required meaning.
--> Hence some Operations have to be performed on it to make it meaningful.

Process :

              A Sequence of operations which are being performed on Data to get the Required meaning is known as "process"

Information :

                 Data produces after the processing is said to be "Information" it is simply stated as "Processed Data"

 Note :

           Whether the data is providing the required meaning or not ,The information must provide the required meaning.
 Let me explain you with previous example 

Aditya vardhaman  b.tech ---> data
Aditya is studying b.tech at vardhaman ---> Information 
              The Method of adding operations on data to make it meaningful(Information) is called processing.

Data --> operation(process) --> Information
Data --> computer --> information

What do You observe from above two relations ?
        computer = operations(process)
Thus ,We can define a computer as
" An Electronic device which takes the data ,processes it (stores it if necessary) and gives Information."
           Just giving the data for a computer is not sufficient but a program also to be written ,which tell the computer how that data can be processed.

program :

              A program is a Sequence of instructions (Written in some language),which tells the computer what to do and how to do .
Therefore ,the relation would be the following
data+program --> computer --> Information

The reason we learn all these is to understand what we are learning rather than simply reading it .
        
Thank you for reading this arrticle .please comment below if you know more about this article .

Read More

Definition of HTML/CSS

Posted by Unknown

LEARNING HTML/CSS

This article tells you about the two languages used for creating webpages and customizing your webpages.
HTML:
HTML means "Hyper Text Markup Language" which is used to create webpages . The latest version is HTML5 and many more versions are being updated . This is user
freindly language which can be understood easily.
The two main parts of this language is 
1. HTML tags.
2. HTML elements.

   1.HTML tags:

The basic structure of any HTML code starts with these tags . These tags are represented by angle brackets('<>') .There are two kinds of tags opening
  tag and closing tag which is used for starting and ending of tag respectively.

   2.HTML elements:  

Tags comprising with content is said to be HTML element as a whole . There are many HTML elements defined and it has been added few more for newer 
versions .

CSS:

       CSS means "Cascading Style Sheets" . This is language which is used to design webpages created by html like creating background colors,text formatting etc.., 
CSS3 is currently used version .


There are many websites which gives you detailed explanation about these two languages . You can refer those websites provided in referal links.


REFERAL LINKS:

www.w3schools.com
www.html.net
www.zentut.com

          Thanks for reading this article and please feel free to suggest any websites in comments below !!!
   
Read More

INTRODUCTION TO PHP

Posted by Unknown


PHP stands for Hypertext Preprocessor. PHP is a server side, general-purpose scripting language which originally designed for web development. PHP code  is embedded into HTML code to control the output of the web page.

What You Should Already Know

Before you continue you should have a basic understanding of the

 following:
  • HTML
  • CSS
  • JavaScript

How PHP code looks like?

Let’s take a look at a simple example of using PHP.
PHP code is embedded inside HTML document within the block that starts with <?php and ends with ?>. In the above example, we print out the “introduction to PHP” text in the web browser.

What is a PHP File?

  • PHP files can contain text, HTML, CSS, JavaScript, and PHP code
  • PHP code are executed on the server, and the result is returned to the browser as plain HTML
  • PHP files have extension ".php".

How PHP Works?

The PHP  resides in the server and processes PHP script. The processing flow is as follows:
how php works
  • In the client side, user sends a HTTP request to the web server by invoking PHP web page the web browser.
  • In the web server side, PHP executes the script, formats the output and sends generated page, which is in plain HTML format, back to the web browser.
  • Web browser then display HTML document to the user.

What PHP can do?

  • PHP can generate dynamic page content
  • PHP can create, open, read, write, delete, and close files on the server
  • PHP can collect form data
  • PHP can send and receive cookies
  • PHP can add, delete, modify data in your database
  • PHP can restrict users to access some pages on your website
  • PHP can encrypt data
With PHP you are not limited to output HTML. You can output

images, PDF files, and even Flash movies. You can also output

 any text, such as XHTML and XML.


Why PHP?

  • PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
  • PHP supports a wide range of databases
  • PHP is free. Download it from the official PHP resource: www.php.net
  • PHP is easy to learn and runs efficiently on the server side.
Please feel free To comment if you have any doubts regarding the article in comments below .
Read More