public Connection databaseConnection = null;
public Statement statement = null;
public ResultSet ipdata=null;
public void createConnection(){
try {
Class.forName("com.mysql.jdbc.Driver");
//String sourceURL = new String("jdbc:mysql://127.0.0.1/test");
//databaseConnection = DriverManager.getConnection(sourceURL,"root","root123");
String sourceURL = new String("jdbc:mysql://127.0.0.1/"+database);
databaseConnection = DriverManager.getConnection(sourceURL,user,passwd);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
public void getData(){
try {
statement = databaseConnection.createStatement();
ipdata = statement.executeQuery("SELECT * FROM "+table);
int i=0;
while(ipdata.next()) {
System.out.println(i++);
System.out.println(ipdata.getString("request_ip"));
System.out.println(ipdata.getString("request_object_url"));
}
} catch (SQLException e) {
e.printStackTrace();
}
}
Thursday, June 29, 2006
Saturday, June 17, 2006
Turing test
Turing test is used to identify the machines who have intelligence. Artificial Intelligence in the sense it is not artificial, as we refer to machines which are artificial we use the term artificial. Are there any problems and revisions to turing test.
Http request
Http requests send by different browsers have different order for the format of the Http requests . I think I'm correct in that case. If I'm wrong any one can correct me. Currently I am writing a webserver using java. So I have to analayse the http requests. The order of "Referer" "Browser type" varies according to the browser used to request. So I have to do lot of pattern matching. I hate this type of String manupilation to the power of infinity ....................
17/06/2006
Tharindu
17/06/2006
Tharindu
Thursday, February 09, 2006
Hi
Hi all,
Future world will be more dangerous for Humans. So we need to understand the destruction caused by a human to another human and try to correct our mistakes
09/02/05
Tharindu
Future world will be more dangerous for Humans. So we need to understand the destruction caused by a human to another human and try to correct our mistakes
09/02/05
Tharindu
Subscribe to:
Posts (Atom)