Pages

Saturday, December 31, 2011

HCU MCA IV SEMESTER TIME TABLE


NOTE: 

  • Classes starts from 2nd jan 2011 and elective declaration also on the same day.
  • CA551 to CA555 are core subjects and remaining are electives.


Sunday, October 23, 2011

Monday, October 17, 2011

Monday, September 19, 2011

PROXY SETTINGS IN UBUNTU TERMINAL

First let us set proxy settings in GUI and later we will set proxy in "Terminal", k!

If you are having ubuntu desktop/laptop in your office or home behind proxy this tutorial is for you.This tutorial will explain How to Configure Ubuntu desktop/laptop to use your proxy server.

Network Proxy
Ubuntu has a setting in gnome for the Network Proxy, which should set gnome’s proxy.
First go to System--->Preferences--->Network Proxy


 Once it opens click on “Proxy Configuration” and enter your proxy server,port number details click Close.



Synaptic Package Manager
Synaptic Package Manager must have the proxy set, in order to update your installation using the in-built Update Manager or Synaptic GUI.
Go to System--->Administration--->Synaptic Package Manager


Once Synaptic Package Manager opens click on Settings--->Preferences


 Click on Network tab select Manual Proxy Configuration option and enter your proxy server,port details.If you have username,password click on Authentication to enter these details click on ok


Firefox proxy Configuration
Open your firefox browser go to Edit--->Preferences



Click on Advanced and select Network tab


Select Settings option


Now select Manual Proxy Configuration and enter your proxy server,port details click on ok



Terminal Proxy Settings

If you want to configure proxy for apt-get in terminal, use the following procedure

Step1: Open terminal and go to Super user (root) using the command


$su -


Step2: now open the file bash.bashrc in gedit or any editor which is in etc/ directory



$gedit /etc/bash.bashrc

and Add your proxy server details in the following format
export http_proxy=http://username:password@proxyhost:port/
export ftp_proxy=http://username:password@proxyhost:port/

Step3: Also  modify the following file

$gedit /etc/apt/apt.conf

Acquire::http::proxy "http://username:password@proxyhost:port/";
Acquire::ftp::proxy "ftp://
username:password@proxyhost:port/";
Acquire::https::proxy "https://
username:password@proxyhost:port/";



and save it.

Its done!!
Good luck!!
 


 




 

Sunday, August 14, 2011

Computer Netorks Material

http://www.youtube.com/damodarvenkiThe Download link of computer networks material is the following
http://www.mediafire.com/?k4mm​r9tufbnbvmv
 Also 2 videos are uploaded in

http://www.youtube.com/damodarvenki

Thursday, February 17, 2011

Lab Excercises
Software Programming-II Lab
Topic: Using IO package classes
 

1.   Use of mark and reset methods of InputStream:  
Write a program which reads characters from a text file and searches for the first occurrence of letter ‘A’. It remembers the position at which ‘A’  occurs by marking it with a read limit of 15. It searches the next fifteen characters for the occurrence of ‘B’. If ‘B’ occurs within 15 characters it resets back to ‘A’s position and prints the characters in between ‘A’ and ‘B’.

2.      File Copy Program:
Write a program which takes a two file names from the command line argument and opens the first file and copies it’s content to the second file.
(Use classes: FileInputStream, FileOutputStream).

3.      Dealing with binary data:
Create a program to read a list of floating point numbers in a text file and then write the data to a  binary file.
 (Use classes: FileReader, FileBufferedReader, FileOutputStream, String, Float, DataOutputStream).
Note
Use FileReader and FileBufferedReader classes to be able to read each line of the file as a string. Use split method of String class to break the line into words.
Use Float.parseFloat to convert the string to floating point number. Use FileOutputStream and DataOutputStream to write the float data as a binary data to the file.
4.      Our own Serialization: Assume that ComplexData.txt contains the data to build
five complex objects. Write a program which reads this data and constructs five
complex objects. It then finds the sum of the five complex objects to create a sixth
object. It stores the data of the sixth complex object in a output text file. (Use
Classes: Complex, FileReader, FileBufferedReader, FileOutputStream, String,
Float, DataOutputStream).
Note: Use the technique of 3rd problem to read the text data as binary data.
5.   Incorporation of Metadata:
Assume that ComplexData.txt has the following form.

3
2.2  4.5
4.6  7.9
9.0  3.0
That is the first number gives the number of Complex objects and the remaining
data is the data required to construct them. Modify the program of Q.No: 4 to
adapt to this change.
6.      Write your own ls -R program: Write a program which takes a directory name from the command line argument and prints the contents of the directory hierarchically. (i.e. If the directory contains another directory it’s contents are shown recursively). (Use Classes: File).

---> TIPS
1) Knowing the end of the file when reading data from file: Normally when reading
byte by byte from the file end of file can be denoted by return value of -1 from the read system call. But when you are reading binary data using methods such as readInt and readDouble in DataInputStream class another technique is employed. Whenever Eof is reached an exception called as EOFException is generated. You can catch this exception to know the occurrence of the end of file. Assume that you are reading one integer and one double alternatively from a binary file the code looks as follows.


while (true) {
  try {
       i_data = data_in.readInt ();
      d_data = data_in.readDouble ();
 }
  catch (EOFException eof) {
    System.out.println ("End of File"+eof);
    break; //End of file reached break from the while loop
 }
} //End of while loop

2) Catching of IOException: Most of the methods dealing with I/o generates IO
exception. Hence surround that code in a similar try catch block shown earlier to catch IOException.

Good code is its own best documentation. As you're about to add a comment, ask yourself, 'How can I improve the code so that this comment isn't needed?' Improve the code and then document it to make it even clearer.
 -- Steve McConnell, software engineer and author, from Code Complete

Wednesday, January 19, 2011