Click here to Skip to main content
15,892,072 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Hi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. Pin
superwave8-Aug-09 3:27
superwave8-Aug-09 3:27 
GeneralRe: Hi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. Pin
Tim Craig9-Aug-09 8:48
Tim Craig9-Aug-09 8:48 
GeneralRe: Hi, I'm a freshman for the Digtal image processing, I wonder if HMM or Markov model is the right choice for target tracking. [modified] Pin
superwave9-Aug-09 18:33
superwave9-Aug-09 18:33 
QuestionHow to extract data from web Pin
Rakesh Ranjan Dey6-Aug-09 2:17
Rakesh Ranjan Dey6-Aug-09 2:17 
AnswerRe: How to extract data from web Pin
Super Lloyd6-Aug-09 3:13
Super Lloyd6-Aug-09 3:13 
QuestionNeed some logic help. Pin
benjamin yap4-Aug-09 15:00
benjamin yap4-Aug-09 15:00 
AnswerRe: Need some logic help. Pin
Luc Pattyn4-Aug-09 15:38
sitebuilderLuc Pattyn4-Aug-09 15:38 
GeneralRe: Need some logic help. [modified] Pin
benjamin yap4-Aug-09 17:18
benjamin yap4-Aug-09 17:18 
Okay, anyway my loop is working already, but just some problems.

At which part should i add the code to delete the message after checking thru all the keywords and it does not match?

I tried adding a else statement inside the if statement of my inner loop but its not working

ResultSet rs = null;
ResultSet rs2 = null;
try {
    String firstword = null;
    String keyword = null;
    int number = 0;

    String sql = "Select * from smsserver_in";
    rs = db.SelectDB(sql);
    while (rs.next()) {
        StringTokenizer st = new StringTokenizer(rs.getString("text"));
        firstword = st.nextToken();
        //out.println("1"+firstword);
        number = rs.getInt("id");

        String sql1 = "Select * from USERAPP";
        rs2 = db.SelectDB(sql1);
        while (rs2.next()) {
            keyword = rs2.getString("keyword");
            //out.println("2"+keyword);
            if (firstword.equals(keyword)) {
                out.println(number);
                String sql3 = "Insert into app_" + keyword + "(originator,text)values(" + rs.getString("originator") + ",'" + rs.getString("text") + "')";
                db.InsertDB(sql3);
                String sql4 = "delete from smsserver_in where id=" + number;
                db.UpdateDB(sql4);
            }
        }

    }
} catch (Exception ex) {
}


modified on Tuesday, August 4, 2009 11:37 PM

GeneralRe: Need some logic help. Pin
Luc Pattyn4-Aug-09 23:25
sitebuilderLuc Pattyn4-Aug-09 23:25 
QuestionLexical Analysis Useful for Other Things as Well? Pin
Richard Andrew x644-Aug-09 5:31
professionalRichard Andrew x644-Aug-09 5:31 
AnswerRe: Lexical Analysis Useful for Other Things as Well? Pin
Luc Pattyn4-Aug-09 6:13
sitebuilderLuc Pattyn4-Aug-09 6:13 
AnswerRe: Lexical Analysis Useful for Other Things as Well? Pin
N a v a n e e t h4-Aug-09 7:57
N a v a n e e t h4-Aug-09 7:57 
AnswerRe: Lexical Analysis Useful for Other Things as Well? Pin
harold aptroot6-Aug-09 2:58
harold aptroot6-Aug-09 2:58 
AnswerRe: Lexical Analysis Useful for Other Things as Well? Pin
N a v a n e e t h6-Aug-09 18:10
N a v a n e e t h6-Aug-09 18:10 
AnswerRe: Lexical Analysis Useful for Other Things as Well? Pin
Eddy Vluggen8-Aug-09 7:13
professionalEddy Vluggen8-Aug-09 7:13 
QuestionBackus-Naur Form Terminology Pin
Richard Andrew x643-Aug-09 13:36
professionalRichard Andrew x643-Aug-09 13:36 
AnswerRe: Backus-Naur Form Terminology Pin
Luc Pattyn3-Aug-09 15:23
sitebuilderLuc Pattyn3-Aug-09 15:23 
GeneralRe: Backus-Naur Form Terminology Pin
Richard Andrew x643-Aug-09 15:28
professionalRichard Andrew x643-Aug-09 15:28 
GeneralRe: Backus-Naur Form Terminology Pin
Luc Pattyn3-Aug-09 15:36
sitebuilderLuc Pattyn3-Aug-09 15:36 
GeneralRe: Backus-Naur Form Terminology Pin
Richard Andrew x643-Aug-09 15:39
professionalRichard Andrew x643-Aug-09 15:39 
QuestionAny algorithm for allocation Pin
Sabari MD31-Jul-09 1:03
Sabari MD31-Jul-09 1:03 
QuestionRe: Any algorithm for allocation Pin
harold aptroot31-Jul-09 1:28
harold aptroot31-Jul-09 1:28 
AnswerRe: Any algorithm for allocation Pin
Sabari MD31-Jul-09 1:45
Sabari MD31-Jul-09 1:45 
AnswerRe: Any algorithm for allocation Pin
Luc Pattyn31-Jul-09 1:39
sitebuilderLuc Pattyn31-Jul-09 1:39 
AnswerRe: Any algorithm for allocation Pin
Moreno Airoldi1-Aug-09 1:13
Moreno Airoldi1-Aug-09 1:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.