http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
I was rather depressed over a year ago when Google deprecated their SOAP Search API with their AJAX Search API. Essentially Google was saying that they didn want anyone programmatically accessing Google search results unless they were going to be presenting the results unaltered in a rectangular portion of a website. This was particularly troubling to me because, like many academics, I have relied on the API to do automated queries, especially for Warrick.
A few months ago I got a little excited when Google opened their AJAX API to non-JavaScript environments. Google is now allowing queries using a REST-based interface that returns search results using JSON. The purpose of this API is still to show unaltered results to your website is user, but I don see anything in the Terms of Use that prevent the API being used in an automated fashion (having a program regularly execute queries), especially f ......
http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
I was rather depressed over a year ago when Google deprecated their SOAP Search API with their AJAX Search API. Essentially Google was saying that they didn want anyone programmatically accessing Google search results unless they were going to be presenting the results unaltered in a rectangular portion of a website. This was particularly troubling to me because, like many academics, I have relied on the API to do automated queries, especially for Warrick.
A few months ago I got a little excited when Google opened their AJAX API to non-JavaScript environments. Google is now allowing queries using a REST-based interface that returns search results using JSON. The purpose of this API is still to show unaltered results to your website is user, but I don see anything in the Terms of Use that prevent the API being used in an automated fashion (having a program regularly execute queries), especially f ......
1. StrutsÌåϵ½á¹¹ÊµÏÖÁËMVCÉè¼ÆÄ£Ê½µÄ¸ÅÄÄÇôËü½«ÒÔÏÂÑ¡ÏîÖиø³öµÄʲô·Ö±ðÓ³ÉäΪwebÓ¦ÓÃÖеÄ×é¼þ£¿£¨ £©
A View
B Model
C ActionServlet
D Action
E ActionMapping
F Controller
²Î¿¼´ð°¸£ºABF
2. ÔÚStrutsÌåϵ½á¹¹ÖУ¬ÒÔÏÂÄĸöÓÉ´ú±íϵͳ״̬ºÍÉÌÒµÂß¼µÄActionÀ´¹¹½¨£¿£¨ £©
A View
B Model
C Action
D Controller
²Î¿¼´ð°¸£ºB
3. ÔÚStrutsÖУ¬ÒÔÏÂÑ¡ÏîÄÄÒ»¸öÊǸºÔðStrutsÌåϵÖеÄÁ÷³Ì¿ØÖÆ£¿£¨ £©
A Controller
B Model
C ActionServlet
D Action
²Î¿¼´ð°¸£ºC
4. ActionServletÓÉʲôÀ´ÊµÏÖ£¿£¨ £©
A View
B Model
C ActionMapping
D Controller
²Î¿¼´ð°¸£ºCD
5. ÔÚStruts¿ò¼ÜÖÐActionForm¶ÔÏóµÄÖ÷Òª×÷ÓÃÊÇʲô£¿£¨£©
A ·â×°¶ÔÏó
B Á÷³Ì¿ØÖÆ
C ¹¹½¨ÒµÎñÂß¼
D ·µ»Ø½á¹û
²Î¿¼´ð°¸£ºA
6. ÔÚ¸ºÔðÏÔʾµÄJSPÒ³ÃæÎÒÃÇÐèÒªÔÚaction±êÇ©ÖУ¬ÎÒÃÇÐèÒªÌí¼Ó<action ______ input=”/login.jsp”>£¬ÔÚºáÏß´¦ÌíʲôÊôÐÔÀ´¸ºÔðÑéÖ¤£¿
A validate()
......
ÔÚÎļþÀïÔö¼ÓÒ»ÐеÄΨһ·½·¨¾ÍÊǶÁÈ¡ÔʼÎļþ£¬È»ºóдÈëµ½Ò»¸öÁÙʱÎļþ£¬Í¬Ê±Ð´ÈëÒª²åÈëµÄÊý¾Ý¡£È»ºóɾ³ýÔʼÎļþ£¬ÔÙ°ÑÁÙʱÎļþ¸ÄÃûΪÔʼÎļþÃû¡£
package net.java2000.io;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class FileInsertRow {
public static void main(String args[]) {
try {
FileInsertRow j = new FileInsertRow();
j.insertStringInFile(new File(args[0]), Integer.parseInt(args[1]), args[2]);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* ÔÚÎļþÀïÃæµÄÖ¸¶¨ÐвåÈëÒ»ÐÐÊý¾Ý
*
......
Ò»¡¢Spring»ù´¡ÖªÊ¶¼°IOC_Ñ¡ÔñÌâ
1. ÏÂÃæ¹ØÓÚspringÃèÊö´íÎóµÄÊÇ£º£¨ £©
A SpringÖ§³Ö¿É²åÈëµÄÊÂÎñ¹ÜÀíÆ÷£¬Ê¹ÊÂÎñ»®·Ö¸üÇáËÉ£¬Í¬Ê±ÎÞÐè´¦Àíµ×²ãµÄÎÊÌâ¡£
B SpringÊÂÎñ¹ÜÀíµÄͨÓóéÏó²ã»¹°üÀ¨JTA²ßÂÔºÍÒ»¸öJDBC DataSource¡£
C ÓëJTA»òEJB CMTÒ»Ñù£¬SpringµÄÊÂÎñÖ§³ÖÒÀÀµÓÚJava EE»·¾³¡£
D SpringÊÂÎñÓïÒåͨ¹ýAOPÓ¦ÓÃÓÚ POJO£¬Í¨¹ýXML»òJava SE 5×¢ÊͽøÐÐÅäÖá£
²Î¿¼´ð°¸£ºC
2. ÏÂÃæÑ¡ÏîÄĸö²»ÊÇSpringÖнӿÚ×¢ÈëµÄ·½Ê½£¿£¨ £©
A ½Ó¿Ú×¢Èë¡¡¡¡
B ¹¹Ôì×Ó×¢Èë¡¡¡¡
C ÉèÖµ×¢Èë¡¡¡¡
D Ö¸Õë×¢Èë
²Î¿¼´ð°¸£ºD
3. ÏÂÁйØÓÚSpringÌØÐÔÖÐIoCÃèÊö´íÎóµÄÊÇ£º£¨£©
A IoC¾ÍÊÇÖ¸³ÌÐòÖ®¼äµÄ¹ØÏµÓɳÌÐò´úÂëÖ±½Ó²Ù¿Ø¡£
B Ëùν“¿ØÖÆ·´×ª”,ÊÇÖ¸¿ØÖÆÈ¨ÓÉÓ¦ÓôúÂëתµ½ÍⲿÈÝÆ÷£¬¿ØÖÆÈ¨µÄ×ªÒÆ£¬
C IoC½«¿ØÖÆ´´½¨µÄÖ°Ôð°á½øÁË¿ò¼ÜÖУ»²¢°ÑËü´ÓÓ¦ÓôúÂëÍÑÀ뿪À´
D µ±Ê¹ÓÃSpringµÄIoCÈÝÆ÷ʱֻÐèÖ¸³ö×é¼þÐèÒªµÄ¶ÔÏó£¬ÔÚÔËÐÐʱSpringµÄIoCÈÝÆ÷»á¸ù¾ÝXMLÅäÖÃÊý¾ÝÌṩ¸øËü¡£
²Î¿¼´ð°¸£ºA
¶þ¡¢Spring»ù´¡ÖªÊ¶¼°IOC_¼ò´ðÌâ
1. Çë¼òÊöSpringµÄ¹¤×÷»úÖÆ£¿
²Î¿¼´ð°¸£ºSpringµÄ¹¤×÷»úÖÆ¿É´ÓÒ ......
Ò»¡¢Spring»ù´¡ÖªÊ¶¼°IOC_Ñ¡ÔñÌâ
1. ÏÂÃæ¹ØÓÚspringÃèÊö´íÎóµÄÊÇ£º£¨ £©
A SpringÖ§³Ö¿É²åÈëµÄÊÂÎñ¹ÜÀíÆ÷£¬Ê¹ÊÂÎñ»®·Ö¸üÇáËÉ£¬Í¬Ê±ÎÞÐè´¦Àíµ×²ãµÄÎÊÌâ¡£
B SpringÊÂÎñ¹ÜÀíµÄͨÓóéÏó²ã»¹°üÀ¨JTA²ßÂÔºÍÒ»¸öJDBC DataSource¡£
C ÓëJTA»òEJB CMTÒ»Ñù£¬SpringµÄÊÂÎñÖ§³ÖÒÀÀµÓÚJava EE»·¾³¡£
D SpringÊÂÎñÓïÒåͨ¹ýAOPÓ¦ÓÃÓÚ POJO£¬Í¨¹ýXML»òJava SE 5×¢ÊͽøÐÐÅäÖá£
²Î¿¼´ð°¸£ºC
2. ÏÂÃæÑ¡ÏîÄĸö²»ÊÇSpringÖнӿÚ×¢ÈëµÄ·½Ê½£¿£¨ £©
A ½Ó¿Ú×¢Èë¡¡¡¡
B ¹¹Ôì×Ó×¢Èë¡¡¡¡
C ÉèÖµ×¢Èë¡¡¡¡
D Ö¸Õë×¢Èë
²Î¿¼´ð°¸£ºD
3. ÏÂÁйØÓÚSpringÌØÐÔÖÐIoCÃèÊö´íÎóµÄÊÇ£º£¨£©
A IoC¾ÍÊÇÖ¸³ÌÐòÖ®¼äµÄ¹ØÏµÓɳÌÐò´úÂëÖ±½Ó²Ù¿Ø¡£
B Ëùν“¿ØÖÆ·´×ª”,ÊÇÖ¸¿ØÖÆÈ¨ÓÉÓ¦ÓôúÂëתµ½ÍⲿÈÝÆ÷£¬¿ØÖÆÈ¨µÄ×ªÒÆ£¬
C IoC½«¿ØÖÆ´´½¨µÄÖ°Ôð°á½øÁË¿ò¼ÜÖУ»²¢°ÑËü´ÓÓ¦ÓôúÂëÍÑÀ뿪À´
D µ±Ê¹ÓÃSpringµÄIoCÈÝÆ÷ʱֻÐèÖ¸³ö×é¼þÐèÒªµÄ¶ÔÏó£¬ÔÚÔËÐÐʱSpringµÄIoCÈÝÆ÷»á¸ù¾ÝXMLÅäÖÃÊý¾ÝÌṩ¸øËü¡£
²Î¿¼´ð°¸£ºA
¶þ¡¢Spring»ù´¡ÖªÊ¶¼°IOC_¼ò´ðÌâ
1. Çë¼òÊöSpringµÄ¹¤×÷»úÖÆ£¿
²Î¿¼´ð°¸£ºSpringµÄ¹¤×÷»úÖÆ¿É´ÓÒ ......
¶¨ÒåÔÚÒ»¸öÀàÄÚ²¿µÄÀà½ÐÄÚ²¿À࣬°üº¬ÄÚ²¿ÀàµÄÀà³ÆÎªÍⲿÀà¡£ÄÚ²¿Àà¿ÉÒÔÉùÃ÷public¡¢protected¡¢privateµÈ·ÃÎÊÏÞÖÆ£¬¿ÉÒÔÉùÃ÷ΪabstractµÄ¹©ÆäËûÄÚ²¿Àà»òÍⲿÀà¼Ì³ÐÓëÀ©Õ¹£¬»òÕßÉùÃ÷Ϊstatic¡¢finalµÄ£¬Ò²¿ÉÒÔʵÏÖÌØ¶¨µÄ½Ó¿Ú¡£staticµÄÄÚ²¿ÀàÐÐΪÉÏÏóÒ»¸ö¶ÀÁ¢µÄÀ࣬·ÇstaticÔÚÐÐΪÉÏÀàËÆÀàµÄÊôÐÔ»ò·½·¨ÇÒ½ûÖ¹ÉùÃ÷staticµÄ·½·¨¡£ÄÚ²¿Àà¿ÉÒÔ·ÃÎÊÍⲿÀàµÄËùÓз½·¨ÓëÊôÐÔ£¬µ«staticµÄÄÚ²¿ÀàÖ»ÄÜ·ÃÎÊÍⲿÀàµÄ¾²Ì¬ÊôÐÔÓë·½·¨¡£
ÍⲿÀà°´³£¹æµÄÀà·ÃÎÊ·½Ê½Ê¹ÓÃÄÚ²¿À࣬ΨһµÄ²î±ðÊÇÍⲿÀà¿ÉÒÔ·ÃÎÊÄÚ²¿ÀàµÄËùÓз½·¨ÓëÊôÐÔ£¬°üÀ¨Ë½Óз½·¨ÓëÊôÐÔ¡£È磺
pinner p = new pinner();
p.index = 20;
p.Print();
---- ÕâÖÖ·½Ê½ÊʺÏÍⲿÀàµÄ·Çstatic·½·¨£»
pouter po = new pouter();
pinner pi = po.new pinner();
pi.index = 40;
  ......