JAVA BOT³ÌÐòÄ£ÄâÈËÀàÓû§Ìîд±íµ¥ ²¢ ·¢ËÍ
·ÂÕæ±íµ¥£ºBOT³ÌÐòÄ£ÄâÈËÀàÓû§Ìîд±íµ¥ ²¢ ·¢ËÍ
ץȡ±íµ¥£º
HTTPSocket http = new HTTPSocket();
SocketFactory.setProxyHost("openproxy.huawei.com");
SocketFactory.setProxyPort(8080);
HTMLPage page = new HTMLPage(http);
page.open("http://passport.csdn.net/UserLogin.aspx", null);
Vector vec = page.getForms();
HTMLForm htmlForm = (HTMLForm)vec.elementAt(0);
System.out.println("=======action=======");
System.out.println(htmlForm.getAction());
System.out.println("=======method=======");
System.out.println(htmlForm.getMethod());
System.out.println("=======name=======");
System.out.println(htmlForm.getName());
System.out.println("=======value=======");
System.out.println(htmlForm.getValue());
System.out.println("=======toString=======");
System.out.println(htmlForm.toString());
¹¹Ôì·ÂÕæ±íµ¥²¢·¢ËÍ(ÿ¸öÍøÒ³±íµ¥ÐèÒªµÄÔªËز»Ò»Ñù£¬ÏÂÃæ¼ÙÈç¸ÃÒ³ÃæÐèÒªÓû§Ãû£¬ÃÜÂëºÍÓÊÏä)
/**
*htmlForm.set() Ϊ¹¹Ôì³ÌÐò×Ô¶¯·¢ËÍWEBÄ£Äâ±íµ¥Ìá½»µÄÊý¾Ý,Èç: username=apple&password=123&email=apple@123.com
*/
htmlForm.set("username","apple");
htmlForm.set("password","123");
htmlForm.set("email","apple@123.com");
page.post(htmlForm);
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
package thread;
class QQ{
private String name;
private String sex;
boolean flag=false;
public synchronized void put(String name,String sex){
if(flag)
try {
wait();
} catch (InterruptedException e ......
ÏÂÃæÊÇʹÓÃjavaʵÏֵĵݹéÄæÐò¶Ô²éÕÒ£¬ËùνµÄÄæÐò¶Ô¾ÍÊÇÔÚÊý×éA[]ÖÐÈç¹û i < j ,²¢ÇÒA[i] > A[j], ÔòÎÒÃÇ˵A[i]ºÍA[j]ÊÇÒ»¶ÔÄæÐò¶Ô¡£Èç¹ûÓÃÆÕͨµÄË㷨ʵÏֵĻ°£¬²éÕÒµÄʱ¼ä¸´ÔӶȣ¬ÊÇO(N*N)£¬Ê¹ÓÃÕâÀïµÄ¶Ó¹æµÄ·½Ê½²éÕҵĻ°£¬Ê±¼ä¸´ÔÓ¶ÈÊÇO(N*lgN)
import java.util.Date;
import java.util.Random;
/*
* ʹÓõݹ ......
inner classºÍouter classÖ®¼äµÄreflectionÓ¦Óá£
package com.gaoqian.reflection;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
class IncludeInn ......
JavaÁ¬½ÓÊý¾Ý¿âµÄ·½·¨
×¢£º×ªÓÚhttp://www.newasp.net/tech/java/15826.html
JAVAÁ¬½ÓÊý¾Ý¿âÖ÷ÒªÓÐÁ½ÖÖ·½Ê½:
Ò»ÊÇÓÃJDBC-ODBCÇÅÀ´Á¬½Ó
¶þÊÇÓÃÏà¹Ø³§ÉÌÌṩµÄÏàÓ¦Çý¶¯³ÌÐòÀ´Á¬½Ó
ÓÃJDBC-ODBCÇÅÀ´Á¬½Ó
JDBC-ODBCÇŽÓÆ÷ÊÇÓÃJdbcOdbc.ClassºÍÒ»¸öÓÃÓÚ·ÃÎÊODBCÇý¶¯³ÌÐòµÄ±¾µØ¿âʵÏֵġ£¶ÔÓÚWINDOWSƽ̨£¬¸Ã±¾µØ¿âÊÇÒ»¸ö¶¯ ......