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

Program to change base system, Write a program called BaseConverter that pr...

Write a program called BaseConverter that prompts (asks) the user for a base 10 number and another number, between 2 and 10 inclusive. This second number is the base to which to co

How can you describe a consistent web design, How can you describe a consis...

How can you describe a consistent web design? Why is it required? A consistent web design is Easy understandable, not along with heavy graphics, easy navigation. It is required

Basic difference b/w finalize(), 1.   final - it is a constant declarati...

1.   final - it is a constant declaration. 2.   finally - handles exception. The finally block is optional and gives a mechanism to clean up regardless of what occurs within

Difference between bean factory and application context, On the surface, an...

On the surface, an application context is similar as a bean factory. But application context offers much more.. ? Application contexts give a means for resolving text messages,

Online music store application, An online music store offers all songs for ...

An online music store offers all songs for 3$ each. The store requires members to prepay any amount of money they wish, and then download as many songs accordingly. You are require

Give the example of using a class from the class library, Give the example ...

Give the example of Using a class from the class library ? You use the java.net.URL class only like you'd use any other class along with these methods in which happens to be n

Program, write code employe managment

write code employe managment

What does a simple spring application contain, These applications are like ...

These applications are like any Java application. They are made up of not many classes, each performing a particular purpose within the application. But these classes are configure

What is meant by universal access of internet services, What is meant by un...

What is meant by universal access of internet services ? the meaning of Universal access of internet services means same functionality to everyone.

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