¶þ²æÊ÷ (Binary Tree) µÄ»ù±¾²Ù×÷ (Java)
package algorithm.binarytree;
import java.util.Arrays;
import java.util.Stack;
import util.ArrayUtil;
import util.OutputUtil;
public class BinTree {
private BinNode root = null;
public BinTree()
{
}
public BinTree(int data[])
{
if(data == null || data.length == 0)
{
root = null;
return;
}
root = buildInOrder(data, 0, data.length - 1);
}
private BinNode buildInOrder(int data[], int start, int end)
{
if(start > end)
{
return null;
}
int mid = (start + end) >> 1;
BinNode lc = buildInOrder(data, start, mid - 1);
BinNode rc = buildInOrder(data, mid + 1, end);
return new BinNode(data[mid], lc, rc);
}
public BinNode getRoot() {
return root;
}
public void setRoot(BinNode root) {
this.root = root;
}
public void insert(BinNode parent, int value, boolean isLeft)
{
if(parent == null)
{
roo
Ïà¹ØÎĵµ£º
Tomcat ϵĶ¨Ê±ÈÎÎñ
SysContextListener.java
package axtic.servlet;
import java.util.Timer;//¶¨Ê±Æ÷Àà
import axtic.bean.exportHistoryBean;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
public class SysContextListener implements ServletContextListener
......
ÕâÊÇÒ»¸ö¼òµ¥µÄ·ÂÕæ³ÌÐò:
ÔÚÕâ¸ö·ÂÕæ³ÌÐòÖÐ,»¨Ô°Î¯Ô±»á¶¼Ï£ÍûÁ˽âÿÌìͨ¹ý´óÃŽøÈ빫԰µÄ×ÜÈËÊý.ÿ¸ö´óÃŶ¼ÓÐÒ»¸öÊ®×Ö
תÃÅ»òijÖÖÆäËûÐÎʽµÄ¼ÆÊýÆ÷,²¢ÇÒÈκÎÒ»¸öÊ®×ÖתÃŵļÆÊýÆ÷µÝÔöʱ,¾Í±íʾ¹«Ô°ÖеÄ×ÜÈËÊýµÄ¹²Ïí
¼ÆÊýÖµÒ²»áµÝÔö
package OrnamentalGarden;
import java.util.Random;
/**
* ÕâÀïʹÓõ¥¸öµ ......
ÎÒÃǾ³£ÏÂÔØ¿ªÔ´ÏîÄ¿µÄÔ´ÂëÔÚ±¾µØ±àÒë,ÊDz»ÊǾ³£±»Ò»¾ä"assert expression"¸ø¸ãµÃ±àÒë²»¹ýÈ¥£¬¾³£ÊÇÔÚÀÏ°æ±¾µÄjdk±àÒëÆ÷ÏÂû°ì·¨£¬ÏÂÃæ¾ÍÏò´ó¼ÒÍƼöһƪÉîÈë·ÖÎöjava assertionµÄÎÄÕ¡£
Ò»¡¢assertionµÄÓï·¨ºÍÓïÒå
J2SE 1.4ÔÚÓïÑÔÉÏÌṩÁËÒ»¸öÐÂÌØÐÔ£¬¾ÍÊÇassertion(¶ÏÑÔ)¹¦ÄÜ£¬ËüÊǸð汾ÔÚJavaÓïÑÔ·½Ãæ×î´ ......
0¡¢ ÐèÒª±êʶ·û
a) ²»ÔÚº¯ÊýÄÚ
1¡¢ ·Ç·¨±í´ïʽ¿ªÊ¼
b) ¿ÉÄÜ:¶ªÊ§À¨ºÅ .
2. no data found
a) ¿ÉÄÜ:setInt(1,100)ÖÐ,ûÓÐ100Õâ¸öÖµ
3. ÕÒ²»µ½·ûºÅ
a) ¿ÉÄÜ:ûµ¼Èë°ü
4. Ö¸¶¨ÁËÎÞЧURL
a) ¿ÉÄÜ:Êý¾Ý¿âÃû»òIP´íÎó,¼´Á¬½Ó³ö´í
5. Àà·¾¶Ã»ÓÐÕÒµ½
a) ¿ÉÄÜ: ClassNotFoundException: oracle.jdbc.driver.Or ......
2006-01-18 13:53×÷Õߣº³ö´¦£º²©¿ÍÔ°ÔðÈα༣º·½ÖÛ http://dev.yesky.com/178/2278678.shtml ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø£¬ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬µ«ÊÇËüÃDz»ÐèÒ ......