Lecture 28 : Final project

A lecture on Programming Methodology by Mehran Sahami, Stanford University.

                  

This can be used as a guide for final project presentation.

Go back to Lecture list.

Lecture 27 : What next?

                   

What after Java and options are available in this series.

Next lecture: Final project.               

Go back to Lecture list.

Lecture 26 : Non standard programming

                

A quick introduction to non standard java programming and books for further Java studies.

Next chapter: Advance Java

Go back to Lecture list.

Lecture 25 : Project on face pamphlet in Java

            

Instructions to make face pamphlet programming in Java.

Next chapter: Non standard Java function

Go back to Lecture list.

Lecture 24 : Data Structures

           

A tutorial on Data Structures in Java.

Next chapter: Java project detail (face pamphlet)

Go back to Lecture list.

Lecture 23 : Searching and sorting

              

A tutorial on searching and sorting algorithm implementation in Java.

Next chapter: Data structure

Go back to Lecture list.

Lecture 22 : Simple Java assignment

                

A Java assignment to make you familiar with Java programming. 

Next chapter: Searching and sorting

Go back to Lecture list.

Lecture 21 : Interactions

               

An introduction to interactions in Java.

Next chapter: Java assignment

Go back to Lecture list

Lecture 20 : Java GUI (Graphical user interface)

                 

An introduction to Java GUI (Graphical user interface).

Next chapter:  Interactions
Go back to Lecture list

Lecture 19 : Introduction to Interfaces

                 

A brief elaboration on interfaces in Java.

Next chapter: Java GUI ( Graphical user interface)

Go back to Lecture list

Lecture 18 : Debugging process

                  

An introduction to debugging in Java.

Next chapter:  Interfaces

Go back to Lecture list

Lecture 17 : Brief introduction to array list

                 

Detailed information regarding arrays in Java.

Next chapter: Debugging

Go back to Lecture list

Lecture 16 : Introduction to arrays

             

A brief introduction to arrays in Java.

Next chapter: Brief introduction to array list

Go back to Lecture list

Lecture 15 : Introduction to file handling

                  

A brief introduction to file handling in Java.

Next chapter:  Array

Go back to Lecture list

Lecture 14 : Java memory allocation

                 

An introduction to Java memory allocation while programming.

Next chapter:  Introduction to Java file handling

Go back to Lecture list

Lecture 13 : Introduction to string processing and characters

                  

A brief introduction to string processing and characters in Java.

Next Chapter: An introduction to Java memory allocation

Go back to Lecture list

Lecture 12 : A brief introduction to Java enumeration

              

An introduction to Java enumeration and its uses in programming.

Next chapter: Introduction to string processing and characters

Go back to Lecture list

Lecture 11: GObjects, GImage, Gcompound and Gpolygons

                    

Introduction to GObjects, GImage, Gcompound, and Gpolygons

Next chapter: A brief introduction to Java enumeration

Go back to Lecture list

Lecture 10 : Classes, constructors, instance variables, setters, strings and Gracs

                

   
Brief introduction to classes, constructors, instance variables, setters, strings and Gracs

Next chapter: Indroduction to GObjects, GImage, Gcompound, and Gpolygons

Go back to Lecture list

Lecture 9 : Brief introduction to strings

                

Detailed information of use of strings in Java.

Next chapter: Brief introduction to classes, constructors, instance variables, setters, strings and Gracs

Go back to Lecture list

Lecture 8 : Details of functions and methods

                     

Detailed information on functions and methods in Java.

Next chapter:Brief introduction to strings

Go back to Lecture list

Lecture 7 : Java loops, functions, methods and returning

                      


A brief introduction to Java loops, functions, methods and returns.

Next chapter: Details of functions and methods

Go back to Lecture list

Lecture 6 : Expressions, variables, conditions and different loops

                


A tutorial on different expressions, variables, conditions and different loops in Java.               
                                                                                          
Next chapter: Continue with Java loops, function, methods and returning 
 
Go back to Lecture list

Java video tutorial series

Java tutorial series

This is a complete series of Java tutorial video lectures to give a brief idea of Java. This series consists of 28 video lectures to make you an expert in Java programming. This Java tutorial is Stanford University's Java session recording and it covers all the basic aspects of Java, with the help of which you can create some awesome stuff. This series covers only core Java and not Advance Java.  


Java tutorial.



2) Lecture 2 : Basic commands in Java

4) Lecture 4: A simple Java program

12) Lecture 12: Enumeration

14) Lecture 14: Memory allocation

15) Lecture 15: Java file handling

16) Lecture 16: Arrays

17) Lecture 17: Array lists

18) Lecture 18: Debugging 

19) Lecture 19 : Interfaces 

21) Lecture 21: Interactions

22) Lecture 22: Simple Java assignment

23) Lecture 23: Searching and sorting

24) Lecture 24: Data structures

27) Lecture 27: What next??

28) Lecture 28: Final project

Interested in more Watch out more enginerring video lectures.  

Lecture 5 : Graphics, objects, classes and variables in Java

                  


A brief introduction to graphics, objects, classes and variables in Java.

Next chapter: Expressions, variable, conditions and loops

Go back to Lecture list

Lecture 4 : Introduction to simple programming

                  


A simple Java program to make you familiar with Java programming.

Next chapter: Graphics, objects, classes and variables

Go back to Lecture list

Lecture 3 : Errors, comments and advance instructions in Java

              

Learn how to detect errors and debug them. Also get to know commenting in Java and advance instructions in Java.

 Next chapter: Introduction to simple Java program

Go back to Lecture list

Lecture 2 : Basic commands

                

Basic commands and features of Java.

Next chapter: Common errors, comments and advance instructions

Go back to Lecture list



Lecture 1 : Introduction to Java programming

                  

A quick introduction to Java and the topic that will be covered in this video lectures series.

Next chapter: Basic commands in Java

Go back to Lecture list

Ubuntu cloud vs Apple iCloud

Today we’re going to talk about Ubuntu cloud, codename Openstack and Apple iCloud. Yes, the latest innovation by Apple, which was introduced with the iPhone 4S at the “Let’s Talk iPhone” event.
Apple iCloud logo

iCloud lets you to sync all your music you purchase from iTunes to the cloud and then you can access it anywhere from any iDevice, be it a Mac, an iPhone, an iPod or an iPad. That’s not all, even the apps you buy from the AppStore, say for example, Angry Birds, will be automatically installed and synced to all the other mobile devices you have connected to the internet at that very instant. Also, the pictures, documents, videos, and other media you allow, will be uploaded to the cloud and you can access them from all of your iDevices and PC too. Like you make a calendar entry on your iPhone, it automatically synchronizes to your account on the cloud and pushes it back on all the devices you have registered with iCloud. You take a picture on your iPad, the next moment you’ll have it on every other iDevice of yours. You get the air. So, it’s pretty cool, eh?
Ubuntu cloud

However, it turns out, Apple stole it. Again, I mean, technically they have stolen the idea behind that but then they bought CloudMe, and they had all the rights with them.

Turns out also, that this idea was first brought out by guys at Canonical. Yes, the same people who gifted the world with Ubuntu. And that cloud service was available for the first time in Ubuntu with Ubuntu One, a built-in cloud file client.

Ubuntu allows you to do just everything the now hyped iCloud does, for the last two years! You’re allotted 5 GB of data in the cloud. iCloud offers the same now. Above that, you’ll have to shell out money as per the plan you opt for. Ubuntu One service is accessible via many mobile device, since there are dedicated clients for Android and iOS devices, whereas clients for WP7S are under works.
The Ubuntu Cloud feature was first released with Ubuntu 9.10. There’s also Windows Ubuntu One client for those who use Linux and Windows as well. The application programming interfaces (APIs) are also publicly available now.

If you opt for the paid Ubuntu One Music Streaming service in addition to music streaming, you’ll get an additional 20 GB of storage for $3.99/month. Each fresh addition of 20 GB data henceforth will be charged at $2.99/month.
The newest cloud client with Ubuntu is in Ubuntu 12.04 which has integrated OpenStack for all their cloud computing needs. 
I recommend all readers to try Ubuntu One and avail the benefits of having it for free.

Enjoy!


Add/create user in Ubuntu


Add/Create User in Ubuntu

To add a user to Ubuntu you need to login as administrator. Adding a User can be done through command line as well as through graphical method.

To create a user through command line see create user to Linux. This method is applied to all the Linux distros.

Adding a user in Ubuntu through graphical method can be done in the following manner:

1) In Unity dash(the topmost button on the right panel), search for User Accounts (for Ubuntu 11.04 and above. For previous versions, go to Application -> User Accounts).

2) The following window will appear.

User Accounts

Click on  Unlock option at the top to Unlock the window.

3) Now click on '+' button present at the bottom left side.

4) In the appearing window, select the account type as per your choice and assign a user name. Click on "Create" button.
Give the user account name

4) Next, you will see a window with "Password" option. Now click on "Account disabled" in front of it. The window shown below will appear.

Give password for the User account of Ubuntu


5) Give the password, confirm it and click on Change button. Your user account will be enabled and you can login with this account on your next login.

Linux group administration commands


Linux Group Administration

A collection of users is called as group. Each Linux group contains a unique ID value called GID. Information of a Linux group is found in "/etc/group" database file.

In Linux we have 2 types of groups available -

1) Primary Group : The user in this group can access all the resources with default permissions and have full access to all the resources.

2) Secondary group : The users in this group have limited access to the resources which is decided by the admin, who is one of the users in the primary group.

According to User Private Group (UPG) scheme, if we create any user, a primary group will be created with the same user name. Apart from that, we can also create a group manually. 

In group administration we use the following four commands -

1) groupadd  2) groupmod  3) groupdel  4) gpasswd

Lets take a look at each of them -

1) groupadd : With this command we can create a group account. If you want to create the group account with default options, the syntax is

$groupadd [-g ]  [-o] [-r] [-f] group 

where
-g --gid : This is the group id no and it must be unique. It must be above then 500 as 0-499 is reserved for system account.
- o --non-unique : This allows to add a group with non-unique GID.
-r --system : This allows to create a system user group.
-f : Force create

 e.g. $groupadd -g 888 employee

2)groupmod : The groupmod command modifies the system account files. It's syntax is,

$groupmod [-g ] [-o] [-n  ] group
 
e.g. $groupmod -g 999 sales
       $groupmod -n newsales sales

3) gpasswd : This command is used to do the following tasks -
                       i) Assign the password to the group.
                      ii) Add or remove the secondary users of the group.

It's syntax is,
$gpasswd <options> <group-name>

where,
-a : To add single user 
 e.g. $gpasswd -a sales
-d: To delete a user
e.g. $gpasswd -d sales
-M : To add multiple users at a time
e.g. $gpasswd -M ul, ul1, ul2

4) groupdel : If the group is empty or if it is a secondary user group, then it can be deleted by the admin using this command. If the group has single primary user then you delete the group account. 
                      
Its syntax is,

$groupdel <group-name>

Also see - Linux User administration

Linux user administration commands


Linux User Administration

Linux is a multi user and multitasking OS. In Linux, you can create any number of user account and groups. A user is always connected to a particular group and there can be any number of groups as well.

The user home directory by default is created under "/home" directory with the user name. e.g. User sun has home directory "/home/sun", the mail account is created under "/var/spool/mail/".

Each user and group in the system is identified by a unique no called as ID.

There are two types of user:

1) System users 
2) Normal users

The system users have ID values from 0 to 499  & the normal users can have ID values from 500 to 60,000.

The users and groups are maintained by the four databases files. These are:

1) /etc/passwd : This databases file maintains the user information like UID, GID, User name etc.
2) /etc/shadow : This file maintains user password related information like uname, encrypted pwd, etc. The pwd's are encrypted in the pwd binary file. To encrypt the passwords, MD5sum, DES algorithms are used.
3) /etc/group : It maintains group related information like group name, GID, etc.
4) /etc/gshadow : It maintains the group password related information. 

User administration :

For user administration five commands are used.

1) useradd : This command is used to create a new user with default values.
$useradd <options> <user-name>

where the options can be,

-U = User id
-g = group ID (primary)
-G = group ID (secondary)
-c = comment
-d = directory 
-s  = shell 
-f  = inactive days
-e = expire date (YYYY MM DD)
  
2) usermod : This command is used to modify the user accounts. Only the administrator can use this command. It's syntax is,
$usermod <options> <user-name>
  
where the options can be,        

-l = to change the user name
-L = to lock the user account
-U = to unlock the user account

3) passwd :  This command is used to generate the passwords for users account.
$passwd < user-name> 
                    
To disable a password,
$passwd -d <user-name>

4) userdel : This command is used to delete a user account.
$userdel <user-name>

5) change : This command is used to change the password expiry information. 
$chage <user name>

Ubuntu TV: Technical specifications and requirements


Ubuntu TV specification

Ubuntu TV on Samsung

Ubuntu TV technical specifications and requirements are as follows:

1) Ubuntu TV supports ARM and x86 architecture.
2) Minimum disk space required for Ubuntu TV is 2GB.
3) At least 1 GB of RAM  is required for smooth functioning.
4) Minimum video requirement is 512 MB.
5) It supports HDMI and CEC.
6) It has support for digital audio.
7) It supports high definition video at 1080 pixels.
8) Network connectivity: Gigabit Ethernet & Wireless b/g/n.
9) It has USB host support.

Also see : Ubuntu TV  features

Ubuntu TV cartoon

Ubuntu launches Ubuntu TV : TV for human beings


Ubuntu TV

Ubuntu is displaying a prototype unit, called Ubuntu on TV at the Consumer Electronics Show in Las Vegas. While the TV market growth is expected to reach $265 billion in 2016, Ubuntu TV is already giving Google and Apple a nightmare.
Ubuntu TV

The features of Ubuntu TV are -

1) All TV
Ubuntu TV will be broadcasted  in the United States and the EU. As per the standard formats, the picture quality can be of the standard of high definition, with integrated electronic program guides.

2) Cable and satellite options
Include your local cable or satellite TV in Ubuntu TV, to get a unique customer experience. Ubuntu TV will bridge the gap between TV manufacturers and cable or satellite service providers.

3) Unlimited online entertainment
Online entertainment content providers can be integrated to Ubuntu TV which provide a wide diversity of entertainment.

4) Better visualization
Second screen options provide viewers to watch the TV without any distraction. Phones or tablets can be connected to the Ubuntu TV. It  provides information about the movies, the director's name, or the reaction of Tweeters during live shows.

Ubuntu TV : Supports multiple devices
5) Smart search
The wealth of online content has left the audience overwhelmed by choice. To simplify and streamline the experience, users can prioritize the channels and shows that they want to watch. The TV also gives out suggestions on user taste. Ubuntu TV puts world at your fingertips with a simple and neat interface.  

6) Pick up where you left
Viewers can enjoy viewing TV on multiple devices - phones, tablets, and the TV itself. With Ubuntu TV, they can start up from where they have left off on a different device. Viewers can watch a part of movie on one device and the other part on another without searching for where they have left.

7) The sharing across devices
Ubuntu TV apps are available for iOS and Android. Movies and music can be shared between TV and other devices using personal cloud service, Ubuntu One.

See also : Ubuntu TV specification and requirements

Ubuntu TV : Channel list





File filters commands in Linux

Linux distributions come with various powerful file filtering commands. You can get fast results just with the help of some simple commands.

Different file filter commands used in Linux are as follows: 

1) wc: 
To see the no of characters in a file - $wc - c <file name>
To see the no of words in a file - $wc -w <file name>
To see the no of lines in a file - $wc -l <file name>
To see the no of lines, words, characters at a time - $wc <file name>

2) Pipe ( | ) :
We can carry out piping between two commands. Here, the standard output of first command is taken as the standard input for the second command.
<Command1> | <command2>   e.g. $ll | wc

3) head :
To see the top 10 lines of a file - $head <file name>
To see the top 5 lines of a file - $head -5 <file name>  

4) tail :
To see last 10 lines of a file - $tail < file name>
To see last 20 lines of a file - $tail -20 <file name> 

5) more
To see the contents of a file in the form of page views - $more <file name>
e.g . $more f1.txt
                
6) sed : 
It is used to cut the information horizontally.
To see the first line in file sun, 
$sed -n 1p sun
To see 3 to 5 lines
$sed -n '3,5p' sun

7) grep
To search a pattern of word in a file, grep file is used.
syntax $grep < word name> < file name>
$grep hi file_1  
To search multiple words in a file
$grep -E ' word1|word2|word3|' <file name>
e.g. $grep -E 'hi|beyond|good' file_1

8) sort
This command is used to sort the file .
$sort  <file name>
e.g.: $sort file_1
To sort the files in reverse order
$sort -r <file name>

To display only files  
$ll | grep "^-"
To display only directories
$ll | grep "^d"

Shortcut keys for Linux terminal comand line

Developers and programmers use the terminal quite often. Here we present some basic terminal shortcuts which will save a lot of your time and help you execute commands faster.

Shortcut keys to manage the terminal:
1) Alt + F10 = maximize
2) Alt + F5  =  restore
3) Ctrl + Shift + t = open new tab in the terminal
4) F11 = Enable or disable full screen
5) Ctrl + Shift + '+' = Zoom in
6) Ctrl +  '-'  = Zoom out
7) Ctrl + 0 = Normal Size
8) Ctrl + Shift + n = opens a new terminal window

Command line Editing: 
1) Ctrl + a = Move to the beginning of the line
2) Ctrl + e = Move to the end of the line
3) Ctrl + b = Move one char back
4) Ctrl + f = Move the one char forward
5) Ctrl + c = Kill the current command in the terminal
6) Ctrl + m = Execute the command without pressing enter
7) Ctrl + P = Display the previous command
8) Ctrl + n = Display the next command

Some Linux commands:
1) pwd : To see the current working directory
2) ls : To list the files and directories
3) ls -l : To list files along with attributes and file permissions
4) ls -a : List the files along with hidden files (In Linux all the hidden files starts with .(dot))
5) tree : To see the directory information in tree structure

Wild cards:
1) ll i* : To display all the files that start with i character.
2) ll *log* : To list the files having log characters 5 char file
3) ll *c* : To list the files containing 'c' in them
4) ll *.c  : To list the files with .c extension only
5) ll [a-m]* : To list the files having filename beginning with characters from 'a' to 'm'
6) Ctrl + l or clear : To clear the screen

How to uninstall or remove Ubuntu from Windows

Some of you might find Ubuntu too tough to handle and would wish to remove Ubuntu from dual boot option.

The process to remove/uninstall Ubuntu from Windows dual boot is quite simple and all you need is your Windows OS DVD or CD.

Here are the steps to uninstall Ubuntu safely from the dual boot option with Windows-

1) Login to your Windows operating system
2) Goto Computer management (search in Startup)
3) In the Computer Management window select the Storage->Disk Management
4) All the hard drives in the computer will appear along with Ubuntu Linux drive. Windows drive will have either file system as NTFS or FAT32. But Linux drive will be unnamed.
5) Right click on Linux drive(s) and delete it. 
Select the Linux Partition and delete it.

By deleting the Linux drive, you not only deleted the Linux partition but also the Linux grub loader.
Now you have to install the Windows bootloader. Restart your system and boot from the Windows DVD.
Select Repair your Computer to install Windows bootloader

In the appearing window, click on "Repair your computer".

Now select Command Prompt
Select the Command prompt

In the command prompt window type the following commands -
  • bootrec /fixmbr
  • bootrec /fixboot
Reboot your pc and you are done!
If still any error is encountered, feel free to post here.

How to make bootable USB/pen drive


Bootable USB or Pen drive can be used to install different Linux distributions and Windows operating system without making a bootable CD. Bootable USB or pen drive can be made in following ways -

1) Using UNetbootin: This is an open source project and cross platform. It can used on both Linux and Windows operating system to make a bootable USB. UNetbootin can be downloaded from here. Download the UNetbootin and install it. Open the application and plug the USB, now select the Linux based operating system ISO file from your computer and Click OK. It will make your pendrive bootable with the ISO selected.
Using Unetbootin to make bootable USB

2)Make Startup Disk: If you have Ubuntu installed in your system, you can make a bootable USB using the Startup Disk Creator utility. Select Make Starup Disk application in Ubuntu. In the appearing window, select the ISO file path and click on Make Startup Disk option. Make Startup Disk can also be used to make bootable USB for Windows operating system such as XP, Vista and Windows 7.

Make Startup Disk to create bootable pen drive in Ubuntu

Install deb file in Ubuntu Linux

To install deb file on Ubuntu, you can use the tools mentioned below. But before that, let's understand that what a deb file is.
Deb files are Debian packagesDeb is the extension of the Debian software package format. Deb file are used to install software in Debian, Ubuntu and other Debian based operating systems.
To install deb file in Ubuntu you cab either choose any one of the method -
1) Double click on deb file and in appearing window select on install option.
2) Right click on deb file and click on open with Software center.


Click on Install package to install deb file

How to install Linux Operating System


How to install Linux?

Before installing Linux let's have a reality check!

1) Not only install Linux but the whole operating system: 
Linux is only the kernel of a Linux based Operating system such as Ubuntu, Red Hat, Debian, etc. It is more like the brain and heart of the operating system which performs the task of connecting the software and the hardware. All other softwares in Linux based OS's are installed on Linux kernel which in turn make the software interact with the available system hardware.

2)Linux based Operating System:
There are around 200 Linux based operating systems in the market. Among them, the most popular are Ubuntu, Debian, Linux Mint, Red Hat, etc. Ubuntu is the most popular one for non-commercial distribution and Red Hat is the most popular commercial version.

3) Linux installation process :
All the Linux based operating system has almost same installation process with a minor change in them. They just differ in the GUI but the main steps are common among them.
  • Selecting the ext file format for installation of Linux based operating system : Latest ext file format is ext 4 and recommended by most Linux distributions.
Selecting ext4 partition for Linux installation

  • Selecting the swap space or virtual memory: Swap area is the space on a hard disk which acts as the Virtual Memory of your machine. It is a combination of  physical memory (RAM) and the swap space. Swap space temporarily holds the inactive memory pages. Swap space is used when the there is a need of physical memory for active processes and there is insufficient availability of physical memory.
Create a swap partition 
    • Installing the Linux Grub loader : Differences occur when some Linux distributions provide the option of additional software. Till now, it must be clear that you don't install only Linux kernel, but the whole Linux based operating system. To install the different distributions of Linux operating see the below link.
    Basic installation process is common among all the Linux based distributions. All you need is to select your favorite Linux distribution and follow the steps as shown in any of the above installation tutorials.


    Different Linux based operating system