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, write a program in java which enters name,roll #,and shows the sum...

write a program in java which enters name,roll #,and shows the sum of students english and maths marks?

Gui-based event-driven application program, GUI-Based Application Object...

GUI-Based Application Objectives:   (1)   Learning how to write a GUI-based application in Java. (2) Learning how to write an event driven application program in Java.

Method over ridding method in java, Q. Write short on the method over riddi...

Q. Write short on the method over ridding method in java? Ans. Method over ridding and dynamic binding: We have seen that a method in a super class is inherited by its subclass

Applying java if and if..else statements, For this Assignment, submit the f...

For this Assignment, submit the following program: Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The

High quality leads and directory scraping, Project Description: (1) I wa...

Project Description: (1) I want a comprehensive list of Australian chiropractors. The data requires coming from various sources including Google but the following are obligatory

Need java assignment for course, Need Java Assignment for course Project...

Need Java Assignment for course Project Description: I want to get an assignment done. Involves building on a minesweeper game written in Java. You subsequent code is to be u

Program to brute force search, Ask questionWrite a program BruteForceSearch...

Ask questionWrite a program BruteForceSearch that uses the brute-force approach given above and compare its running time on your computer with that of Binary Search for largeW.txt

Maintenance and administration activities, Maintenance and Administration a...

Maintenance and Administration activities: Name                        : e-Commerce OS and Soft wares    : Websphere 6.0, IHS, Unix, Weblogic 8.1   Maintenance an

Animal trim java, Create an application for an animal-fur trimming service....

Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The fee for a small animal (under 6 pounds) is $100, a

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