JSP JavaBean used to achieve the database search page display and

  Abstract: JSP JavaBean to achieve the database search page display and 

  </ Td> </ tr> <tr> <td height="35" valign="top" class="ArticleTeitle"> <table width = "100%" border = "0" cellspacing = "0" cellpadding = " 0 "> <tr> <td width="256" height="86" align="center" valign="top"> </ td> <td width="428" valign="top"> to use JSP JavaBean Implementation of the database search page display and 

  1, Database: MySQL, Pagination and create database tables using mysql directories, file creation. 

  2 configurations: the PaginationJSPJavaBean copied to the directory% Tomcat% \ webapps \ directory can be, the source code is inside. 

  3, can visit http://172.18.8.118:8080/PaginationJSPJavaBean/PaginationResult.jsp 

  4, I remember that the deployment of MySQL JDBC driver to Tomcat%% \ webapps \ PaginationJSPJavaBean \ WEB-INF \ lib \ directory or Tomcat%% \ common \ lib \ directory 

  </ Td> </ tr> <tr> <td height="20" colspan="2"> 

  Running sketch: 

  </ Td> </ tr> </ table> 

  </ Td> </ tr> <tr> 

  ↑ Back 

Agents Search java do

  Abstract: java do Acting Search 

  </ Td> </ tr> <tr> <td height="35" valign="top" class="ArticleTeitle"> <table width="674" border="0"> <tr> <td width = " 269 "> </ td> <td width="395"> today, and occasionally see a foreign website every hour automatically released as a proxy server. 

  Thus, wrote programs to its website address of the proxy server to the preservation of local, and then once every hour. 

  Procedures are written using java, is the principle of grasping the content of the sites, and then analyze the code, stored in c: \ proxy.htm document. 

  Per hour run the java procedure is achieved through planned tasks, the effect was not that bad. 

  If more than one site can be downloaded from the proxy server, coupled with a proxy server to verify the validity of the comparison perfect. 

  If they have the server, it will also be released as per the proxy server. 

  Java source code as follows: </ td> </ tr> </ table>? 
  / ** 
  * Save the proxy server address to c: \ documents proxy.htm 
  * @ Web http://blog.csdn.net/cqq 
  * @ Author Ciqi strong 
  * @ Version 1.00 05/02/01 
  * / 
  Import java.net .*; 
  Import java.io. *; 
  Import java.util.regex .*; 
  Import java.util .*; 

  (Public class JavaProxy 

  Public static void main (String [] args) throws Exception ( 

  System.out.println ( "Acting is generated list … \ r \ n"); 
  JavaProxy ou = new JavaProxy (); 
  File f = new File ( "c: \ \ proxy.htm"); 
  BufferedWriter bw = new BufferedWriter (new OutputStreamWriter (new FileOutputStream (f))); 

  String str = ou.getProxy1 (); 
  Pattern p = Pattern.compile ( " 

  • ");

      String [] = p.split ss (str); 
      String strTmp = ""; 
      String str1 = ""; 

      If (ss.length> 1) ( 
      Bw.write ( "<table width=\"90%\" border=\"0\" align=\"center\" bgcolor=\"#F9F9F9\"> <tr> <td>"); 
      Bw.write ( "Last Modified:" + new Date (). ToLocaleString () + " 

    ");
      For (int i = 1; i    StrTmp [i] = ss. Substring (10, 12) / / Country 
      If (strTmp.equals ( "CN")) 
      StrTmp = "" + strTmp + ""; 
      Str1 = removeAllTag (ss [i]); 
      Bw.write ( "" + i + "" + strTmp + "" + + str1 " 
    ");

      ) 
      Bw.write ( "</ td> </ tr> </ table>"); 
      ) 
      Bw.close (); 
      System.out.println ( "complete"); 
      System.exit (0); 

      ) 


      Private String getProxy1 () ( 
      Int i = 0; 
      Try ( 
      URL url = new URL ( "http://www.cybersyndrome.net/pla.html"); 
      BufferedReader br = new BufferedReader (new InputStreamReader (url.openStream ())); 
      String s = ""; 
      StringBuffer sb = new StringBuffer (""); 
      While ((s = br.readLine ())!= null) ( 
      I + +; 
      If (i> 80 & & i <89) ( 
      Sb.append (s + "\ r \ n"); 
      ) 
      ) 
      Br.close (); 
      Return sb.toString (); 
      ) Catch (Exception e) ( 
      Return "error open url" + e.toString (); 
      ) 
      ) 

      Public static String removeAllTag (String src) ( 
      Return src.replaceAll ("<[^>]*>", ""); 
      ) 
      ) 


      Then javac JavaProxy.java 

      Java JavaProxy 

      Waiting for a good result.    </ Td> </ tr> <tr> 

      ↑ Back 

    Depth-first search and breadth-first search

      Abstract: The depth-first search and breadth-first search 

      </ Td> </ tr> <tr> <td height="35" valign="top" class="ArticleTeitle"> <table width = "100%" border = "0" cellspacing = "0" cellpadding = " 0 "> <tr> <td width="483" height="86" align="center" valign="top"> 

      First, depth-first search 
      Depth-first search is in the search tree each layer has expanded to only a subset of nodes, and continuing to advance the further progress until no longer (at leaf nodes or depth limit), only from the current node to return to the previous level nodes, along the other direction and continue to move forward.    This method is the search tree roots from the beginning of an evolving one. 

      Depth-first search is also known as the vertical search.    As the issue of a broken tree branch may contain infinite, if the depth-first search of potential infinite branches (that is, infinite depth), it is impossible to find the target node.    Therefore, the depth-first search strategy is not complete.    In addition, the application of this strategy are the solution is not necessarily optimal solution (Shortest Path). 

      Second, rearrangement Jiugong quiz 
      In a 3 x 3 Jiugong 1-8 in the eight and the number of randomly placed in a box which the grid yard.    As shown below left.    Now demands of the question: the Jiugong adjusted as follows in the form shown in Figure Right.    Adjustment rules: Each box will be (on the left or right) of the provisional figures-moved to a box.    Test programming. 

      | 2 | 8 | 3 | | 1 | 2 | 3 | 
      – 
      | 1 | | 4 | | 8 | | 4 | 

      | 7 | 6 | 5 | | 7 | 6 | 5 | 

      Depth-first search path diagram: 

      </ Td> <td width="201" valign="top"> </ td> </ tr> <tr> <td height="20" colspan="2"> 

      </ Td> </ tr> </ table> 

      Third, BFS 

      In the depth-first search algorithm, the greater the depth is the first node expanded.    If the search algorithm to the node according to the level of search, the layer nodes not dealing with the search, not the lower node processing, that is, the smaller the depth of the first node be expanded, that is to say The first node can be expanded to deal with, such as breadth-first search algorithm search method. 

      BFS path diagram: 

      Four flights (from "The Art of Java") 
      A customer to a scheduled from New York to Los Angeles flight tickets Below are the flight line, you look for a discount to customers programmes. 

      <table Width="581" border="1"> <tr> <td width="262"> flights </ td> <td width="303"> distance </ td> </ tr> <tr> < td> New York to Chicago </ td> <td> 900 miles </ td> </ tr> <tr> <td> Chicago to Denver </ td> <td> 1,000 miles </ td> </ tr> < tr> <td> New York to Toronto </ td> <td> 500 miles </ td> </ tr> <tr> <td> New York to Denver </ td> <td> 1,800 miles </ td> < / tr> <tr> <td> Toronto to Calgary </ td> <td> 1,700 miles </ td> </ tr> <tr> <td> Toronto to Los Angeles </ td> <td> 2,500 miles </ td> </ tr> <tr> <td> Toronto to Chicago </ td> <td> 500 miles </ td> </ tr> <tr> <td> Denver to Urbana </ td> <td> 1,000 miles </ td> </ tr> <tr> <td> Denver to Houston </ td> <td> 1,000 miles </ td> </ tr> <tr> <td> Houston to Los Angeles </ td> <td > 1,500 miles </ td> </ tr> <tr> <td> Denver to Los Angeles </ td> <td> 1,000 miles </ td> </ tr> </ table> 

      Below are using depth-first search for the procedure: 

      / / Find connections using a depth-first search. Import java.util .*; import java.io. *; / / Flight information. Class FlightInfo (String from; String to; int distance; boolean skip; / / used in backtracking FlightInfo (String f, String t, int d) (f = from; to = t; distance = d; skip = false;)) (class Depth final int MAX = 100; / / This array holds the flight information. FlightInfo flights [] = new FlightInfo [MAX]; int numFlights = 0 / / number of entries in flight array Stack btStack = new Stack (); / / backtrack stack public static void main (String args []) (String to and from; Depth ob = new Depth (); BufferedReader br = new BufferedReader (new InputStreamReader (System.in)); ob.setup (); try (System.out.print ( "From?"); from br.readLine = () ; System.out.print ( "To?"); to br.readLine = (); ob.isflight (from, to); if (ob.btStack.size ()! = 0) ob.route (to); ) catch (IOException exc) (System.out.println ( "Error on input.");)) / / Initialize the flight database. void setup () (addFlight ( "New York" and "Chicago", 900); addFlight ( "Chicago" and "Denver", 1000); addFlight ( "New York" and "Toronto", 500); addFlight ( "New York", "Denver", 1800); addFlight ( "Toronto", "Calgary" 1700); addFlight ( "Toronto", "Los Angeles", 2500); addFlight ( "Toronto", "Chicago", 500); addFlight ( "Denver", "Urbana," 1000); addFlight ( "Denver," " Houston, "1000); addFlight (" Houston, "" Los Angeles ", 1500); addFlight (" Denver "," Los Angeles ", 1000);) / / Put flights into the database. void addFlight (String from, String to, int dist) (if (numFlights <MAX) (flights [numFlights] = new FlightInfo (from, to, dist); numFlights + +;) else System.out.println ( "Flight database full \ n");) / / Show the route and total distance. void route (String to) (Stack rev = new Stack (); int dist = 0; FlightInfo f; btStack.size int num = () / / Reverse the stack to display route. for (int i = 0; i <num; i + +) rev.push (btStack.pop ()); for (int i = 0; i <num; i + +) (f = (FlightInfo) rev.pop (); System. out.print (f.from + "to"); dist + = f.distance;) System.out.println (to); System.out.println ( "Distance is" + dist);) / * If there is a flight between from and to, and return the distance of flight; otherwise, return 0 * / int match (String from, String to) (for (int i = numFlights-1; i> 1; i -) (if (flights [i]. from.equals (from) & & flights [i]. to.equals (to) & &! flights [i]. skip) (flights [i]. skip = true; / / prevent reuse return flights [ i]. distance;)) return 0; / / not found) / / Given from, find any connection. FlightInfo find (String from) (for (int i = 0; i <numFlights; i + +) (if (flights [i ]. from.equals (from) & &! flights [i]. skip) (FlightInfo f = new FlightInfo (flights [i]. from, flights [i]. to, flights [i]. distance); flights [i] . skip = true; / / prevent reuse return f;)) return null;) / / Determine if there is a route between from and to. void isflight (String from, String to) (int dist; FlightInfo f; / / See if at destination. dist = match (from, to); if (dist! = 0) (btStack.push (new FlightInfo (from, to, dist)) return;) / / Try another connection. f = find (from ); if (f! = null) (btStack.push (new FlightInfo (from, to, f.distance)); isflight (f.to, to);) else if (btStack.size ()> 0) (/ / Backtrack and try another connection. f = (FlightInfo) btStack.pop (); isflight (f.from, f.to);))) 

      Explained: isflight () method using recursive method of depth-first search, which calls first match () method checks the flight database, and to judge from in between flights up there.    If so, the goal of obtaining information, and the line pressure Ruzhan, and then return (to find a programme).    Otherwise, we will find call () method View from arbitrary and other cities between the lines, if found return to a description on the line FlightInfo object, or return null.    If the existence of such a line, then put the lines kept in f, and the current flight information pressure to the top of the stack, and then recursive calls isflight () method, then stored in f.to in a new city the starting city. otherwise a regression, the first pop-up Zhanding nodes, and then recursive calls isflight () method.    The process will continue till the objective to find. 

      Running Results: 

      C: \ java> java Depth 
      From? New York 
      To? Los Angeles 
      New York to Chicago to Denver to Los Angeles 
      Distance is 2900 

      C: \ java> 

      Depth-first search to find a solution, at the same time, above this particular issue, depth-first search had not been rolled back, and once found a solution, but if the data organized in a manner different from when the solution is likely to find a number of regression.    Therefore, the example of the output is not universal.    Moreover, in a very long search, but which do not have a branch of the solution, depth-first search performance will be poor, in such circumstances, not only in the depth-first search of the search path, a waste of time, but also Back to the goals of a waste of time. 

      Look at the example of the use of this breadth-first search procedures: 

      / / Find connections using a breadth-first search. Import java.util .*; import java.io. *; / / Flight information. Class FlightInfo (String from; String to; int distance; boolean skip; / / used in backtracking FlightInfo (String f, String t, int d) (f = from; to = t; distance = d; skip = false;)) (class Breadth final int MAX = 100; / / This array holds the flight information. FlightInfo flights [] = new FlightInfo [MAX]; int numFlights = 0 / / number of entries in flight array Stack btStack = new Stack (); / / backtrack stack public static void main (String args []) (String to and from; Breadth ob = new Breadth (); BufferedReader br = new BufferedReader (new InputStreamReader (System.in)); ob.setup (); try (System.out.print ( "From?"); from br.readLine = () ; System.out.print ( "To?"); to br.readLine = (); ob.isflight (from, to); if (ob.btStack.size ()! = 0) ob.route (to); ) catch (IOException exc) (System.out.println ( "Error on input.");)) / / Initialize the flight database. void setup () (addFlight ( "New York" and "Chicago", 900); addFlight ( "Chicago" and "Denver", 1000); addFlight ( "New York" and "Toronto", 500); addFlight ( "New York", "Denver", 1800); addFlight ( "Toronto", "Calgary" 1700); addFlight ( "Toronto", "Los Angeles", 2500); addFlight ( "Toronto", "Chicago", 500); addFlight ( "Denver", "Urbana," 1000); addFlight ( "Denver," " Houston, "1000); addFlight (" Houston, "" Los Angeles ", 1500); addFlight (" Denver "," Los Angeles ", 1000);) / / Put flights into the database. void addFlight (String from, String to, int dist) (if (numFlights <MAX) (flights [numFlights] = new FlightInfo (from, to, dist); numFlights + +;) else System.out.println ( "Flight database full \ n");) / / Show the route and total distance. void route (String to) (Stack rev = new Stack (); int dist = 0; FlightInfo f; btStack.size int num = () / / Reverse the stack to display route. for (int i = 0; i <num; i + +) rev.push (btStack.pop ()); for (int i = 0; i <num; i + +) (f = (FlightInfo) rev.pop (); System. out.print (f.from + "to"); dist + = f.distance;) System.out.println (to); System.out.println ( "Distance is" + dist);) / * If there is a flight between from and to, and return the distance of flight; otherwise, return 0 * / int match (String from, String to) (for (int i = numFlights-1; i> 1; i -) (if (flights [i]. from.equals (from) & & flights [i]. to.equals (to) & &! flights [i]. skip) (flights [i]. skip = true; / / prevent reuse return flights [ i]. distance;)) return 0; / / not found) / / Given from, find any connection. FlightInfo find (String from) (for (int i = 0; i <numFlights; i + +) (if (flights [i ]. from.equals (from) & &! flights [i]. skip) (FlightInfo f = new FlightInfo (flights [i]. from, flights [i]. to, flights [i]. distance); flights [i] . skip = true; / / prevent reuse return f;)) return null;) / * Determine if there is a route between from and to using breadth-first search * / void isflight (String from, String to) (int dist , dist2; FlightInfo f; / / This stack is needed by the breadth-first search. Stack resetStck = new Stack (); / / See if at destination. dist = match (from, to); if (dist! = 0) (btStack.push (new FlightInfo (from, to, dist)) return;) / * Following is the first part of the breadth-first modification. It checks all connecting flights from a specified node * / while ((f = find (from))! = null) (resetStck.push (f) if ((dist = match (f.to, to))! = 0) (resetStck.push (f.to); btStack.push (new FlightInfo (from, f.to, f.distance)); btStack.push (new FlightInfo (f.to, to, dist)) return;)) / * The following code resets the skip fields set by preceding while loop. This is also part of the breadth-first modifiction * / int i = resetStck.size (); for (; i! = 0; i -) resetSkip ((FlightInfo) resetStck.pop ()) / / Try another connection. f = find (from); if (f! = null) (btStack.push (new FlightInfo (from, to, f.distance)); isflight (f.to, to);) else if (btStack.size ()> 0) (/ / Backtrack and try another connection. f = (FlightInfo) btStack.pop (); isflight (f.from, f.to);)) / / Reset skip field of specified flight. void resetSkip ( FlightInfo f) (for (int i = 0; i <numFlights; i + +) if (flights [i]. from.equals (f.from) & & flights [i]. to.equals (f.to)) flights [i ]. skip = false;)) 

      Running Results: 

      C: \ java> java Breadth 
      From? New York 
      To? Los Angeles 
      New York to Toronto to Los Angeles 
      Distance is 3000 

      C: \ java> 

      It found a reasonable solution, but it does not have general.    Because the first of the path to find information on the physical forms of organization. 

      If the target in the search space is not too deep in hiding, then BFS performance will be very good. 

      </ Td> </ tr> <tr> 

      ↑ Back 

    Google AJAX Search API + = delicious TAG site?

      Abstract: Google AJAX Search API + = delicious TAG site? 

      : 

      Google AJAX Search API + = delicious TAG site? 

      Author: cleverpig 

      Foreword 

      Del.icio.us provides a wide range of reusable data format.    And it provides a common API to PHP and similar output format so that these data can also be JavaScript developers as JSON format will be used. 

      Google AJAX Search API to provide some simple web objects: they implementation of the various Google services (page search, local search, video search, Blog search, news search) on embedded (inline) Search. 

      How these two technologies together?    Google AJAX Search API + = delicious TAG site?    As this paper for 25, the following summary only listed some of the paragraphs, read and download the original source code: 
      Google AJAX Search API + = delicious TAG site. Pdf Java, java, J2SE, j2se, J2EE, j2ee, J2ME, j2me, ejb, ejb3, JBOSS, jboss, spring, hibernate, jdo, struts, webwork, ajax, AJAX, mysql, MySQL, Oracle, Weblogic, Websphere, scjp, scjd 

      Google AJAX Search API + = delicious TAG site? 

      Author: cleverpig 
      ↑ Back 

    Who knows sine function does the simulation algorithm What is the thinking? I search the Internet to such a code, but fail to understand it, who can help explain? Thank you

      Abstract: I would like to ask who knows the sine function simulation algorithm What is the thinking?    I search the Internet to such a code, but fail to understand it, who can help explain?    Thank you 


      Help you look at the Triangle and simulation algorithm Thank you elaborate this algorithm thinking, ah, I can not read. 

      In the game often used trigonometric function value, but because J2me does not support floating-point, so its value is usually after amplification simulations, the following are my algorithm: 
      / * Arbitrary angle of the sine value (10,000 times) * / 
      Public long sin (int x, int path) 
      ( 
      If (path == 0) / / series algorithm 
      ( 
      Int goal = 0; 
      Goal = (10 * x) / 6 - (10 * x * x * x) / (36 * 36); 
      If (x <= 60) 
      Return goal; 
      Else if (x <= 70) 
      Return goal + x * x * x * x/155520; 
      Else if (x <= 80) 
      Return goal + x * x * x * x/116640; 
      Else 
      Return goal + x * x * x * x/103680; 
      ) 
      Else / / 1.30 Simulation Algorithm 
      ( 
      If (x == 0) 
      Return 0; 
      Else 
      ( 
      Int goal = 175; / / Why is the initial 175?    ?    ? 
      For (int i = 0; i    ( 
      Goal = (goal * 9998 + sqrt (100000000-goal goal *) * 175) / 10000; / / completely do not understand this line 
      ) 
      Return goal; 
      ) 
      ) 




      Asked questions give points ah.    .    I know that as a bit more for.    .    I gave you the number as long as the number who help me to answer this question.    .    Thank you 



      Research, lazy have in the past, said that with the sine table 



      Research, lazy have in the past, said that with the sine table 
    ==========================
      Table solution is built, up to 



      Sin (1) = 0.017452406437283512819418978516316 
      * 10000 = 175 
      This is the sin (x) and sin (nx) to use this relationship to the high number of inside Fourier series, Taine Expansion 




      How quickly and accurately for sin function? 
      Http://community.csdn.net/Expert/topic/5020/5020499.xml?temp=5.459231E-02 

      ————————————————– – 
      However, if you are seeking decimal integer degree rather than the degree of it (such as si (45) rather than for sin (45.5)), personal suggest you use look-up table ~ ~ 



      The landlord, in the use of J2ME sine function, I suggest you use MathFP development libraries, and support MIDP1.0, and was integral to the post-12 decimal place, I used it developed game 



      Http://mywebpages.comcast.net/ohommes/MathFP/index.html 



      I have this problem solved Thank you 


      ↑ Back 

    Custom search engine interface (cookie) examples

      Abstract: customized search engine interface (cookie) examples 

      <tr> <td> 

      Below is a search engine interface for example, by modifying the front of HTTP status code by example.    In this Servlet, the user interface is dynamically generated rather than the static HTML files provided.    Servlet addition to the reading of the form data and send them to search engines, but also to contain the Cookie form data sent to the client.    After the visit, the same form again, the value of these Cookie will be used to pre-filled form, the form automatically display recently used data. 

    SearchEnginesFrontEnd.java

      The Servlet structure constitutes a major form from the user interface.    Showing the first time when it and in front of static HTML pages provided by the interface almost.    However, users select a value will be saved to Cookie (This page will be sent to CustomizedSearchEngines Servlet data, the latter set up by Cookie).    After the user to visit the same page, even if the browser is activated after withdrawal, will be automatically filled in the form, a search on the content of the fill. 

      Attention to the use of the Servlet ServletUtilities.java, getCookieValue have already introduced, for generating HTML pages headWithTitle part.    In addition, this also has been used in the preceding note LongLiveCookie category, we use it to create a void for a long period of Cookie. 
      Package hall; 

      Import java.io. *; 
      Import javax.servlet .*; 
      Import javax.servlet.http .*; 
      Import java.net .*; 

      Public class SearchEnginesFrontEnd extends HttpServlet ( 
      Public void doGet (HttpServletRequest request, 
      HttpServletResponse response) 
      Throws ServletException, IOException ( 
      Cookie [] = cookies request.getCookies (); 
      String searchString = 
      ServletUtilities.getCookieValue (cookies, 
      "SearchString" 
      "Java Programming"); 
      String numResults = 
      ServletUtilities.getCookieValue (cookies, 
      "NumResults" 
    "10");
      String searchEngine = 
      ServletUtilities.getCookieValue (cookies, 
      "SearchEngine" 
      "Google"); 
      Response.setContentType ( "text / html"); 
      PrintWriter out = response.getWriter (); 
      String title = "Searching the Web"; 
      Out.println (ServletUtilities.headWithTitle (title) + 
      "<BODY BGCOLOR=\"#FDF5E6\"> \ n" + 
      "<H1 ALIGN=\"CENTER\"> Searching the Web </ H1> \ n" + 
      "\ N" + 
      "<FORM ACTION=\"/servlet/hall.CustomizedSearchEngines\"> \ n" + 
      "<CENTER> \ N" + 
      "Search String: \ n" + 
      "<INPUT TYPE = \" TEXT \ "NAME = \" searchString \ "\ n" + 
      "VALUE = \" "+ searchString +" \ "> <BR> \ n" + 
      "Results to Show Per Page: \ n" + 
      "<INPUT TYPE = \" TEXT \ "NAME = \" numResults \ "\ n" + 
      "VALUE =" + + numResults "SIZE = 3> <BR> \ n" + 
      "<INPUT TYPE = \" RADIO \ "NAME = \" searchEngine \ "\ n" + 
      "VALUE = \" google \ "" + 
      Checked ( "google" searchEngine) + "> \ n" + 
      "Google | \ n" + 
      "<INPUT TYPE = \" RADIO \ "NAME = \" searchEngine \ "\ n" + 
      "VALUE = \" infoseek \ "" + 
      Checked ( "infoseek" searchEngine) + "> \ n" + 
      "Infoseek | \ n" + 
      "<INPUT TYPE = \" RADIO \ "NAME = \" searchEngine \ "\ n" + 
      "VALUE = \" lycos \ "" + 
      Checked ( "lycos" searchEngine) + "> \ n" + 
      "Lycos | \ n" + 
      "<INPUT TYPE = \" RADIO \ "NAME = \" searchEngine \ "\ n" + 
      "VALUE = \" hotbot \ "" + 
      Checked ( "hotbot" searchEngine) + "> \ n" + 
      "HotBot \ n" + 
      "<BR> \ N" + 
      "<INPUT TYPE=\"SUBMIT\" VALUE=\"Search\"> \ n" + 
      "</ CENTER> \ n" + 
      "</ FORM> \ n" + 
      "\ N" + 
      "</ BODY> \ n" + 
      "</ HTML> \ n"); 
      ) 

      Private String checked (String name1, String name2) ( 
      If (name1.equals (name2)) 
      Return ( "CHECKED"); 
      Else 
      Return (""); 
      ) 
      ) 

    CustomizedSearchEngines.java

      In front of SearchEnginesFrontEnd Servlet sends the data to the CustomizedSearchEngines Servlet.    In many of the cases described above with HTTP status code examples similar, the difference being, in this case in addition to constructing a search engine to the URL redirect users to send a response, the preservation of user data sent to the Cookies. 
      Package hall; 

      Import java.io. *; 
      Import javax.servlet .*; 
      Import javax.servlet.http .*; 
      Import java.net .*; 

      Public class CustomizedSearchEngines extends HttpServlet ( 
      Public void doGet (HttpServletRequest request, 
      HttpServletResponse response) 
      Throws ServletException, IOException ( 

      String searchString = request.getParameter ( "searchString"); 
      Cookie searchStringCookie = 
      New LongLivedCookie ( "searchString" searchString); 
      Response.addCookie (searchStringCookie); 
      SearchString = URLEncoder.encode (searchString); 
      String numResults = request.getParameter ( "numResults"); 
      Cookie numResultsCookie = 
      New LongLivedCookie ( "numResults" numResults); 
      Response.addCookie (numResultsCookie); 
      String searchEngine = request.getParameter ( "searchEngine"); 
      Cookie searchEngineCookie = 
      New LongLivedCookie ( "searchEngine" searchEngine); 
      Response.addCookie (searchEngineCookie); 
      SearchSpec commonSpecs [] = SearchSpec.getCommonSpecs (); 
      For (int i = 0; i <commonSpecs.length; i + +) ( 
      SearchSpec searchSpec = commonSpecs [i]; 
      If (searchSpec.getName (). Equals (searchEngine)) ( 
      String url = 
      SearchSpec.makeURL (searchString, numResults); 
      Response.sendRedirect (url); 
      Return; 
      ) 
      ) 
      Response.sendError (response.SC_NOT_FOUND, 
      "No recognized search engine specified."); 
      ) 

      Public void doPost (HttpServletRequest request, 
      HttpServletResponse response) 
      Throws ServletException, IOException ( 
      DoGet (request, response); 
      ) 
      ) 

      </ Td> </ tr> </ table> 
      ↑ Back 

    High in web search, do not know there is no such package type, can be generated automatically arbitrary form of arbitrary parameters and combine the database table sql statement

      Abstract: In the web advanced search, do not know there is no such package type, can be generated automatically arbitrary form of arbitrary parameters and combine the database table sql statement 


      High in web search, do not know there is no such package type, can be generated automatically arbitrary form of arbitrary parameters and combine the database table sql statement. 

      In other words, we do not know in advance the form-from the number of the parameters of what is.    But any event, as long as the rule-based (like interface prototype), I pass the parameters of this package, it can generate comprehensive sql statement. 

      I want to is the common type, I hope that master spirit, Thank you!    !    ! 

      Add to resolve the 70-knot paste, the small, sorry! 



      Dynamic forms?    I have not used ah!    Bangding 



      If there are to blame, not to mention a computer, you can also complete the task parameters ah do not know what the number is, how assembled into SQL? 
      If the written LZ share ah, learning study 



      Are trying to … do not know whether anyone tried, was not feasible? 



      GM's bad writing, tried, but in the end did not write or generic 



      If taken to the generality of general statements like 1,10 


      ↑ Back 

    The problem with search engines could not find out the answer (actually very simple)

      Abstract: The problem with this search engine could not find the answers (in fact, very simple) 


      Will the next .. 
      For (String key: bikes.keySet ()) 

      Inside this: What does it mean ah symbol 

      Use search engines do not know how I found the “ 

      Xian XIE “ 



      Traversing. 
      Bikes.keySet () should return a string array, it is difficult after traversing it with key 



      Collection-based for cycle 


      ↑ Back 

    Based on the search site webwork do, we help test the performance, more有分

      Abstract: Based on the webwork do search site, we help test the performance, more有分 


      Address: 
      Www.wendawang.com 
      Webwork do is based on small sites, we give points. 
      Leave your city who can score. 



      Sofa 



      Sofa What does that mean? 



      Beijing, search speed is quite slow, as "Baidu know" fast 



      Hainan can also 



      The landlord does not desire, and looting to the bench!    ! 
      Beijing, have opened Home Giant slow! 



      Beijing. 
      Functional Yes, a simple interface points.    Search to the little things. 

      Finally, some praise!    Still very admirable. 



      Iwlk (6th century): Oh, the date can be compared with Baidu, when veterans will you please!    !    This is only to pursue play, but to experiment with. 



      Yes Yes 




      Chengdu, opened with a 10 seconds 



      Guangzhou 



      Sz 
      Lr not test yourself 



      Guangzhou site is quite slow 



      Wuhan Telecom can also not very good-looking pages, however, to speed 



      Up 



      Will the open-source can ah 



      Open Haomane 



      Small section of the Web site: 

      Xie LZ赏脸: www.ruansou.com 



      Up 



      It can also speed! Huh 



      Support this, the Karamay 



      Support this! 



      Dalian, can also 



      Fuzhou.    Slow the point 



      Changchun, a general interface, function very comprehensive 




      Shenzhen, good speed! 



      Home is quite slow, Beijing.    Is a iask. 



      Ultrafast, Zhuhai ADSL 



      Chongqing, open extremely fast, the general interface. 

      For enquiries, question, search, etc.: 
      Not show the page you want to view the current page is not available.    Web site may encounter technical problems, or need to adjust your browser settings. 





      Beijing also opened speed 



      Zhengzhou opening 13 seconds 

      Time is 20:46 pm 



      The landlord to do this how long ah?    Niu people ah! 



      Beifangwang-! 
      ADSL somewhat slow speed! 
      Registered one can! 



      Carbaryl based network for Home Contact Us About Us 



      A Question and Answer for Home Contact Us About Us 


      This is a deliberate attempt to make?    Miscellaneous inconsistencies ah?    ?    ? 






      Zhuzhou, the top you 



      Harbin, the speed can be 



      Zibo 

      Speed is quite slow! 



      Changsha 2 M ADSL speed is quite slow to open, search can also interface clipart no effort Kazakhstan 



      Changsha 



      Nanjing.    Fortunately speed.    However search results…… I found the ask.com. 



    JiNan.
      Bu cuo. 



      Xi'an, better speed. 



      Henan, speed 



      Dalian fast 



      What to do? 



      Shenzhen, what development tools? 



      Shenzhen, good speed. 
      What is the development? 



      Guangzhou Telecom Express.    . 



      Yes ah!    To continue to improve.    Tianjinren.    Oh! 



      Will be open source, and because the function, there are other aspects of it is not very perfect, and so perfect point will definitely open source.    This is the direction of development, are now worried about open source, the level of bad because we fear becoming the laughing stock of others.    - JAVA technology completed.    Development time is 2.5 months / 1. 



      On the speed performance, the best statement under Netcom or telecommunications or other, as some Interconnection will be very slow. 



      Tangshan, that can be … very fast learning ah … .. 



      Chengdu, the general rate, as well! 



      Chengdu, the general rate, as well!    Telecom 



      Tangshan, that can also, very fast … ah … ..- forget learning to write, Netcom 



      Suzhou, China Netcom, very fast speed 



      Wuxi, telecommunications, and very fast ~ 



      Slow point 



      I would like to improve after open source, we have the idea of what open source development? 



      Beijing, and will also speed 



      Harbin, the speed will open, 5 seconds but too little content 



      In Chengdu fast, time-consuming: 0.032 seconds 




      Shanghai Telecom, slow 



      Beijing, speed very fast ah.    Yes! 



      Beijing opened a bit slow 



      Beijing Netcom very slow ~ 



      Suzhou 

      A bit slow 



      Urumqi support 



      Huizhou, good speed 



      Shenzhen, good speed! 




      It has been said that how fast that there are slow!    In the end is how matter? 



      Guiyang also good four seconds 



      Is the full text search?    Segmentation algorithm nor night, needs to be raised! 

      Slow death (Beijing) 



      To optimize it.    Beijing.    Habitat slow.    Faster than network abroad. 



      Today seems a slightly faster 



      Slower Jiangsu 



      Jiangsu 




      Jiangsu 



      Thank you mention the views!    Unexpectedly Laileyanmache people, I would like to paste points, but how can we increase? 




      The festival. 




      Nanjing general speed 


      ↑ Back 

    Please see me doing movies with Lucene search engine

      Abstract: Please see me doing movies with Lucene search engine 


      Advertising is not posted, and we mainly want to discuss technical. 
      Address http://search.mdbchina.com 

      Core Lucene 2.0, Chinese word segmentation is my own do, segmentation algorithm is my own unique, phonetics search, with Traditional Chinese search, correct typos, search recommendations, and related search function together with related search keywords . 

      I am pursuing the word about some major categories 
      ChineseAnalyzer: No Lucene file, um, I was out of the heap 
      ChineseTokenizer: No Lucene file, um, I whole-word - 
      ChineseTokenizerConstants: an easily seen 
      ChineseTokenizerTokenManager: StandardTokenizerTokenManager "patch" 
      ChineseSimplificationFilter: Traditional filters to Simplified 

      I did not use the accepted mode, namely: Chinese word segmentation ->****** Analyzer, I chose a more bottom, innovative my own ChineseAnalyzer please Senator trial. 



      Up 



      Doing a good job in very fast speed 



      TU Yes, some Bangding 



      Very good! 



      Yes, but from a purely business perspective, it seems that there is no need to search phonetics than add years, actors, directors, film, the type of options 



      Pinyin search is also very important actor mouthful very common name, this time on the importation of phonetics that he can position 



      Years, actors, directors, films, these types have been included in the search, the search engine will automatically determine if input on the 2006 list of the films released in 2006, if the input beam master actor on the list of films, if input action films on the list all action films, directors, distributors are similar 



      Yes ah Bangding boost 



      Http://jf.jf.cn 



     å¥½æƒ³can read about the landlord CODE! 



      Ting strong! 




      ChineseSimplificationFilter: Traditional filters to Simplified 

      LZ ask, how to judge character is "Simplified" or "traditional"?? 


    —————–
      Www.ruansou.com small section to search engine 



      A dictionary, it probably more than 2,000 words 



      , And to encourage 



      Liuguangshui@163.com 

      Thank you for giving me a pull! 


      ↑ Back 

    keep looking »