Monday, 24 November 2014

Beginning Programming
Structure of a Programming 
Java is an object oriented programming language, so any program that you write must be inside a class. To quickly get started with running Java applications, there are three basic steps
1. Create a class
public class HelloWorld {

}
2. Create a main method inside the class
public class HelloWorld {
public static void main(String[ ] args) {
}}
3. Write the code for the logic
public class HelloWorld {
/* A program to display the message "Hello World" on standard output */
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
The code above is a complete program to print the message "Hello World". Copy paste the code into scratch pad and run it.

Beginning Programming

Introduction

In this course you will learn how to solve problems by writing computer programs using the Java programming language. Like natural languages, programming languages also have their grammar (syntax) and rules of usage. You will become familiar with the syntax and comfortable with problem solving by practicing in the scratch pad area. Let us get started by printing the message "Welcome to Java!" on the console. Type the following in the scratch pad and run it
System.out.println("Welcome to Java!");

The message Welcome to Java! appears on the output window.

System.out.println("Welcome to Java!"); is a Java statement. Write a  statement to print "Java is easy" and try it out on the scratch pad. System.out.print() is another command that can be used to print to the console, use it to print the message "Java is fun" on the scratch pad. Do you see the difference between System.out.println and System.out.print? In the latter command, there is no newline after the message you print, so the cursor remains on the same line. Java is case sensitive, so you must preserve the case rules expected. So, try the following in the scratchpad. Correct it to make it work. system.out.println("Case matters!");
Java is case sensitive

Friday, 21 November 2014

What Is PHP?

PHP is officially known as PHP: Hypertext Preprocessor. It is a server-side scripting language often written in an HTML context. Unlike an ordinary HTML page, a PHP script is not sent directly to a client by the server; instead, it is parsed by the PHP engine. HTML elements in the script are left alone, but PHP code is interpreted and executed. PHP code in a script can query databases, create images, read and write files, talk to remote servers—the possibilities are endless. The output from PHP code is combined with the HTML in the script and the result sent to the user.

PHP is also installed as a command-line application, making it an excellent tool for scripting on a server. Many system administrators now use PHP for the sort of automation that has been traditionally handled by Perl or shell scripting.

Why Choose PHP?

There are some compelling reasons to work with PHP. For many projects, you will find that the production process is significantly faster than you might expect if you are used to working with other scripting languages. At Corrosive we work with both PHP and Java. We choose PHP when we want to see results quickly without sacrificing stability. As an open-source product, PHP is well supported by a talented production team and a committed user community. Furthermore, PHP can be run on all the major operating systems and with most servers.

Speed of Development

Because PHP allows you to separate HTML code from scripted elements, you will notice a significant decrease in development time on many projects. In many instances, you will be able to separate the coding stage of a project from the design and build stages. Not only can this make life easier for you as a programmer, but it also can remove obstacles that stand in the way of effective and flexible design.

PHP Is Open Source

To many people, open source simply means free, which is, of course, a benefit in itself.

Well-maintained open-source projects offer users additional benefits, though. You benefit from an accessible and committed community that offers a wealth of experience in the subject. Chances are that any problem you encounter in your coding can be answered swiftly and easily with a little research. If that fails, a question sent to a mailing list can yield an intelligent, authoritative response.

You also can be sure that bugs will be addressed as they are found, and that new features will be made available as the need is defined. You will not have to wait for the next commercial release before taking advantage of improvements.

There is no vested interest in a particular server product or operating system. You are free to make choices that suit your needs or those of your clients, secure that your code will run whatever you decide.

Performance

Because of the powerful Zend engine, PHP shows solid performance compared with other server scripting languages, such as ASP, Perl, and Java Servlets, in benchmark tests. To further improve performance, you can acquire a caching tool (Zend Accelerator) from http://www.zend.com/; it stores compiled code in memory, eliminating the overhead of parsing and interpreting source files for every request.

Portability

PHP is designed to run on many operating systems and to cooperate with many servers and databases. You can build for a Unix environment and shift your work to NT without a problem. You can test a project with Personal Web Server and install it on a Unix system running on PHP as an Apache module.

Data in GSM Networks

The Global System for Mobile Communication (GSM) is a multiservice cellular network. It provides not only voice service, but a good set of data services as well. This chapter describes the data services offered by a GSM network. It describes the data services before the advent of GPRS and EDGE.
The GSM data services can be categorized in terms of traffic, signaling, and broadcast channel data services. The GSM standard specifies data services on the traffic channel (TCH), which can be utilized by data applications such as fax and Internet service provider (ISP) connection. This is also referred to as circuit switched (CS) data service. The data service on a signaling channel is known as the point-to-point short message service (SMS). Using SMS, a subscriber sends or receives a short string of text (maximum 126 characters) using a signaling channel. There is another type of SMS service called SMS broadcast, which is the only broadcast channel data service. This service transports data on a specially defined broadcast channel to all the subscribers in a cell. The broadcast data applications, such as traffic reports and weather alerts, were anticipated to use this service, but it didn't get much attention in deployment from cellular service providers.

Installing Remote Desktop connection on non-XP systemsInstalling Remote Desktop connection on non-XP systems

Non-Windows XP systems can also access Windows systems running Windows Remote Desktop. The local system used to access the remote computer must have the remote connectivity client software installed. To install the required Terminal Services components:
  1. Insert a Windows XP Professional CD in the local system’s CD or DVD drive.
  2. From the resulting Welcome To Microsoft Windows XP screen, click Perform Additional Tasks.
  3. Click Setup Remote Desktop Connection from the What Do You Want To Do Screen.
  4. The InstallShield Wizard will open; click Next on the Welcome To The InstallShield Wizard for Remote Desktop Connection.
  5. Read and accept the license agreement and click Next.
  6. Enter the customer name and organization, and specify whether the desktop connection is to be available to all users or only the logged in user and click Next.
  7. Click Install.
  8. Click Finish.
The older Windows system can now open the Remote Desktop Connection menu by clicking Start | Programs | Accessories | Communications | Remote Desktop Connection or by opening a command prompt and typing mstsc.

What is a Firewall?

A firewall is a security device that can be a software program or a dedicated network appliance. The main purpose of a firewall is to separate a secure area from a less secure area and to control communications between the two. Firewalls can perform a variety of other functions, but are chiefly responsible for controlling inbound and outbound communications on anything from a single machine to an entire network.

What is Network Address Translation?

Network Address Translation (NAT) is the process where a network device, usually a firewall, assigns a public address to a computer (or group of computers) inside a private network. The main use of NAT is to limit the number of public IP addresses an organization or company must use, for both economy and security purposes.
The most common form of network translation involves a large private network using addresses in a private range (10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, or 192.168.0 0 to 192.168.255.255). The private addressing scheme works well for computers that only have to access resources inside the network, like workstations needing access to file servers and printers. Routers inside the private network can route traffic between private addresses with no trouble. However, to access resources outside the network, like the Internet, these computers have to have a public address in order for responses to their requests to return to them. This is where NAT comes into play.
Internet requests that require Network Address Translation (NAT) are quite complex but happen so rapidly that the end user rarely knows it has occurred. A workstation inside a network makes a request to a computer on the Internet. Routers within the network recognize that the request is not for a resource inside the network, so they send the request to the firewall. The firewall sees the request from the computer with the internal IP. It then makes the same request to the Internet using its own public address, and returns the response from the Internet resource to the computer inside the private network. From the perspective of the resource on the Internet, it is sending information to the address of the firewall. From the perspective of the workstation, it appears that communication is directly with the site on the Internet. When NAT is used in this way, all users inside the private network access the Internet have the same public IP address when they use the Internet. That means only one public addresses is needed for hundreds or even thousands of users.
Most modern firewalls are stateful - that is, they are able to set up the connection between the internal workstation and the Internet resource. They can keep track of the details of the connection, like ports, packet order, and the IP addresses involved. This is called keeping track of the state of the connection. In this way, they are able to keep track of the session composed of communication between the workstation and the firewall, and the firewall with the Internet. When the session ends, the firewall discards all of the information about the connection.
There are other uses for Network Address Translation (NAT) beyond simply allowing workstations with internal IP addresses to access the Internet. In large networks, some servers may act as Web servers and require access from the Internet. These servers are assigned public IP addresses on the firewall, allowing the public to access the servers only through that IP address. However, as an additional layer of security, the firewall acts as the intermediary between the outside world and the protected internal network. Additional rules can be added, including which ports can be accessed at that IP address. Using NAT in this way allows network engineers to more efficiently route internal network traffic to the same resources, and allow access to more ports, while restricting access at the firewall. It also allows detailed logging of communications between the network and the outside world.
Additionally, NAT can be used to allow selective access to the outside of the network, too. Workstations or other computers requiring special access outside the network can be assigned specific external IPs using NAT, allowing them to communicate with computers and applications that require a unique public IP address. Again, the firewall acts as the intermediary, and can control the session in both directions, restricting port access and protocols.
NAT is a very important aspect of firewall security. It conserves the number of public addresses used within an organization, and it allows for stricter control of access to resources on both sides of the firewall.