You are on page 1of 62

1.

INTRODUCTION

A user may be interested in detecting the changes to the underlying URL


links for variety of reasons. The system can prove useful in certain applications
such as those linked with the WAP, Instead of delivering the whole page to
device only the changes would be delivered. To carry out Webpage change
detection Hungarian Algorithm provides the research of investigated aspects of
changed detection and monitoring.

Modules:

 Link cost Detection


 Content cost detection
 Ranking Report
 Updated Links and Changes Detection
 Final Ranking Report

Link Cost Detection


We have the database with links and sub links of the WebPages.
With these data the link cost is detected by calculating the number of inward
and outward links. According to that we give the weight to the page. For
example if the main page is www.mysql.com and it sub links are considered as
www.code2s.com// www.mysql.com/test.html.//www.mysql/sample...etc In
this case we calculate the number of unlinks as 2 and the out links as 1. So the
weight will be assigned as 0.50 for out links and 0.75 for in links .so the Link
cost will be
Outlinkcost=no. of out links *0.50
InLinkcost = no. of in links *0.75

1
Content Cost detection
The Content cost can be calculated as the particular content repetition and
based on number of visits to the page. This is calculated as Content cost which
also helps to determine the ranking of the webpage.
Add the link cost and content cost we will get the weight .Based on that we
give the ranking of a page.

Ranking Report
When we add the link cost and content cost we will get the weight .Based
on that we give the ranking of a page, which will be displayed as the table
Form.

Links Changes Detection


When the user add the unlink to the Webpage it will affect the link cost
which in turn affect the ranking of the webpage which can be detected in the
database too. In Database the links and sub links and link cost, content cost
calculated for the updated links are all calculated and maintained in the
database. .

Final Ranking Report


Finally the changed links cost will also be updated in the database which
will be viewed by the user when he refreshes the screen.

2
2. SYSTEM SPECIFICATION
2.1 HARDWARE CONFIGURATION:

PROCESSOR : PENTIUM IV

HARD DISK CAPACITY : 20 GB

MONITOR : 14 “SAMTRON MONITOR

PRINTER : TVS 80 COLOR

INTERNAL MEMORY CAPACITY : 128 MB

KEYBOARD : LOGITECH OF 104 KEYS

MOUSE : LOGITECH MOUSE

2.2 SOFTWARE CONFIGURATION:

OPERATING SYSTEM : WINDOWS

FRONT END : Net Beans

BACK END : MYSQL

3
3. SOFTWARE DESCRIPTION:

3.1 EXISTING SYSTEM

An existing product is the system aimed at monitoring Web sites. The


software can track changes in the text and images and monitors for the
presence of specific text. However, it does not allow for specifying how much
emphasis to place on monitoring different aspects of the Web page and does
not provide a utility for monitoring a specific region and number of links of the
Web page. The existing system does not reveal performance data that discusses
speed or accuracy.

4
3.2 PROPOSED SYSTEM

The Present system model stores the reports every monitoring period,
the Notification Center retrieves the list of due reports every notification
period, which is the period of time every which the user wishes to be notified
the changes and is specified before hand by the user, and the

Input unit access the reports and highlighted Web pages that is to be make
changes and see the ranking of the webpage. The System displays the url report
that is maintained in the database such as url , url sub links and the link cost
and ranking etc.

In the User Form the user select the url and add some links or make
changes in the links which can be detected in the ranking criteria while refresh
the page.

5
4. SOFTWARE FEATURES

Java:

Java is a new computer programming language developed by Sun


Microsystems. Java has a good chance to be the first really successful new
computer language in several decades. Advanced programmers like it because
it has a clean, well-designed definition. Business likes it because it dominates
an important new application, Web programming.

Java has several important features:

• A Java program runs exactly the same way on all computers. Most other
languages allow small differences in interpretation of the standards.
• It is not just the source that is portable. A Java program is a stream of
bytes that can be run on any machine. An interpreter program is built
into Web browsers, though it can run separately. Java programs can be
distributed through the Web to any client computer.
• Java applets are safe. The interpreter program does not allow Java code
loaded from the network to access local disk files, other machines on the
local network, or local databases. The code can display information on
the screen and communicate back to the server from which it was
loaded.

A group at Sun reluctantly invented Java when they decided that existing
computer languages could not solve the problem of distributing applications
over the network. C++ inherited many unsafe practices from the old C
language. Basic was too static and constrained to support the development of
large applications and libraries.

Today, every major vendor supports Java. Netscape incorporates Java


support in every version of its Browser and Server products. Oracle will

6
support Java on the Client, the Web Server, and the Database Server. IBM
looks to Java to solve the problems caused by its heterogeneous product line.

The Java programming language and environment is designed to solve a


number of problems in modern programming practice. It has many interesting
features that make it an ideal language for software development. It is a high-
level language that can be characterized by all of the following buzzwords:

Features

Sun describes Java as,

 Simple
 Object-oriented
 Distributed
 Robust
 Secure
 Architecture Neutral
 Portable
 Interpreted
 High performance
 Multithreaded
 Dynamic.

• Java is simple.

What it means by simple is being small and familiar. Sun


designed Java as closely to C++ as possible in order to make the system
more comprehensible, but removed many rarely used, poorly
understood, confusing features of C++. These primarily include operator
overloading, multiple inheritance, and extensive automatic coercions.
The most important simplification is that Java does not use pointers and

7
implements automatic garbage collection so that we don't need to worry
about dangling pointers, invalid pointer references, and memory leaks
and memory management.

• Java is object-oriented.

This means that the programmer can focus on the data in his
application and the interface to it. In Java, everything must be done via
method invocation for a Java object. We must view our whole
application as an object; an object of a particular class. .

• Java is distributed.

Java is designed to support applications on networks. Java


supports various levels of network connectivity through classes in java.
net. For instance, the URL class provides a very simple interface to
networking. If we want more control over the downloading data than is
through simpler URL methods, we would use a URLConnection object
which is returned by a URL URL.openConnection () method. Also, you
can do your own networking with the Socket and ServerSocket classes.

• Java is robust.

Java is designed for writing highly reliable or robust software.


Java puts a lot of emphasis on early checking for possible problems,
later dynamic (runtime) checking, and eliminating situations that are
error prone. The removal of pointers eliminates the possibility of
overwriting memory and corrupting data.

• Java is secure.

Java is intended to be used in networked environments. Toward


that end, Java implements several security mechanisms to protect us

8
against malicious code that might try to invade your file system. Java
provides a firewall between a networked application and our computer.

• Java is architecture-neutral.

Java program are compiled to an architecture neutral byte-code


format. The primary advantage of this approach is that it allows a Java
application to run on any system that implements the Java Virtual
Machine.

This is useful not only for the networks but also for single system
software distribution. With the multiple flavors of Windows 95 and
Windows NT on the PC, and the new PowerPC Macintosh, it is
becoming increasing difficult to produce software that runs on all
platforms.

• Java is portable.

The portability actually comes from architecture-neutrality. But Java


goes even further by explicitly specifying the size of each of the
primitive data types to eliminate implementation-dependence. The Java
system itself is quite portable. The Java compiler is written in Java,
while the Java run-time system is written in ANSI C with a clean
portability boundary.

• Java is interpreted.

The Java compiler generates byte-codes. The Java interpreter


executes the translated byte codes directly on system that implements
the Java Virtual Machine. Java's linking phase is only a process of
loading classes into the environment.

9
• Java is high-performance.

Compared to those high-level, fully interpreted scripting


languages, Java is high-performance. If the just-in-time compilers are
used, Sun claims that the performance of byte-codes converted to
machine code are nearly as good as native C or C++. Java, however, was
designed to perform well on very low-power CPUs.

• Java is multithreaded.

Java provides support for multiple threads of execution that can


handle different tasks with a Thread class in the java.lang Package. The
thread class supports methods to start a thread, run a thread, stop a
thread, and check on the status of a thread. This makes programming in
Java with threads much easier than programming in the conventional
single-threaded C and C++ style.

• Java is dynamic.

Java language was designed to adapt to an evolving


environment. It is a more dynamic language than C or C++. Java loads
in classes, as they are needed, even from across a network. This makes
an upgrade to software much easier and effectively. With the
compiler, first we translate a program into an intermediate language
called Java byte codes ---the platform-independent codes interpreted by
the interpreted on the Java platform. The interpreter parses and runs
each Java byte code instruction on the computer. Compilation happen s
just once; interpretation occurs each time the program is executed.
Java byte codes can be thought as the machine code instructions
for the Java Virtual Machine (JVM). Every Java interpreter, whether it’s
a development tool or a web browser that can run applets, is an
implementation of the Java Virtual Machine.

10
The Java Platform

A platform is the hardware or software environment in which a


program runs. Most Platforms can be described as a combination of the
operating system and hardware. The Java platform differs from most
other platforms in that it’s software –only platform that runs on top of
other hardware-based platforms.

The Java platform has two components:

1. The Java Virtual Machine (JVM).


2. The Java Application Programming Interfaces (Java API).

The JVM has been explained above. It’s the base for the Java
platform and is ported onto various hardware-based platforms.
The Java API is a large collection of ready-made software
components that provide many useful capabilities, such as graphical user
interface (GUI). The Java API is grouped into libraries of related classes
and interfaces; these libraries are known as packages.
Native code is code that after you compile it, the compiled code
runs on a specific hardware platform. As a platform-independent
environment, the Java platform can be bit slower than native code.
However, smart compilers, well-tuned interpreters, and just-in-time byte
code compilers can bring performance close to that of native code
without threatening portability.

11
5. OVERVIEW OF SWING

The Swing package is part of Java Foundation Classes (JFC) in


the Java platform. The JFC encompasses a group of features to help people
build GUIs; Swing provides all the components from buttons to split panes and
tables.

The Swing package was first available as an add-on to JDK 1.1. Prior
to the introduction of the Swing package, the Abstract Window Toolkit (AWT)
components provided all the UI components in the JDK1.0 and 1.1 platforms.
Although the Java2 Platform still supports the AWT components, we strongly
encourage using Swing components instead. You can identify Swing
components because their names start with J. The AWT button class, for
example, is named Button, whereas the Swing button class is named JButton.
In addition, the AWT components are in the java.awt package, whereas the
swing components are in the javax.swing package.

As a rule, programs should not use “heavyweight” AWT components


alongside Swing components. Heavyweight components include all the ready-
to-use AWT components, such as Menu and Scroll Pane, and all components
that inherit from the AWT canvas and Panel classes. When Swing components
(and all other “lightweight” components) overlap with heavyweight
components, the heavyweight component is always painted on top.

Swing Features and Concepts:

12
It introduces Swing’s features and explains all the concepts we need to be
able to use Swing components effectively.

Swing Components and the Containment Hierarchy:


Swing provides many standard GUI components such as buttons, lists,
menus and text areas, which we combine to create our program’s GUI. It also
includes containers such as windows and tool bars.

Layout Management:
Containers use layout managers to determine the size and position of the
components they contain. Borders affect the layout of Swing GUIs by making
Swing components larger. We can also use invisible components to affect
layout.

Event Handling:

Event handling is how programs respond to external events, such as the


user pressing a mouse button. Swing programs perform all their painting and
event handling in the event-dispatching thread.

Painting:

Painting means drawing the components on-screen. Although it’s easy


to customize a component’s painting, most programs don’t do anything more
complicated than customizing a component’s border.

Threads and Swing:

If we do something to a visible component that might depend on or


affect its state, then we need to do it from the event-dispatching thread. This
isn’t an issue for many simple programs, which generally refer to components
only in event -handling code. However, other programs need to use the invoke
Later method to execute component-related calls in the event-dispatching
thread.

13
6. EVENT

Event is an interruption given to the running program by the


programmer using input devices.

In java, event is treated as an object of a class EventObject. This class is the


supper class of all type of event classes. This is present in the package java.awt. The
following are some important event classes.

 Key event
 Mouse event
 Window event
 Action event
 Adjustment event
 Component event
 Focus event
 Input event
 Item event.

14
7. MYSQL

MySQL is a relational database management system (RDBMS) which


has more than 11 million installations. The program runs as a server providing
multi-user access to a number of databases.

MySQL is owned and sponsored by a single for-profit firm, the Swedish


company MySQL AB, now a subsidiary of Sun Microsystems, which holds the
copyright to most of the code base. The project's source code is available under
terms of the GNU General Public License, as well as under a variety of
proprietary agreements.

"MySQL" is officially pronounced (My S Q L), not "My sequel" /maɪ


ˈsiːkwəl/. This adheres to the official ANSI pronunciation; SEQUEL was an
earlier IBM database language, a predecessor to the SQL language. The
company does not take issue with the pronunciation "My sequel" or other local
variations.

Uses

MySQL is popular for web applications and acts as the database


component of the LAMP, BAMP, MAMP, and WAMP platforms
(Linux/BSD/Mac/Windows-Apache-MySQL-PHP/Perl/Python), and for open-
source bug tracking tools like Bugzilla. Its popularity for use with web
applications is closely tied to the popularity of PHP and Ruby on Rails, which
are often combined with MySQL. PHP and MySQL are essential components

15
for running popular content management systems such as Drupal, e107,
Joomla!, WordPress and some Bit Torrent trackers. Wikipedia runs on
MediaWiki software, which is written in PHP and uses a MySQL database.

Platforms and interfaces

The MySQL Administrator in Linux.

MySQL is written in C and C++. The SQL parser uses yacc and a home-
brewed laxer. MySQL works on many different system platforms, including
AIX, BSDi, FreeBSD, HP-UX, i5/OS, Linux, Mac OS X, NetBSD, Novell
NetWare, OpenBSD, eComStation , OS/2 Warp, QNX, IRIX, Solaris, SunOS,
SCO OpenServer, SCO UnixWare, Sanos, Tru64, Windows 95, Windows 98,
Windows ME, Windows NT, Windows 2000, Windows XP, and Windows
Vista. A port of MySQL to OpenVMS is also available.

Libraries for accessing MySQL databases are available in all major


programming languages with language-specific APIs. In addition, an ODBC
interface called MyODBC allows additional programming languages that
support the ODBC interface to communicate with a MySQL database, such as
ASP or ColdFusion. The MySQL server and official libraries are mostly
implemented in ANSI C/ANSI C++.

To administer MySQL databases one can use the included command-


line tool (commands: mysql and mysqladmin). Also downloadable from the
MySQL site are GUI administration tools: MySQL Administrator and MySQL
Query Browser. Both of the GUI tools are now included in one package called
tools/5.0.html MySQL GUI Tools.

16
In addition to the above-mentioned tools developed by MySQL AB,
there are several other commercial and non-commercial tools available.
Examples include phpMyAdmin, a free Web-based administration interface
implemented in PHP, or SQLyog Community Edition, a free desktop based
GUI tool.

Issues

There has been some controversy regarding the distribution of GPL


licensed MySQL library files with other open source applications. The biggest
controversy arose with PHP, which has a license incompatible with the GPL.
This was later resolved when MySQL created a license exception that
explicitly allows the inclusion of the MySQL client library in open source
projects that are licensed under a number of OSI-compliant Open Source
licenses, including the PHP License.

In September 2005, MySQL AB and SCO forged a partnership for


"joint certification, marketing, sales, training and business development work
for a commercial version of the database for SCO's new Open Server 6 version
of Unix". SCO raised controversy beginning in 2003 with a number of high-
profile lawsuits related to the Linux Operating System.

Various MySQL employees expressed that the company was committed


to serving its end users, regardless of their operating system choice, that the
company would leave it to the courts to resolve the SCO licensing controversy,
and that other common open source databases have also been ported to, and
support, SCO OpenServer.

In October 2005, Oracle Corporation acquired InfoBase OY, the Finnish


company that developed the InnoDB storage engine that allows MySQL to
provide such functionality as transactions and foreign keys. A press release by
Oracle that was issued after the acquisition, mentioned that the contracts that
make the company's software available to MySQL AB would be due for

17
renewal (and presumably renegotiation) some time in 2006. During the
MySQL Users Conference in April 2006, MySQL issued a press release which
confirmed that MySQL and InfoBase OY agreed to a multi-year extension of
their licensing agreement.

In February 2006, Oracle Corporation acquired Sleepy cat Software,


makers of the Berkeley DB, a database engine onto which another MySQL
storage engine was built.

18
8. SYSTEM ANALYSIS

In this chapter, concepts associated with term structured system and


How they are implemented in the project has been dealt with the tools used for
structure
System analyses are,

• Data Flow Diagram


• Entity Relationship Diagram

ENVIRONMENTAL MODEL
The Environmental model defines the interfaces between the system and
the environment. Building an environmental model is the first and the most
important part of building complete model of user requirements. The critical
aspect of environmental model is to identify the events occurring in the
environment to which the system must respond. It also defines the boundary
between the system and the environment.

BEHAVIOURAL MODEL:
A system flow diagram is a pictorial representation of the working of the
system. It is a tool that depicts the flow of data through a system and the work
processing performed by that system. This takes an important role in the
system analysis part to know the present level of existing system and what
modification is to be done to overcome the problem occurring in the system. It
is the starting point of the design phase that functionally decomposed the
requirement. A system flow diagram consists of a series of rectangles joined by

19
lines. The rectangles represents data transformation and lines represent data
flow in those systems. A data flow diagram describes data flow rather than how
they are proposed.

9. SYSTEM DESIGN

System design is the process of planning a new system to


complement or altogether replace the old system. The purpose of the design
phase is the first step in moving from the problem domain to the solution
domain. The design of the system is the critical aspect that affects the quality of
the software. System design is also called top-level design. The design phase
translates the logical aspects of the system into physical aspects of the system.

9.1 INPUT DESIGN

Input design is one of the most important phases of the system design.
Input design is the process where the input received in the system are planned
and designed, so as to get necessary information from the user, eliminating the
information that is not required. The aim of the input design is to ensure the
maximum possible levels of accuracy and also ensures that the input is
accessible that understood by the user.

The input design is the part of overall system design, which requires
very careful attention. If the data going into the system is incorrect then the
processing and output will magnify the errors.

The objectives considered during input design are:


• Nature of input processing.
• Flexibility and thoroughness of validation rules.
• Handling of properties within the input documents.

20
• Screen design to ensure accuracy and efficiency of the
input relationship with files.
• Careful design of the input also involves attention to error
handling, controls, batching and validation procedures.

Input design features can ensure the reliability of the system and
produce result from accurate data or they can result in the production of
erroneous information.

9.2 OUTPUT DESIGN

The output design is the most important and direct source of information
to the user. The encoding time and file size for both the fractal as well as fast
fractal technique are shown in output screen. The comparison of both
techniques is done and the PSNR value is calculated. The reconstructed image
is also displayed in the output screen.

Output from the computer system is required to communicate the result


of processing to the user and to provide permanent copy of these results for
later consultation. While designing the output, the type of output format,
frequency etc has been taken into consideration.

Output designed to simply generate an output of the process whether it


was successful or not.]

21
User Process: Data Flow Diagram

Input

Insert
Data Stored the in
link to
the url

Refresh
the
Data Base table to Output
view the
Rank

22
9.3 DATABASE DESIGN

Database Name: Pagerank

Table Name : sample

Filed Name Data Type

url varchar(200)

links varchar(400)

Criteria varchar(20)

Linkcost varchar(10)

Contentcost varchar(10)

Rank varchar(5)

23
10. SYSTEM TESTING

SYSTEM IMPLEMENTATION

Implementation is the process of converting a new or revised system


design into an operational one. The implementation is the final and important
phase. It involves ser training, system testing and successfully running of
developed proposed system. The user tests the developed system and changes
are made according to their needs. The testing phase involves the testing of
developed system using various kinds of data.

An elaborate testing of data is prepared and the system is tested


using that test data. The corrections are also noted for future use. The users are
trained to operate the developed system. Both the hardware and software
securities are made to run the developed system successfully in future.

Implementation is the process of converting a new or revised system


design in to an operational one. Education of user should really have taken
place much earlier in the project when they were being involved in the
investigation and design work. Training has to be given to the user regarding
the new system. Once the user has been trained, the system can be tested
hardware and software securities are to run the developed system successfully
in the future.

TESTING

Testing is a series of different tests that whose primary purpose is to


fully exercise the computer based system. Although each test has a different

24
purpose, all work should verify that all system element have been properly
integrated and performed allocated function. Testing is the process of checking
whether the developed system works according to the actual requirement and
objectives of the system.
The philosophy behind testing is to find the errors. A good test is one
that has a high probability of finding an undiscovered error. A successful test is
one that uncovers the undiscovered error. Test cases are devised with this
purpose in mind. A test case is a set of data that the system will process as an
input. However the data are created with the intent of determining whether the
system will process them correctly without any errors to produce the required
output.

Types of Testing:

• Unit testing
• Integration testing
• Validation testing
• Output testing
• User acceptance testing

Unit Testing

All modules were tested and individually as soon as they were completed
and were checked for their correct functionality.

Integration Testing

The entire project was split into small program; each of these single
programs gives a frame as an output. These programs were tested individually;
at last all these programs where combined together by creating another
program where all these constructors were used. It give a lot of problem by not

25
functioning is an integrated manner.

The user interface testing is important since the user has to declare that the
arrangements made in frames are convenient and it is satisfied. when the
frames where given for the test, the end user gave suggestion. Based on their
suggestions the frames where modified and put into practice.

Validation Testing:

At the culmination of the black box testing software is completely


assembled as a package. Interfacing errors have been uncovered and corrected
and a final series of test i.e., Validation succeeds when the software function in
a manner that can be reasonably accepted by the customer.

Output Testing

After performing the validation testing the next step is output testing of the
proposed system. Since the system cannot be useful if it does not produce the
required output. Asking the user about the format in which the system is
required tests the output displayed or generated by the system under
consideration. Here the output format is considered in two ways. One is on
screen and another one is printed format. The output format on the screen is
found to be corrected as the format was designed in the system phase according
to the user needs. And for the hardcopy the output comes according to the
specifications requested by the user.

User Acceptance System

26
An acceptance test as the objective of selling the user on validity and
reliability of the system. It verifies that the procedures operate to system
specification and mat the integrity of vital is maintained.

Performance Testing

This project is a application based project, and the modules are


interdependent with the other modules, so the testing cannot be done module
by module. So the unit testing is not possible in the case of this driver. So this
system is checked only with their performance to check their quality.

27
11. SOURCE CODE

URLClustering
import java.io.*;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import java.sql.PreparedStatement;

import java.util.*;

import java.net.MalformedURLException;

import java.net.URL;

import java.util.regex.Matcher;

import java.util.regex.Pattern;

public class URLClustering

public void Postcode1()

try

28
String string1,string2,string3,string4,string5,temp;

int g1;

double content,cot=0;

double inlink=0,outlink=0;

Statement st1,st2,st3,st4;

ResultSet rs,rs2;

int count;

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
conn=DriverManager.getConnection("jdbc:odbc:pagerank","","");

//Class.forName("com.mysql.jdbc.Driver").newInstance();

//Connection conn =
DriverManager.getConnection("jdbc:mysql://localhost:3306/pagerank","root","
root");

st1=conn.createStatement();

st2=conn.createStatement();

st3=conn.createStatement();

st4=conn.createStatement();

rs=st1.executeQuery("select * from sample");

int i=0;

i++;

//The following code retrieve file from the database

while(rs.next()){

string1=rs.getString(2);

string2=rs.getString(6);

string3=rs.getString(3);

29
string4=rs.getString(4);

string5=rs.getString(5);

String h="";

if (string2==null)

PreparedStatement ps=conn.prepareStatement("update url


set linkcost=0 where url='"+string1+"'");

continue;

else

{ //CALCULATE CONTENT COST

if ((string3==null)||(string4==null)||(string5==null))

content=0;

continue;

else

cot=Postcontent(string3,string4,string5);

if (cot >0) content=0.25;

else content=0;

// CALCULATE LINK COST

try

URL s1= new URL(string1);

String get=s1.getHost();

30
String get1=get.concat("(.*)/?");

Pattern pattern =
Pattern.compile(get1.toString());

Matcher matcher = pattern.matcher(string2);

if (matcher.find())

int c=1;

Pattern p = Pattern.compile("\\b"+get+"\\b");

Matcher m = p.matcher(string2);

while (m.find()){

c++;

System.out.println("Repeated token is "+m.group(0) );

System.out.println(c);

System.out.println("group count"+matcher.group(0));

String mat=matcher.group(0);

inlink=c;

System.out.println(" Inlinks"+inlink);

inlink = inlink*0.75;

System.out.println("matches"+inlink);

System.out.println("content"+content);

String br="update sample set linkcost='"+inlink+"' ,criteria


= 'matches' where

url='"+string1+"'";

System.out.println(br);

PreparedStatement ps=conn.prepareStatement(br);

31
st3.executeUpdate(br);

st2.executeUpdate("update sample set


contentcost="+content+" where url='"+string1+"'");

System.out.println("execute");

else

outlink++;

System.out.println("OutLink" + outlink);

System.out.println("Inlink"+ inlink);

outlink = outlink*0.50;

System.out.println("not matches"+outlink);

System.out.println("content"+content);

PreparedStatement
ps=conn.prepareStatement("update sample set linkcost='"+outlink+"'

,criteria = 'not matches' where url='"+string1+"'");

st2.executeUpdate("update sample set


contentcost="+content+" where url='"+string1+"'");

inlink=0;

outlink=0;

catch(Exception e)

System.out.println(e);

32
}

conn.close();

catch(Exception e)

System.out.println(e);

e.printStackTrace();

public int Postcontent(String s1,String s2,String s3)

int id=0,count=0;;

String words[]=new String [500];

StringTokenizer st=new StringTokenizer(s1);

int tokenCount=st.countTokens();

while (st.hasMoreTokens()) // is there stuff to get?

words[id]=st.nextToken();

if (s2.contains(words[id]) || s3.contains(words[id]))

count=count+1;

else

count=0;

System.out.println(count);

33
return count;

public static void main(String args[])

URLClustering ur= new URLClustering();

ur.Postcode1();

win2
import java.awt.Color;

import java.awt.Container;

import java.awt.Font;

import java.awt.ScrollPane;

import java.awt.Scrollbar;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.awt.image.TileObserver;

import java.io.BufferedReader;

import java.io.BufferedWriter;

import java.io.DataInputStream;

import java.io.FileInputStream;

import java.io.FileWriter;

import java.io.IOException;

34
import java.io.InputStreamReader;

import java.io.PrintStream;

import java.net.ServerSocket;

import java.net.Socket;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JButton;

import javax.swing.JComboBox;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.JPanel;

import javax.swing.JRootPane;

import javax.swing.JScrollPane;

import javax.swing.JTable;

import javax.swing.JTextArea;

import javax.swing.JTextField;

import javax.swing.table.DefaultTableModel;

import javax.swing.table.JTableHeader;

import javax.swing.text.BadLocationException;

import javax.swing.text.Document;

public class win2 extends JFrame implements ActionListener{

Connection con;

ResultSet rs,rs2;

35
Statement st;

static Socket clientSocket = null;

static ServerSocket serverSocket = null;

String name="";

int port_number=6666;

String IP,PORT,PROCESS,FNAME;

static Document doc1,doc2;

Container frame ;

JButton report;

JScrollPane scroll;

JTextField link;

JTextArea sublink;

JPanel panel;

JComboBox c=new JComboBox();

Connection conn;

Statement st1,st2;

String gh;

public win2() {

frame=getContentPane();

setTitle("ADD CHANGE IN WEBPAGE");

panel = new JPanel();

link= new JTextField();

sublink= new JTextArea();

report = new JButton("ADD LINK");

link.setBounds(230,45,70,25);

sublink.setBounds(230,150,200,130);

36
report.setBounds(230,290,100,40);

c.setBounds(230,45,200,40);

frame.add(c);

try{

//Class.forName("com.mysql.jdbc.Driver").newInstance();

//conn =
DriverManager.getConnection("jdbc:mysql://localhost:3306/pagerank","root","
root");

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
conn=DriverManager.getConnection("jdbc:odbc:pagerank","","");

st1=conn.createStatement();

st2=conn.createStatement();

ResultSet rs=st1.executeQuery("select * from sample");

while(rs.next())

c.addItem(rs.getString(2));

}catch(Exception e)

e.printStackTrace();

//c.setBounds(230,70,100,40);

frame.add(sublink);

frame.add(report);

panel.setLayout(null);

frame.add(panel);

37
report.addActionListener(this);

this.rootPane.setWindowDecorationStyle(JRootPane.QUESTION_DIALOG);

setBounds(200, 100, 500, 400);

setVisible(true);

setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);

public void actionPerformed(ActionEvent event)

if(event.getSource()==report){

try

System.out.println("test");

String k=c.getSelectedItem().toString();

System.out.println(k);

String g=sublink.getText();

System.out.println(g);

ResultSet rs2=st2.executeQuery("select links from sample


where url='"+k+"'");

while (rs2.next())

gh=rs2.getString("links");

System.out.println("Concatenated String " +gh.concat(g));

st2.executeUpdate("update sample set links='"+g+"' where


url='"+k+"'");

38
JOptionPane.showMessageDialog(this,"URL Links added
successfully.");

catch(Exception e)

e.printStackTrace();

public static void main(String[] args) {

new win2();

tableform
import java.awt.Color;

import java.awt.Container;

import java.awt.Font;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

39
import javax.swing.JButton;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JPanel;

import javax.swing.JRootPane;

import javax.swing.JScrollPane;

import javax.swing.JTable;

import javax.swing.JTextArea;

import javax.swing.JTextField;

import javax.swing.table.DefaultTableModel;

import javax.swing.table.JTableHeader;

import javax.swing.table.TableColumn;

import java.io.*;

public class tableform extends JFrame implements ActionListener

JTable table;

JTable table1;

DefaultTableModel dftmodel;

JScrollPane scrollpane;

JScrollPane scrollpane1;

String rescost,usercost;

java.awt.Container conn=getContentPane();

JButton display= new JButton("LINKCOST");

JButton display2= new JButton("REFRESH");

JButton add= new JButton("ADD LINK");

JTextField link;

40
JTextField sublink;

Container frame;

JPanel panel;

JLabel label=new JLabel("RANK SCHEDULING TABLE");

Connection con;

Statement st;

ResultSet rs,rs2;

Statement st1,st2;

ResultSet rs1;

int i=0,j=0,pe=0,k,m,n,o,p,q,temp=0,temp2=0,sum=0,sum1=0,sum2=0;

String id="R",rank,cluster;

String value=null;

double gen1,gen2,gen3,count;

double tot;

String
set2=null,pset=null,set1=null,all1=null,r=null,uid=null,mincost=null,ur,cost,co
nt;

// form design

public tableform()

setTitle("RANK SCHEDULING");

setLayout(null);

setDefaultCloseOperation(EXIT_ON_CLOSE);

conn.setBounds(0, 0, 500,500);

conn.add(display);

conn.add(add);

41
conn.add(display2);

conn.add(label);

display.setBounds(50, 200, 100, 25);

add.setBounds(50,300,100,30);

label.setBounds(350, 50, 500, 100);

display2.setBounds(50,400,100,30);

add.addActionListener(this);

display.addActionListener(this);

display2.addActionListener(this);

label.setFont(new Font("Lucida",Font.PLAIN,24));

setVisible(true);

setBounds(0, 0, 1020, 770);

conn.setBackground(Color.white);

public void actionPerformed(ActionEvent e) {

if(e.getSource()==display)

tabledisplay();

if (e.getSource()==display2)

new URLClustering();

tabledisplay();

if (e.getSource()== add)

42
new win2();

//table display of URL data from database

public void tabledisplay()

String coloumnName[]={"url","linkcost","contentcost","rank"};

table=new JTable();

dftmodel=new DefaultTableModel(null,coloumnName);

table.setModel(dftmodel);

scrollpane=new JScrollPane(table);

scrollpane.setBounds(200,150,650,400);

table.setBackground(Color.WHITE);

conn.add(scrollpane);

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection
con=DriverManager.getConnection("jdbc:odbc:pagerank","","");

//Class.forName("com.mysql.jdbc.Driver").newInstance();

//con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/pagerank","root","
root");

st1=con.createStatement();

st2=con.createStatement();

rs1=st1.executeQuery("select url,linkcost,contentcost from sample");

while(rs1.next())

43
{

ur=rs1.getString("url");

cost=rs1.getString("linkcost");

cont=rs1.getString("contentcost");

gen3=Double.parseDouble(cont);

gen2=Double.parseDouble(cost);

tot=gen2+gen3;

System.out.println(gen2);

System.out.println(gen3);

System.out.println(tot);

if (tot>=1.0) {

rank="2";

else {

rank="1";

String sep = Double.toString(tot);

String[] Rows={ur,cost,cont,rank};

st2.executeUpdate("update sample set rank="+rank+" where url='"+ur+"'");

TableColumn column = table.getColumnModel().getColumn(0);

column.setPreferredWidth(20);

table.setRowHeight(20);

//set specific row height

table.setRowHeight(2,50);

//Select single cell

JTableHeader header = table.getTableHeader();

44
header.setBackground(Color.getHSBColor(5, 5, 5));

dftmodel.addRow(Rows);

catch(Exception ex)

ex.printStackTrace();

public static void main(String args[])

new tableform();

45
12. SCREEN SHOTS

46
47
48
49
50
13. CONCLUSION

A user may be interested in detecting the changes to the Page ranking


for a variety of reasons. The system can prove useful in certain applications
such as those linked with delivering the whole page changes would be
delivered.
To carry out Webpage change detection Hungarian Algorithm provides
the research of investigated aspects of changed detection and monitoring.
Thus the project entitled “AN EFFICIENT WEB PAGE CHANGE
DETECTION SYSTEM BASED ON AN OPTIMIZED HUNGARIAN
ALGORITHM” is used to monitor and maintaining the status the projects
currently running in the concern.

This project is fully developed using NET BEANS which is more users
friendly manner to maintain the WebPages. As the project is developed using
the advanced technology it is more feasible and secure one.

51
BIBLIOGRAPHY

R.E. Burkard, M. Dell'Amico, S. Martello: Assignment Problems. SIAM,


Philadelphia (PA.) 2009. ISBN 978-0-89871-663-4

Harold W. Kuhn, "The Hungarian Method for the assignment problem", Naval
Research Logistics Quarterly, 2:83–97, 1955. Kuhn's original publication.

Harold W. Kuhn, "Variants of the Hungarian method for assignment


problems", Naval Research Logistics Quarterly, 3: 253–258, 1956.

J. Munkres, "Algorithms for the Assignment and Transportation Problems",


Journal of the Society for Industrial and Applied Mathematics, 5(1):32–38,
1957 March.

M. Fischetti, "Lezioni di Ricerca Operativa", Edizioni Libreria Progetto


Padova, Italia, 1995.

R. Ahuja, T. Magnanti, J. Orlin, "Network Flows", Prentice Hall, 1993.

Web References
^ http://www.lix.polytechnique.fr/~ollivier/JACOBI/jacobiEngl.htm

^ Beryl Castello, The Hungarian Algorithm

52
DETAILED SYLABUS
ENTREPRENRURSHIP, ENVIRONMENTAL &
DISASTER MANAGEMENT
1. ENTREPRENEURSHIP

1.1. Introduction – Entrepreneur - types – Characteristics & attributes of


Entrepreneur – Expectation of Entrepreneur - Contributions of an Entrepreneur
– Identifying problems and opportunities – Why do Entrepreneurs fail.

1.2. Types of Industries – Importance of SSI – Assistance offered –


Governmental and Non – Governmental Organizations – Identifying prospects
of various Small scale industries in your area with resources and Other
infrastructural Facilities available.

1.3 Starting a SSI – various stages – product – ownership – locality – points


related to building, Water and Electricity – financial assistance – raw materials
– machineries – human resource – efficient Manufacturing techniques –
marketing - Technical, Financial, Marketing, Personnel and Management
Feasibility study and report – concessions and incentives offered by agencies.

1.4. Industrial Zones – industrial Estates – Pollution Control – industries with


pollution problem – Marketing Assistance

1.5. Acquiring common services – repairing – testing facilities – training


institutions – suppliers of applied Technology.

2. ENVIRONMENTAL MANAGEMENT

2.1. Introduction – Environmental Ethics – Assessment of Socio Economic


Impact – Environmental Audit –Mitigation of adverse Impact on Environment

53
– Importance of Pollution Control – Types of Industries And Industrial
Pollution.

2.2. Solid waste management – Characteristics of Industrial wastes – Methods


of Collection, transfer and Disposal of solid Water – Converting water to
energy – Hazardous water management Treatment Technologies.

2.3. Waste water management – Characteristics of Industrial effluents –


Treatment and disposal methods – Pollution of water sources and effects on
human health.

2.4. Air pollution management – Sources and effects – Dispersion of air


pollutants – Air pollution control Methods – Air quality man – management.

2.5. Noise pollution management – Effects of noise on people – Noise control


methods.

3. DISASTER MANAGEMENT

3.1. Introduction – Disasters due to natural calamities such as Earthquake,


Rain, Flood, Hurricane, Cyclones Etc – Man made Disasters – Crisis due to
fires, accidents, strikes etc – Loss of property and life.

3.2. Disaster Mitigation measures – Causes for major disasters – Risk


identification – Hazard Zones – Selection of sites for Industries and residential
buildings – Minimum distances from Sea – Orientation Of Buildings – Stability
of Structures – Fire escapes in buildings – Cyclone shelters – Warning
Systems.

3.3. Disaster Management – Preparedness, Response, Recovery –


Arrangements to be made in the industries / factories and buildings –
Mobilization of Emergency Services – Search and Rescue Operations – First
Aids – Transportation of affected people – Hospital facilities – Fire fighting
Arrangements – Communication systems – Restoration of Power supply –
Getting assistance of Neighbors / Other organizations in Recovery and
Rebuilding works – Financial commitments – Compensations to be paid –
Insurances – Rehabilitation.

54
LIST OF QUESTIONS
1. ENTREPRENEURSHIP
1. What is entrepreneurship? Explain.
2. Who is a successful entrepreneur? Why?
3. List the various stages of decisions an entrepreneur has to make before
reaching the goal of his project.
4. List the types of industries.
5. Define - Small scale industry.
6. What are the qualities of an entrepreneur?
7. What are the expectations of entrepreneurship?
8. What are the various SSI that can flourish in your district?
9. Identify the infrastructural needs for an industry.
10. Identify the natural resources available in your area for starting a SSI.
11. What are the various agencies involved in the establishment and
development of various SSI?
12. What are the roles of District Industries Centre?
13. Name some of the agencies funding SSI.
14. What are the various concessions and incentives available for a SSI?
15. List the points to be considered with relation to building, water and
electricity before a SSI is started.
16. List the points to be considered with relation to human resource before a
SSI is started.

55
17. Name some consumer products with wide demand that can be
manufactured by a SSI?
18. Identify the non-qualified industries that may not be given financial
assistance and concessions.
19. What is feasibility study?
20. What is the importance of SSI?
21. List some industries identified as pollution-free industries.
22. List some industries identified as industries with pollution problem. 122
23. What is an industrial zone?
24. What is an industrial estate?
25. What are the facilities available in an industrial estate?
26. Identify the various training agencies associated with SSI.
27. What is applied technology?
28. From whom you shall get applied technology for starting a SSI?
29. From where you shall get repairing and testing facilities?
30. What are the various training agencies available for acquiring SSI training?
31. List the governmental agencies from whom you shall get financial
assistance for a SSI.
32. What are the steps involved in preparing a feasibility report.
33. What are the factors to be considered regarding raw materials for a SSI?
34. Name some SSI that may not need raw materials.
35. Differentiate various classifications of industries.
36. What is a LSI?
37. What are the features of a SSI?
38. Name some products that may not need electricity for production.
39. What are the factors to be considered for starting a SSI?
40. What are the advantages of becoming an entrepreneur?
41. If you opt to be an entrepreneur what are the steps you would take to
become a successful entrepreneur.
42. What are the facilities available for a new SSI in an industrial estate?

56
43. List the various government departments that would be associated with a
SSI.
44. Why do entrepreneurs fail?
45. What are the types of entrepreneurs?

2. ENVIRONMENTRAL MANAGEMENT
1. What is the responsibility of an Engineer-in-charge of an Industry with
respect to Public Health?
2. Define Environmental Ethic.
3. How Industries play their role in polluting the environment?
4. What is the necessity of pollution control? What are all the different
organizations you know, which deal with pollution control?
5. List out the different types of pollutions caused by a Chemical / Textile /
Leather / Automobile / Cement factory.
6. What is meant by Hazardous waste?
7. Define Industrial waste management.
8. Differentiate between garbage, rubbish, refuse and trash based on their
composition and source.
9. Explain briefly how the quantity of solid waste generated in an industry
could be reduced.
10. What are the objectives of treatments of solid wastes before disposal?
11. What are the different methods of disposal of solid wastes?
12. Explain how the principle of recycling could be applied in the process of
waste minimization.
13. Define the term ‘Environmental Waste Audit’.
14. List and discuss the factors pertinent to the selection of landfill site.
15. Explain the purpose of daily cover in a sanitary landfill and state the
minimum desirable depth of daily cover.
16. Describe any two methods of converting waste into energy.

57
17. What actions, a local body such as a municipality could take when the
agency appointed for collecting and disposing the solid wastes fails to do the
work continuously for number of days?
18. Write a note on Characteristics of hazardous waste.
19. What is the difference between municipal and industrial effluent?
20. List few of the undesirable parameters / pollutants anticipated in the
effluents from oil refinery industry / thermal power plants / textile industries /
woolen mills / dye industries /electroplating industries / cement plants / leather
industries (any two may be asked)
21. Explain briefly the process of Equalization and Neutralization of waste
water of varying characteristics Discharged from an Industry.
22. Explain briefly the Physical treatments “Sedimentation” and “Floatation”
processes in the waste water treatment.
23. Explain briefly when and how chemical / biological treatments are given to
the waste water.
24. List the four common advanced waste water treatment processes and the
pollutants they remove.
25. Describe refractory organics and the method used to remove them from the
effluent.
26. Explain biological nitrification and de-nitrification.
27. Describe the basic approaches to land treatment of Industrial Effluent.
28. Describe the locations for the ultimate disposal of sludge and the treatment
steps needed prior to ultimate disposal.
29. List any five Industries, which act as the major sources for Hazardous Air
Pollutants.
30. List out the names of any three hazardous air pollutants and their effects on
human health.
31. Explain the influence of moisture, temperature and sunlight on the severity
of air pollution effects on materials.
32. Differentiate between acute and chronic health effects from Air pollution.
33. Define the term Acid rain and explain how it occurs.

58
34. Discuss briefly the causes for global warming and its consequences
35. Suggest suitable Air pollution control devices for a few pollutants and
sources.
36. Explain how evaporative emissions and exhaust emissions are commonly
controlled.
37. What are the harmful elements present in the automobile smokes? How
their presence could be controlled?
38. What is the Advantage of Ozone layer in the atmosphere? State few reasons
for its destruction.
39. Explain the mechanism by which hearing damage occurs.
40. List any five effects of noise other than hearing damage.
41. Explain why impulsive noise is more dangerous than steady state noise.
42. Explain briefly the Source – Path – Receiver concept of Noise control.
43. Where silencers or mufflers are used ? Explain how they reduce the noise.
44. Describe two techniques to protect the receiver from hearing loss when
design / redress for noise control fail.
45. What are the problems faced by the people residing along the side of a
railway track and near to an Airport? What provisions could be made in their
houses to reduce the problem?

3. DISASTER MANAGEMENT
1. What is meant by Disaster Management? What are the different stages of
Disaster management?
2. Differentiate Natural Disasters and Man made Disasters with examples.
3. Describe the necessity of Risk identification and Assessment Surveys while
planning a project.
4. What is Disasters recovery and what does it mean to an Industry?
5. What are the factors to be considered while planning the rebuilding works
after a major disaster due to flood / cyclone / earthquake? (Any one may be
asked)

59
6. List out the public emergency services available in the state, which could be
approached for help during a natural disaster.
7. Specify the role played by an Engineer in the process of Disaster
management.
8. What is the cause for Earthquakes? How they are measured? Which parts of
India are more vulnerable for frequent earthquakes?
9. What was the cause for the Tsunami 2004 which inflicted heavy loss to life
and property along the coast of Tamilnadu? Specify its epicenter and
magnitude.
10. Specify the Earthquake Hazard Zones in which the following towns of
Tamilnadu lie:
(a) Chennai (b) Nagapattinam (c) Coimbatore (d) Madurai (e) Salem.
11. Which parts of India are experiencing frequent natural calamities such as
(a) heavy rain fall (b) huge losses due to floods (c) severe cyclones
12. Define basic wind speed. What will be the peak wind speed in (a) Very
high damage risk zone – A, (b) High damage risk zone, (c) Low damage risk
zone.
13. Specify the minimum distance from the Sea shore and minimum height
above the mean sea level, desirable for the location of buildings.
14. Explain how the topography of the site plays a role in the disasters caused
by floods and cyclones.
15. Explain how the shape and orientation of buildings could reduce the
damages due to cyclones.
16. What is a cyclone shelter ? When and where it is provided ? What are its
requirements ?
17. What Precautionary measures have to be taken by the authorities before
opening a dam for discharging the excess water into a canal/river ?
18. What are the causes for fire accidents? Specify the remedial measures to be
taken in buildings to avoid fire accidents.
19. What is a fire escape in multistoried buildings? What are its requirements?

60
20. How the imamates of a multistory building are to be evacuted in the event
of a fire/Chemical spil/Toxic Air Situation/ Terrorist attack, (any one may be
asked).
21. Describe different fire fighting arrangements to be provided in an Industry.
22. Explain the necessity of disaster warning systems in Industries.
23. Explain how rescue operations have to be carried out in the case of collapse
of buildings due to earthquake / blast / Cyclone / flood.
24. What are the necessary steps to be taken to avoid dangerous epidemics after
a flood disaster?
25. What relief works that have to be carried out to save the lives of workers
when the factory area is suddenly affected by a dangerous gas leak / sudden
flooding ?
26. What are the difficulties faced by an Industry when there is a sudden power
failure? How such a situation could be managed?
27. What are the difficulties faced by the Management when there is a group
clash between the workers? How such a situation could be managed?
28. What will be the problems faced by the management of an Industry when a
worker dies because of the failure of a mechanical device due to poor
maintenance? How to manage such a situation ?
29. What precautionary measures have to be taken to avoid accidents to
labourers in the Industry in a workshop / during handling of dangerous
Chemicals / during construction of buildings / during the building maintenance
works.
30. Explain the necessity of medical care facilities in an Industry / Project site.
31. Explain the necessity of proper training to the employees of Industries
dealing with hazardous products, to act during disasters.
32. What type of disaster is expected in coal mines, cotton mills, Oil refineries,
ship yards and gas plants?
33. What is meant by Emergency Plan Rehearsal? What are the advantages of
such Rehearsals?

61
34. What action you will take when your employees could not reach the factory
site because of continuous strike by Public Transport workers?
35. What immediate actions you will initiate when the quarters of your factory
workers are suddenly flooded due to the breach in a nearly lake / dam, during
heavy rain?
36. What steps you will take to avoid a break down when the workers union of
your Industry have given a strike notice?
37. List out few possible crisis in an organization caused by its workers? What
could be the part of the middle level officials in managing such crisis?
38. What types of warning systems are available to alert the people in the case
of predicted disasters, such as floods, cyclone etc.
39. Explain the necessity of Team work in the crisis management in an Industry
/ Local body.
40. What factors are to be considered while fixing compensation to the workers
in the case of severe accidents causing disability / death to them?
41. Explain the legal / financial problems the management has to face if safely
measures taken by them are found to be in adequate.
42. Describe the importance of insurance to men and machinery of an Industry
dealing with dangerous jobs.
43. What precautions have to be taken while storing explosives in a match/ fire
crackers factory?
44. What are the arrangements required for emergency rescue works in the case
of Atomic Power Plants?
45. Why residential quarters are not constructed nearer to Atomic Power
Plants?

62

You might also like