Fire Tablet Alexa Display Black

Wednesday, May 9, 2012

Creat Your First Program

Your First Program

Your first program will be short and sweet. It is going to create a drawing area and draw a diagonal line across it. To create this program you will need to:
  1. Open Notepad and type in (or cut and paste) the program
  2. Save the program
  3. Compile the program with the Java compiler to create a Java applet
  4. Fix any problems
  5. Create an HTML web page to "hold" the Java Applet you created
  6. Run the Java applet
Here is the program we will use for this demonstration:
import java.awt.Graphics;

public class FirstApplet extends java.applet.Applet
{

    public void paint(Graphics g)
    {
        g.drawLine(0, 0, 200, 200);
    }
}
Step 1 - Type in the program
Create a new directory to hold your program. Open up Notepad (or any other text editor that can create TXT files). Type or cut and paste the program into the Notepad window. This is important: When you type the program in, case matters. That means that you must type the uppercase and lowercase characters exactly as they appear in the program. Review the programmer's creed above. If you do not type it EXACTLY as shown, it is not going to work.
Step 2 - Save the file
Save the file to the filename FirstApplet.java in the directory that you created in step 1. Case matters in the filename. Make sure the 'F' and 'A' are uppercase and all other characters are lowercase, as shown.
Step 3 - Compile the program
Open an MS-DOS window. Change directory ("cd") to the directory containing FirstApplet.java. Type:

    javac FirstApplet.java
Case matters! Either it will work, in which case nothing will be printed to the window, or there will be errors. If there are no errors, a file named FirstApplet.class will be created in the directory right next to FirstApplet.java.
(Make sure that the file is saved to the name FirstApplet.java and not FirstApplet.java.txt. This is most easily done by typing dir in the MS-DOS window and looking at the file name. If it has a .txt extension, remove it by renaming the file. Or run the Windows Explorer and select Options in the View menu. Make sure that the "Hide MD-DOS File Extensions for file types that are registered" box is NOT checked, and then look at the filename with the explorer. Change it if necessary.)
Step 4 - Fix any problems
If there are errors, fix them. Compare your program to the program above and get them to match exactly. Keep recompiling until you see no errors. If javac seems to not be working, look back at the previous section and fix your installation.
Step 5 - Create an HTML Page
Create an HTML page to hold the applet. Open another Notepad window. Type into it the following:








Save this file in the same directory with the name applet.htm.
[If you have never worked with HTML before, please read How a Web Page Works. The applet tag is how you access a Java applet from a web page.]
Step 6 - Run the Applet
In your MS-DOS window, type:

    appletviewer applet.htm
You should see a diagonal line running from the upper left corner to the lower right corner:



Pull the applet viewer a little bigger to see the whole line. You should also be able to load the HTML page into any modern browser like Netscape Navigator or Microsoft Internet Explorer and see approximately the same thing.
You have successfully created your first program!!!

The C programming language



The C programming language is incredibly popular, and it's easy to see why. Programming in C is efficient and gives the programmer a great deal of control. Many other programming languages like C++, Java and Python were developed using C.
Chances are increasing each day that if you're a programmer, you won't use C exclusively for your work. However, there are several learning C is highly beneficial, even if you don't use it regularly. Here's why:
You'll be able to read and write code for software that can be used on many different types of computer platforms, including everything from small microcontrollers to desktop, laptop and mobile operating systems.
You'll better understand what high-level languages are doing behind the scenes, such as memory management and garbage collection. This understanding can help you write programs that work more efficiently.
If you're an information technology (IT) specialist, you could also benefit from learning C. IT professionals often write, maintain and run scripts as part of their job. A script is a list of instructions for a computer's operating system to follow. To run certain scripts, the computer sets up a controlled execution environment called a shell. Since most operating systems run shells based on C, C shell is a popular scripting adaptation of C used by IT pros.
This article covers the history behind C, looks at why C is so important, shows examples of some basic C code and explores some important features of C, including data types, operations, functions, pointers and memory management. Though this article isn't an instruction manual for programming in C, it does cover what makes C programming unique in a way that goes beyond those first few chapters of the average C programming guide.
Let's start by looking at where the C programming language came from, how it has developed and the role it has in software development today.

TECH-SERIES AND ALL ABOUT BRIAN: Watch and Download Online Flash Streaming Videos From Hulu, Youtube, DailyMotion With Stream Transport Downloader

TECH-SERIES AND ALL ABOUT BRIAN: Watch and Download Online Flash Streaming Videos From Hulu, Youtube, DailyMotion With Stream Transport Downloader

Watch and Download Online Flash Streaming Videos From Hulu, Youtube, DailyMotion With Stream Transport Downloader

Watch and Download Online Flash Streaming Videos From Hulu, Youtube, DailyMotion With Stream Transport Downloader

With StreamTransport.com flash streaming video downloader, you can easily watch and download tv shows, movies and video from Hulu.com, youtube.com Google Video, MySpace.com, Yahoo video, CBS, MTV, Photobucket, Dailymotion, veoh, Demand Five lots more other video flash streaming sites that uses hard scripts
StreamTransport video downloader manager version 1.0.2.2171 works on the latest best videos, online tv shows and movies leeching technology.
Stream Transport apart from being use to watch and download stubborn and hard videos, its can also be used to download password-protected webinars
Download the latest version of streamTransport from the download link below, just install and rock