explanation of EM algorithm, JAVA Programming

Assignment Help:
try {
pa="weblog";
pas="weblog";
Connection c;
Statement st;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c = DriverManager.getConnection("jdbc:odbc:"+pa+"");
st = c.createStatement();
int i=0,j=0;
ResultSet rs = st.executeQuery("select * from "+pas+" where URLstem like ''%gif'' or URLstem like ''%css'' or URLstem like ''%jpg''or URLstem like ''%exe''or URLstem like ''%html''or URLstem like ''%aspx'' or URLstem like ''%ref'' or URLstem like ''%/%''");
while (rs.next())
{
//****************************EM Algorithm **************************

String vs=rs.getString("URLstem");
if((vs.contains("jpg"))||(vs.contains("gif"))||(vs.contains("css")))
{

jTextArea1.append(vs+"\n");
as[ik]=vs;
ik++;

}else if((vs.contains("html"))||(vs.contains("exe"))||(vs.contains("aspx"))||(vs.contains("ref"))||(vs.contains("ico")))
{
jTextArea1.append(vs+"\n");
}

}
} catch (SQLException ex) {

} catch (ClassNotFoundException ex) {

}


}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try {

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// String sd=jTextField1.getText();
Connection c = DriverManager.getConnection("jdbc:odbc:"+pa+"");
Statement st = c.createStatement();
ResultSet rs;

String o=" " ;
int i=0;

while(i<=ik)
{
st.executeUpdate("delete from "+pas+" where URLstem=''"+as[i]+"''");
i++;
}
JOptionPane.showMessageDialog((Component) null,"Data has been deleted","Click OK",JOptionPane.INFORMATION_MESSAGE);
} catch (SQLException ex) {
//Logger.getLogger(logupdate.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
//Logger.getLogger(logupdate.class.getName()).log(Level.SEVERE, null, ex);
}
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
hide();
new form4().setVisible(true);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see https://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(form3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(form3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(form3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(form3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//


/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {
new form3().setVisible(true);
}
});
}

// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JTextArea jTextArea2;
// End of variables declaration
}
(
explanation of this algorithm)

Related Discussions:- explanation of EM algorithm

Develop a fantasy football, Need to develop a Fantasy football Project D...

Need to develop a Fantasy football Project Description: I am seeking to build a Fantasy football website. i already have an example of existing website. i want the exact same

Add wordpress color picker to plug-in text field, Add WordPress color picke...

Add WordPress color picker to plug-in text field Project Description: I have a simple plug-in that needs the built-in Word Press color picker added to one of the text input f

What is linear search, What is linear search? It is the simplest form o...

What is linear search? It is the simplest form of search. It searches for the element sequentially starting from first element. This search has a drawback if element is located

Travelling salesman animation, how to implement tsp problem using java appl...

how to implement tsp problem using java applet to present in form of visulation

Socket programming in Java: TCP, Objectives: socket programming in Java: TC...

Objectives: socket programming in Java: TCP Exercises: Goal: In this project we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web ser

I want someone to fix some bugs in a java app, I want someone to fix some b...

I want someone to fix some bugs in a java app Project Description: I have a small app in java, but it has some issues, the app is running. But we need to make it work more st

Explain how many ways businesses monitor their employees, Explain how many ...

Explain how many ways businesses monitor their employees? • Systems are available which monitor almost every key stroke that an employee forms on a computer. • Systems are avai

What are the basic advantages of jms, JMS is asynchronous in nature. Theref...

JMS is asynchronous in nature. Therefore not all the pieces need to be up all the time for the application to function as a whole. Even if the receiver is down the MOM will kept th

What is switchaction, The SwitchAction class gives a means to switch from a...

The SwitchAction class gives a means to switch from a resource in one module to another resource in a dissimilar module. SwitchAction is useful only if you have multiple modules in

Farm production system, Farm Production System Project Description: I...

Farm Production System Project Description: I require software that will allow me to input/record the daily production of our farm and allow me to view the data back in the o

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd