Monday, November 5, 2012

Introductory Guide to Git Version Control System

Git is a version control system used by development and programming teams, popularopen source projects, and other team collaboration projects. In this Git guide, we will discuss the value of version control systems, an overview of Git, advantages and disadvantages of using Git, how to install Git, basic commands, tools and essential Git resources. (For designers, also check out The Ultimate Guide to Version Control for Designers.)


What Is Version Control?

Essentially a version control system (or a revision control system) is software that has the ability to manage and track changes that occur to any document that is in a given project. In other words, you have the ability to take "snapshots" of your files during your current body of work, and you will be able to return to any of these snapshots whenever you wish. It provides a history of what you did, when you did it and what files you did it to.
Do not think of these snapshots as backups because with a backup you have a separate copy of a file. With a version control system, this all happens seamlessly in the background using databases. The disk space used for keeping version information is minimal.
The other advantage of a version control system is that you don’t have multiple backup files to manage.
Git is a distributed revision control system, which just means that if you have multiple people in a project, they can work individually without being connected to a central network, and then they can just push to the project when they are ready.
A key benefit of version control is being able to have several people working on the same document at once. You then will have the ability to merge these changes so that each member can work on the same file without fear that they are affecting each other’s work. Pretty cool, eh?

Who Should Use a Version Control System?

Anyone who works with files on a regular basis — whether it’s for developing a web app, building a static website, managing an open source project, or heck, even teams working on MS Office documents — should look at version control.
Historically, version control systems have been associated with developers and programmers because they normally deal with source code files (which are essentially text files) and because they work in teams where different members may be dipping in and out of various files. Imagine having 5 developers working on the same project: managing 5 files would mean 20 more files to deal with. Most projects will have many, many files and even more developers– and as you can soon imagine, it can become quite a nightmare.

Advantages of Using Git

  • Git is super easy to install: I will take you through the installation process – it’s a breeze.
  • Git is easier to learn compared to other systems: by the end of this guide, you will have enough knowledge to get going with Git.
  • Git is fast: So much so that it doesn’t become one of those things you have to force yourself to remember to do and you can integrate it seamlessly with your current workflow.
  • Git is decentralized: If many people are working on a project, they each can have their own copy and not save over each other.

Disadvantages of Using Git

  • Git has a learning curve: Whilst I did say that it’s one of the easier version control systems to use, any new thing you introduce to your workflow will need some learning time. Learning Git will be similar to learning a new software application such as Word or Excel.

Installing Git

Git is available for Windows, Mac OS X and Linux. Installing it is surprisingly easy.
You can of course get your hands on the source of the project itself, including nightly builds if you want to be a bit more adventurous, but I would just stick to stable releases for now.

Windows Git Installation

You have two options on Windows.
The easiest and quickest way to install Git on Windows is to download the msysGit exe file from Google Project Hosting. msysGit is Git for Windows. Once installed, Git will be automatically compiled, which is nice. It also gives you GUI modifications, particularly, giving your right-click an additional contextual menu for Git operations.
The second option is Git on Cywgin, which is the route I would recommend at first until you get familiarized with how Git works fundamentally. Cywgin is one of the handiest Windows tools you can download because it allows you to run a Linux-like environment in Windows. When you set up Cywgin, you will have an option to add Git to your system and then you’ll be ready to go.

Linux Git Installation

There are some RPMs and Debs available if you want to use your package manager to install Git for you, but installing from source is easy enough. Download the source package and make sure you have the following dependencies: expat, curl, zlib, and openssl.
Once you have what you need, you can call your normal make/build commands.

Testing Your Git Installation

The first thing you will want to do after installing Git is to ensure that your install went OK. The easiest way to do this is to type the following into the command line:
git --version
If it worked, you should see something like this:
Testing Your Git Installation
If you issue the command and you get nothing back, or you get some sort of error message, we can assume that Git wasn’t installed correctly. If this is the case, look over the Git documentation and go from there.

Creating a New Repository

Now, let’s start actually using Git. The first thing we will want to do is make a new Git repository. A repository is just the directory where Git will keep an eye on things for you. You can create repositories for each of your projects.
In the command line, browse to the directory you want to make into a Git repository. Better yet, create a new directory.
Once you are in the directory, type the following command:
git init
If it worked, you should see something similar to this:
Creating a New Repository

Adding Files to the Repository

Git will now be keeping a watchful eye on anything that happens in the directory we initiated. Of course, there is nothing in there to watch or do anything with yet. We can change that by adding something to the repository. Do that now by creating a small text file. I called my file filename.txt and placed "Hello World!" inside it.
Once you have created the text file in the directory, we need to tell Git to track it, which just means that it will monitor the file for changes.
The command for adding files is:
git add *
This command says to Git, "add everything in the current directory."
If you wanted to be more specific, you could have written:
git add filename.txt

Committing Files

The Git add command is normally followed immediately by the Git commit command. When we commit something, we are saying that we want this to be a snapshot of our work.
When we commit a file in Git, we need to give it a commit message. The commit message just explains what we are committing and why. Think of your commit message as sort of your notes on the particular snapshot of the file.
The command for committing is:
git commit -a -m "This is my commit message!"
The last bit within the quotes is your commit message.

Running add and commit

Let’s run both the add command and the commit command and then look at the output.
Running add and commit
The output you get essentially reads back your commit message and tells you what files have changed and how they’ve changed. In my case, we find that:
  • 1 file has changed in the repository (we only have 1 file)
  • 2 insertions were made (my file is two lines long)
  • 0 deletions (nothing was removed)
  • The last line explains that Git had to create the file because it didn’t exist before

Seeing Changes to Files

Now that we have committed our text file, we can continue on our merry way. Let’s assume that the next thing we need to do is add a new line to our text file. So we change our text file and add a line or two, and then we grab some coffee. Coffee turns to lunch and by the time we get back to our workstation, we have forgotten what we just did.
Never fear because Git has a command to help. We can issue the following command:
git diff
The diff command will tell you what has changed between an uncommitted file or the current file you’re working on versus the last commit you made.
After making some changes to your text file and saving the file, running the diffcommand will show us this output:
Seeing Changes to Files
This tells us that filename.txt has changed and between a/ (the committed version of the file) and b/ (the most recent version of the file). The thing that has changed is that a new line has been added (and the line that was added says, "Line the second!").
The line saying "Hello, World!" hasn’t been touched, but Git has added the text near the edited line so that you have a bit of context.
Once you have confirmed that all the changes you want to make in this commit are made, then we can commit it again using the commit command.

Logging and Reverting Back to Previous Commits

Let’s say that we’ve committed our repository files and it’s time to go home. You get home, you have dinner, watch your TV shows, and now you’re headed to bed. Then you suddenly realize that your CSS stylesheet changes were terrible today and you know you wouldn’t get to sleep knowing you’ve committed some bad code.
What you can do is to go back to your previous commit.
But first, what you want to do is get a log of your commits. Just issue the following command:
git log
Logging and Reverting Back to Previous Commits
The log command will give you the commit hash (the unique ID of your commit), the author of the commit, and the date/time it was committed.
The most important bit of information for us in order to revert back is the commit hash. Copy the commit hash that you want to ignore.
Then you want to issue the following command, replacing [YourHash] with the hash you copied:
git revert [YourHash]
The revert command will bring up an editor which will allow you to change the commit message. You can just quit out of the editor if you don’t want to make any changes and your revert will be complete.
You can confirm the success of your revert by opening up the file. The things you changed in the commit should be gone and you will be left with your original file.

Exploring Git Further

Now that you know the basics of using Git, you can begin exploring it more and figuring out the best workflow for your given style.
One important notion I want to say is that Git doesn’t have to be used in the command line. Learning how to use Git through the command line gives you great fundamental knowledge of how the system works, but after you know the basics, you may want to use some tools that can enhance your Git experience. Another benefit of mastering Git through the command line is that you will be able to use Git regardless of what operating system you are currently using.
However, there are many tools available at your disposal to make Git easier. What we will discuss next is the Gitk repository browser, Git commands and tools you will likely be using regularly and a few external tools that can enhance Git.

Gitk

One tool that comes bundled with Git is Gitk. Gitk is a Git repository browser, and it is a GUI for your projects.
Type in the following command to access Gitk:
gitk
Exploring Git Further

Helpful Git Commands

Here are some Git commands I use daily. There are many Git features that I have never used before or have only used once (the system has a massive feature set).
  • add — For adding new files to your project
  • commit — For committing changes to your project
  • push — We push all our code to a central repository so all the devs can share their code. Features like push are what make Git a really powerful tool
  • pull — This is what you use to grab someone else’s code, the opposite of push
  • branch — If you want to branch off from the main commit and try something different (for example, if you would like to test something), the original branch will stay untouched while you work away
  • merge — You can merge a branch back to the main code base
  • clone — When I want to clone a new repository from someone, this will bring down the master branch
  • gitk — The visual tool for what you have been doing in Git



Friday, November 2, 2012

Use to JSP in Tag

<jsp:include> : to include pages at request time , JSP content cannot affect main page: only output of included JSP page is used
<%@include> : (the include directive) to include files at page translation time, To reuse JSP content in multiple pages, where JSP content affects main page


RequestDispatcher .forward/include : Is used when we want to forward request from server to server there is no client interaction.

response.sendRedirect() : In this case client is involved, first request is forwarded to client and then new request is generated from client side. In this case Header value is set by server to tell the client browser to generate new request.

When you invoke a forward request, the request is sent to another resource on the server, without the client being informed that a different resource is going to process the request. This process occurs completly with in the web container. When a sendRedirtect method is invoked, it causes the web container to return to the browser indicating that a new URL should be requested. Because the browser issues a completly new request any object that are stored as request attributes before the redirect occurs will be lost. This extra round trip a redirect is slower than forwa
It is good to user RequestDispatcher then sendRedirect.

Sagar Vasule

Thursday, October 25, 2012

Ubuntu 12.04 – install sun jdk 6-7


Ubuntu GNU/Linux 12.04 LTS (Precise Pangolin) released. I wanted to manually install the Sun JDK 6 and 7 on Ubuntu.
Installing Sun JDK 6 on Ubuntu 12.04:
  • Make the bin file executeable:
chmod +x jdk-6u32-linux-x64.bin
  • Extract the bin file:
./jdk-6u32-linux-x64.bin
  • Move extracted folder to this location:
sudo mv jdk1.6.0_32 /usr/lib/jvm/
  • Install new java source in system:
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_32/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_32/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_32/bin/javaws 1
  • Choose default java:
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
  • java version test:
java -version
  • Verify the symlinks all point to the new java location:
ls -la /etc/alternatives/java*
  • Enable Java plugin for Mozilla Firefox (even for Chrome)
#for 64-Bit jdk
sudo ln -s /usr/lib/jvm/jdk1.6.0_32/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins
#for 32-Bit jdk
sudo ln -s /usr/lib/jvm/jdk1.6.0_32/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins
Installing Sun JDK 7 on Ubuntu 12.04:
  • Download the sun jdk 7 tar file from here
  • Extract the tar file:
tar -xvzf jdk-7u4-linux-x64.tar.gz
  • Move extracted folder to this location:
sudo mv jdk1.7.0_04 /usr/lib/jvm/
  • Install new java source in system:
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_04/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_04/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_04/bin/javaws 1
  • Choose default java:
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
  • java version test:
java -version
  • Verify the symlinks all point to the new java location:
ls -la /etc/alternatives/java*
  • Enable Java plugin for Mozilla Firefox (even for Chrome)
#for 64-Bit jdk
sudo ln -s /usr/lib/jvm/jdk1.7.0_04/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins
#for 32-Bit jdk
sudo ln -s /usr/lib/jvm/jdk1.7.0_04/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins
Update: I have added Java Web Start configuration (Thanks Jack).
Update: I have added Java Plugin configuration for Mozilla Firefox even for Chrome (Thanks shetty).
Update: JAVA_HOME configuration: Some tools require JAVA_HOME variable. You can set JAVA_HOME in Ubuntu so simple: Edit the file .bashrc under your home directory and add the following lines: (if .bashrc is hidden click in Nautilus Menu View > Show Hidden Files)
export JAVA_HOME=/path/your/jdk
export PATH=$JAVA_HOME/bin:$PATH

Installing Wine IN UBUNTU 12.04



You’ll find Wine available in the Ubuntu Software Center. Both stable and beta versions are available — here, version 1.2 is stable and version 1.3 is beta. The stable version is more tested — sometimes, a regression in the beta version can cause an application to stop working, but some applications will only work with the newer, beta version. An application’s entry in the Wine application database sometimes contains information about the necessary version of Wine you’ll need.

Running an Application

Once you’ve got Wine installed, you can download an application’s EXE or MSI (Microsoft Installer) file and double-click it — just like you would if you were using Windows — to run it with Wine.
This isn’t always the best way to run an application. If you’re encountering a problem, you can run the application from the terminal to see detailed error messages that can help you troubleshoot the problem. Just use the following command:
wine /path/to/application.exe
If you have an MSI file instead, use the following command to install it:
wine msiexec /i /path/to/installer.msi
Bear in mind that many of the error messages don’t matter. For example, the fixme message here indicates that Wine doesn’t contain support for a specific function yet, but the application runs fine without this function.
If the application requires installation, install it as if you were using Windows.
Once it’s installed, you’ll find its shortcuts in your applications menu, and possibly on your desktop.

Wine’s Utilities

The Wine package comes with a few utilities, which you can access from the applications menu. Just type Wine in the application menu to search for them.
Wine’s configuration dialog contains a variety of options, some of which you may need to get applications working. You can set the Windows version Wine behaves as, or set specific Windows versions for each individual applicaiton. Other options include graphics, audio and theming settings.
The Uninstall Wine Software utility lists your installed software and allows you to remove programs.
The package also includes Winetricks, a helper script that automates some tasks. Winetracks can guide you through installing certain popular applications and games — you won’t find every supported application here, though.

The Registry & File System

Many applications require registry tweaks to work properly. You’ll often find information about which registry entries to modify on the application database. Execute the regedit command from a terminal to access Wine’s registry editor.
Wine uses a virtual Windows file system, which is stored in the hidden .wine folder in your home folder. Use the View -> Show Hidden Files option in the file manager to reveal it. Once you have, you’ll find a folder nameddrive_c in the .wine folder — this folder contains the contents of Wine’s C: drive.

Fun, geeky fact: Wine stands for “Wine is not a Windows emulator.” It doesn’t emulate Windows; it’s an implementation of the Windows API for Linux, Mac OS X, Solaris and the BSD family of operating systems.

Monday, October 22, 2012

All Windows XP & 7 Command Prompt Commands



All Windows XP & 7  Command Prompt Commands

   ADDUSERS Add or list users to/from a CSV file
   ADmodcmd Active Directory Bulk Modify
   ARP      Address Resolution Protocol
   ASSOC    Change file extension associations•
   ASSOCIAT One step file association
   ATTRIB   Change file attributes
b
   BCDBOOT  Create or repair a system partition
   BCDEDIT  Manage Boot Configuration Data
   BITSADMIN Background Intelligent Transfer Service
   BOOTCFG  Edit Windows boot settings
   BROWSTAT Get domain, browser and PDC info
c
   CACLS    Change file permissions
   CALL     Call one batch program from another•
   CERTREQ  Request certificate from a certification authority
   CD       Change Directory - move to a specific Folder•
   CHANGE   Change Terminal Server Session properties
   CHKDSK   Check Disk - check and repair disk problems
   CHKNTFS  Check the NTFS file system
   CHOICE   Accept keyboard input to a batch file
   CIPHER   Encrypt or Decrypt files/folders
   CleanMgr Automated cleanup of Temp files, recycle bin
   CLEARMEM Clear memory leaks
   CLIP     Copy STDIN to the Windows clipboard
   CLS      Clear the screen•
   CLUSTER  Windows Clustering
   CMD      Start a new CMD shell
   CMDKEY   Manage stored usernames/passwords
   COLOR    Change colors of the CMD window•
   COMP     Compare the contents of two files or sets of files
   COMPACT  Compress files or folders on an NTFS partition
   COMPRESS Compress individual files on an NTFS partition
   CON2PRT  Connect or disconnect a Printer
   CONVERT  Convert a FAT drive to NTFS
   COPY     Copy one or more files to another location•
   CSCcmd   Client-side caching (Offline Files)
   CSVDE    Import or Export Active Directory data 
d
   DATE     Display or set the date•
   DEFRAG   Defragment hard drive
   DEL      Delete one or more files•
   DELPROF  Delete user profiles
   DELTREE  Delete a folder and all subfolders
   DevCon   Device Manager Command Line Utility 
   DIR      Display a list of files and folders•
   DIRUSE   Display disk usage
   DISKPART Disk Administration
   DISKSHADOW Volume Shadow Copy Service
   DNSSTAT  DNS Statistics
   DOSKEY   Edit command line, recall commands, and create macros
   DriverQuery Display installed device drivers
   DSACLs   Active Directory ACLs
   DSAdd    Add items to active directory (user group computer) 
   DSGet    View items in active directory (user group computer)
   DSQuery  Search for items in active directory (user group computer)
   DSMod    Modify items in active directory (user group computer)
   DSMove   Move an Active directory Object
   DSRM     Remove items from Active Directory
e
   ECHO     Display message on screen•
   ENDLOCAL End localisation of environment changes in a batch file•
   ERASE    Delete one or more files•
   EVENTCREATE Add a message to the Windows event log
   EXIT     Quit the current script/routine and set an errorlevel•
   EXPAND   Uncompress files
   EXTRACT  Uncompress CAB files
f
   FC       Compare two files
   FIND     Search for a text string in a file
   FINDSTR  Search for strings in files
   FOR /F   Loop command: against a set of files•
   FOR /F   Loop command: against the results of another command•
   FOR      Loop command: all options Files, Directory, List•
   FORFILES Batch process multiple files
   FORMAT   Format a disk
   FREEDISK Check free disk space (in bytes)
   FSUTIL   File and Volume utilities
   FTP      File Transfer Protocol
   FTYPE    File extension file type associations•
g
   GETMAC   Display the Media Access Control (MAC) address
   GLOBAL   Display membership of global groups
   GOTO     Direct a batch program to jump to a labelled line•
   GPRESULT Display Resultant Set of Policy information
   GPUPDATE Update Group Policy settings
h
   HELP     Online Help
i
   iCACLS   Change file and folder permissions
   IF       Conditionally perform a command•
   IFMEMBER Is the current user a member of a Workgroup
   IPCONFIG Configure IP
k
   KILL     Remove a program from memory
l
   LABEL    Edit a disk label
   LOCAL    Display membership of local groups
   LOGEVENT Write text to the event viewer
   LOGMAN   Manage Performance Monitor
   LOGOFF   Log a user off
   LOGTIME  Log the date and time in a file
m
   MAPISEND Send email from the command line
   MBSAcli  Baseline Security Analyzer
   MEM      Display memory usage
   MD       Create new folders•
   MKLINK   Create a symbolic link (linkd)
   MODE     Configure a system device
   MORE     Display output, one screen at a time
   MOUNTVOL Manage a volume mount point
   MOVE     Move files from one folder to another•
   MOVEUSER Move a user from one domain to another
   MSG      Send a message
   MSIEXEC  Microsoft Windows Installer
   MSINFO32 System Information
   MSTSC    Terminal Server Connection (Remote Desktop Protocol)
   MV       Copy in-use files
n
   NET      Manage network resources
   NETDOM   Domain Manager
   NETSH    Configure Network Interfaces, Windows Firewall & Remote access
   NETSVC   Command-line Service Controller
   NBTSTAT  Display networking statistics (NetBIOS over TCP/IP)
   NETSTAT  Display networking statistics (TCP/IP)
   NOW      Display the current Date and Time 
   NSLOOKUP Name server lookup
   NTBACKUP Backup folders to tape
   NTRIGHTS Edit user account rights
o
   OPENFILES Query or display open files
p
   PATH     Display or set a search path for executable files•
   PATHPING Trace route plus network latency and packet loss
   PAUSE    Suspend processing of a batch file and display a message•
   PERMS    Show permissions for a user
   PERFMON  Performance Monitor
   PING     Test a network connection
   POPD     Return to a previous directory saved by PUSHD•
   PORTQRY  Display the status of ports and services
   POWERCFG Configure power settings
   PRINT    Print a text file
   PRINTBRM Print queue Backup/Recovery
   PRNCNFG  Display, configure or rename a printer
   PRNMNGR  Add, delete, list printers set the default printer
   PROMPT   Change the command prompt•
   PsExec     Execute process remotely
   PsFile     Show files opened remotely
   PsGetSid   Display the SID of a computer or a user
   PsInfo     List information about a system
   PsKill     Kill processes by name or process ID
   PsList     List detailed information about processes
   PsLoggedOn Who's logged on (locally or via resource sharing)
   PsLogList  Event log records
   PsPasswd   Change account password
   PsPing     Measure network performance
   PsService  View and control services
   PsShutdown Shutdown or reboot a computer
   PsSuspend  Suspend processes
   PUSHD    Save and then change the current directory•
q
   QGREP    Search file(s) for lines that match a given pattern
   Query Process    Display processes (TS/Remote Desktop)
   Query Session    Display all sessions (TS/Remote Desktop)
   Query TermServer List all servers (TS/Remote Desktop)
   Query User       Display user sessions (TS/Remote Desktop)
r
   RASDIAL  Manage RAS connections
   RASPHONE Manage RAS connections
   RECOVER  Recover a damaged file from a defective disk
   REG      Registry: Read, Set, Export, Delete keys and values
   REGEDIT  Import or export registry settings
   REGSVR32 Register or unregister a DLL
   REGINI   Change Registry Permissions
   REM      Record comments (remarks) in a batch file•
   REN      Rename a file or files•
   REPLACE  Replace or update one file with another
   Reset Session  Delete a Remote Desktop Session
   RD       Delete folder(s)•
   RMTSHARE Share a folder or a printer
   ROBOCOPY Robust File and Folder Copy
   ROUTE    Manipulate network routing tables
   RUN      Start | RUN commands
   RUNAS    Execute a program under a different user account
   RUNDLL32 Run a DLL command (add/remove print connections)

s
   SC       Service Control
   SCHTASKS Schedule a command to run at a specific time
   SCLIST   Display Services
   SET      Display, set, or remove session environment variables•
   SETLOCAL Control the visibility of environment variables•
   SETX     Set environment variables
   SFC      System File Checker 
   SHARE    List or edit a file share or print share
   ShellRunAs Run a command under a different user account
   SHIFT    Shift the position of batch file parameters•
   SHORTCUT Create a windows shortcut (.LNK file)
   SHOWGRPS List the Workgroups a user has joined
   SHOWMBRS List the Users who are members of a Workgroup
   SHUTDOWN Shutdown the computer
   SLEEP    Wait for x seconds
   SLMGR    Software Licensing Management (Vista/2008)
   SOON     Schedule a command to run in the near future
   SORT     Sort input
   START    Start a program, command or batch file•
   SU       Switch User
   SUBINACL Edit file and folder Permissions, Ownership and Domain
   SUBST    Associate a path with a drive letter
   SYSTEMINFO List system configuration
t
   TAKEOWN  Take ownership of a file
   TASKLIST List running applications and services
   TASKKILL Remove a running process from memory
   TIME     Display or set the system time•
   TIMEOUT  Delay processing of a batch file
   TITLE    Set the window title for a CMD.EXE session•
   TLIST    Task list with full path
   TOUCH    Change file timestamps    
   TRACERT  Trace route to a remote host
   TREE     Graphical display of folder structure
   TSSHUTDN Remotely shut down or reboot a terminal server
   TYPE     Display the contents of a text file•
   TypePerf Write performance data to a log file
u
   USRSTAT  List domain usernames and last login
v
   VER      Display version information•
   VERIFY   Verify that files have been saved•
   VOL      Display a disk label•
w
   WAITFOR  Wait for or send a signal
   WHERE    Locate and display files in a directory tree
   WHOAMI   Output the current UserName and domain
   WINDIFF  Compare the contents of two files or sets of files
   WINMSDP  Windows system report
   WINRM    Windows Remote Management
   WINRS    Windows Remote Shell
   WMIC     WMI Commands
   WUAUCLT  Windows Update
x
   XCACLS   Change file and folder permissions
   XCOPY    Copy files and folders
   ::       Comment / Remark•

Thursday, October 18, 2012

Global Positioning System (GPS) History


What is GPS?

satellite
The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. GPS was originally intended for military applications, but in the 1980s, the government made the system available for civilian use. GPS works in any weather conditions, anywhere in the world, 24 hours a day. There are no subscription fees or setup charges to use GPS.

How it works

GPS satellites circle the earth twice a day in a very precise orbit and transmit signal information to earth. GPS receivers take this information and use triangulation to calculate the user's exact location. Essentially, the GPS receiver compares the time a signal was transmitted by a satellite with the time it was received. The time difference tells the GPS receiver how far away the satellite is. Now, with distance measurements from a few more satellites, the receiver can determine the user's position and display it on the unit's electronic map.
GPS Screens
A GPS receiver must be locked on to the signal of at least three satellites to calculate a 2D position (latitude and longitude) and track movement. With four or more satellites in view, the receiver can determine the user's 3D position (latitude, longitude and altitude). Once the user's position has been determined, the GPS unit can calculate other information, such as speed, bearing, track, trip distance, distance to destination, sunrise and sunset time and more.

How accurate is GPS?

Today's GPS receivers are extremely accurate, thanks to their parallel multi-channel design. Garmin's 12 parallel channel receivers are quick to lock onto satellites when first turned on and they maintain strong locks, even in dense foliage or urban settings with tall buildings. Certain atmospheric factors and other sources of error can affect the accuracy of GPS receivers. Garmin® GPS receivers are accurate to within 15 meters on average.
GPS Signals
Newer Garmin GPS receivers with WAAS (Wide Area Augmentation System) capability can improve accuracy to less than three meters on average. No additional equipment or fees are required to take advantage of WAAS. Users can also get better accuracy with Differential GPS (DGPS), which corrects GPS signals to within an average of three to five meters. The U.S. Coast Guard operates the most common DGPS correction service. This system consists of a network of towers that receive GPS signals and transmit a corrected signal by beacon transmitters. In order to get the corrected signal, users must have a differential beacon receiver and beacon antenna in addition to their GPS.
Satellite Diagram

The GPS satellite system

The 24 satellites that make up the GPS space segment are orbiting the earth about 12,000 miles above us. They are constantly moving, making two complete orbits in less than 24 hours. These satellites are travelling at speeds of roughly 7,000 miles an hour.
GPS satellites are powered by solar energy. They have backup batteries onboard to keep them running in the event of a solar eclipse, when there's no solar power. Small rocket boosters on each satellite keep them flying in the correct path.
Here are some other interesting facts about the GPS satellites (also called NAVSTAR, the official U.S. Department of Defense name for GPS):
  • The first GPS satellite was launched in 1978.
  • A full constellation of 24 satellites was achieved in 1994.
  • Each satellite is built to last about 10 years. Replacements are constantly being built and launched into orbit.
  • A GPS satellite weighs approximately 2,000 pounds and is about 17 feet across with the solar panels extended.
  • Transmitter power is only 50 watts or less.

What's the signal?

GPS satellites transmit two low power radio signals, designated L1 and L2. Civilian GPS uses the L1 frequency of 1575.42 MHz in the UHF band. The signals travel by line of sight, meaning they will pass through clouds, glass and plastic but will not go through most solid objects such as buildings and mountains.
A GPS signal contains three different bits of information - a pseudorandom code, ephemeris data and almanac data. The pseudorandom code is simply an I.D. code that identifies which satellite is transmitting information. You can view this number on your Garmin GPS unit's satellite page, as it identifies which satellites it's receiving.
Ephemeris data, which is constantly transmitted by each satellite, contains important information about the status of the satellite (healthy or unhealthy), current date and time. This part of the signal is essential for determining a position.
The almanac data tells the GPS receiver where each GPS satellite should be at any time throughout the day. Each satellite transmits almanac data showing the orbital information for that satellite and for every other satellite in the system.
Blocked Signal Diagram

Sources of GPS signal errors

Factors that can degrade the GPS signal and thus affect accuracy include the following:
  • Ionosphere and troposphere delays - The satellite signal slows as it passes through the atmosphere. The GPS system uses a built-in model that calculates an average amount of delay to partially correct for this type of error.
  • Signal multipath - This occurs when the GPS signal is reflected off objects such as tall buildings or large rock surfaces before it reaches the receiver. This increases the travel time of the signal, thereby causing errors.
  • Receiver clock errors - A receiver's built-in clock is not as accurate as the atomic clocks onboard the GPS satellites. Therefore, it may have very slight timing errors.
  • Orbital errors - Also known as ephemeris errors, these are inaccuracies of the satellite's reported location.
  • Number of satellites visible - The more satellites a GPS receiver can "see," the better the accuracy. Buildings, terrain, electronic interference, or sometimes even dense foliage can block signal reception, causing position errors or possibly no position reading at all. GPS units typically will not work indoors, underwater or underground.
  • Satellite geometry/shading - This refers to the relative position of the satellites at any given time. Ideal satellite geometry exists when the satellites are located at wide angles relative to each other. Poor geometry results when the satellites are located in a line or in a tight grouping.
  • Intentional degradation of the satellite signal - Selective Availability (SA) is an intentional degradation of the signal once imposed by the U.S. Department of Defense. SA was intended to prevent military adversaries from using the highly accurate GPS signals. The government turned off SA in May 2000, which significantly improved the accuracy of civilian GPS receivers.