java »ñµÃ ip µØÖ·
Ò»°ãÇé¿ö»ñµÃ±¾µØËùÓеÄipµØÖ·£º
try {
InetAddress address = InetAddress.getLocalHost();
System.out.println(address.getHostAddress());
String name = address.getHostName();
System.out.println(name);
InetAddress[] addresses = InetAddress.getAllByName(name);
for(int i=0;i <addresses.length;i++)
System.out.println(addresses[i].getHostAddress());
}
catch(UnknownHostException uhe) {
System.err.println( "Unable to find IP ");
}
}
try {
InetAddress address = InetAddress.getLocalHost();
System.out.println(address.getHostAddress());
String name = address.getHostName();
System.out.println(name);
InetAddress[] addresses = InetAddress.getAllByName(name);
for(int i=0;i <addresses.length;i++)
System.out.println(addresses[i].getHostAddress());
}
catch(UnknownHostException uhe) {
System.err.println( "Unable to find IP ");
}
}
µ«ÊÇÒÔÉÏ·½·¨ÔÚlinuxÏÂÊDz»Ðеģ¬
Ïà¹ØÎĵµ£º
ÓÐʱºò£¬ÀàµÄͬһÖÖ¹¦ÄÜÓжàÖÖʵÏÖ·½Ê½£¬µ½µ×²ÉÓÃÄÇÖÖʵÏÖ·½Ê½£¬È¡¾öÓÚµ÷ÓÃÕß
¸ø¶¨µÄ²ÎÊý¡£ÀýÈçÔÓ¼¼Ê¦ÄÜѵÁ·¶¯Î¶ÔÓÚ²»Í¬µÄ¶¯ÎïÓв»Í¬µÄѵÁ··½Ê½¡£
public void train
(Dog dog){
//
ѵÁ·Ð¡¹·Õ¾Á¢£¬ÅŶӣ¬×öËã ......
public void sort(int[] array) {
for(int i=0; i<array.length; i++) {
boolean flag = true;
for(int j=0; j<array.length-i-1; j++) {
if(array[j]>array[j+1]) {
int tmp = ar ......
Ò»¡¢PO:
persistant object
³Ö¾Ã¶ÔÏó,¿ÉÒÔ¿´³ÉÊÇÓëÊý¾Ý¿âÖеıíÏàÓ³ÉäµÄjava¶ÔÏó¡£×î¼òµ¥µÄPO¾ÍÊǶÔÓ¦Êý¾Ý¿âÖÐij¸ö±íÖеÄÒ»Ìõ¼Ç¼£¬¶à¸ö¼Ç¼¿ÉÒÔÓÃPOµÄ¼¯ºÏ¡£POÖÐÓ¦¸Ã²»°ü
º¬ÈκζÔÊý¾Ý¿âµÄ²Ù×÷¡£
¶þ¡¢VO
:value
objectÖµ¶ÔÏó¡£Í¨³£ÓÃÓÚÒµÎñ²ãÖ®¼äµÄÊý¾Ý´«µÝ£¬ºÍPOÒ»ÑùÒ²Êǽö½ö°üº¬Êý¾ ......
JXL.JAR ²Ù×÷ExcelÎļþ¿ªÔ´°ü
ÕâÀï¼òµ¥½²Ð©ÏîÄ¿ÖÐÓõ½µÄһЩ·½·¨£¡£¨ÏîÄ¿µÄ»·¾³ÊÇStruts2 hibernate3 resin3 £©
// ExcelÎļþ´æ·Å·¾¶
String path = ServletActionContext.getServletContext().getRealPath("")+"userfiles\\train_excel\\text.xls";
// Éú³ÉExcelÎļþ
WritableWorkbook wwb = Workbook.creat ......
InputStream stream;
Properties prop = new Properties();// ÊôÐÔ¼¯ºÏ¶ÔÏó
stream = getClass().getResourceAsStream("NcJdbc.properties");
prop.load(stream);
stream.close();// ¹Ø±ÕÁ÷
String databaseName=prop.getProperty("jdbc.databaseName");
InputStream stream;
Properties prop = new Properties(); ......