XMLÎļþʵÀý£º
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource auth="Container" maxActive="20" name="sss" password="123"
type="javax.sql.DataSource" />
<Resource auth="Container" maxActive="20" password="9003"
type="javax.sql.DataSource" />
<Resource as="nnnnnnnnnnnn" name="jdbc/sqlserver-database" />
</Context>
JavaÀࣺ
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import javax.imageio.metadata.IIOMetadataNode;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeLi ......
XMLÎļþʵÀý£º
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource auth="Container" maxActive="20" name="sss" password="123"
type="javax.sql.DataSource" />
<Resource auth="Container" maxActive="20" password="9003"
type="javax.sql.DataSource" />
<Resource as="nnnnnnnnnnnn" name="jdbc/sqlserver-database" />
</Context>
JavaÀࣺ
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import javax.imageio.metadata.IIOMetadataNode;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeLi ......
ÒªÔÚJavaÖлñµÃijһ±äÁ¿µÄËø£¬±ØÐëÔÚ´úÂëµÄÊ×β¶þ¶Ë¼ÓÉÏsynchronized¹Ø½¡×Ö£¬Ö¸Ã÷ÐèÒª»ñµÃËøµÄ¶ÔÏó¡£Ò»µ©Ï߳̿ªÊ¼Ö´ÐÐsynchronized¿éÖеĴúÂ룬Ëü¾Í»ñµÃÁ˶ÔÕâÒ»¶ÔÏóµÄËøµÄ¿ØÖÆȨ¡£Í¬Ñù£¬Ò»µ©Ïß³ÌÒѾÀ뿪ÁËsynchronized¿é£¬ËüÒ²½«ÊÍ·ÅÕâÒ»¶ÔÏóµÄËø¡£ÎÒÃÇÒѾ֪µÀ£¬C#Ò²ÓÐÒ»¸öÏàËƵı»³Æ×÷lockµÄ¹Ø½¡×Ö¡£³ýÁËlockÕâ¸ö¹Ø½¡×ÖÍ⣬C#»¹ÌṩÁËÄÚÖõĻñµÃºÍÊÍ·ÅËøµÄ·½·¨£º ......
ÒªÔÚJavaÖлñµÃijһ±äÁ¿µÄËø£¬±ØÐëÔÚ´úÂëµÄÊ×β¶þ¶Ë¼ÓÉÏsynchronized¹Ø½¡×Ö£¬Ö¸Ã÷ÐèÒª»ñµÃËøµÄ¶ÔÏó¡£Ò»µ©Ï߳̿ªÊ¼Ö´ÐÐsynchronized¿éÖеĴúÂ룬Ëü¾Í»ñµÃÁ˶ÔÕâÒ»¶ÔÏóµÄËøµÄ¿ØÖÆȨ¡£Í¬Ñù£¬Ò»µ©Ïß³ÌÒѾÀ뿪ÁËsynchronized¿é£¬ËüÒ²½«ÊÍ·ÅÕâÒ»¶ÔÏóµÄËø¡£ÎÒÃÇÒѾ֪µÀ£¬C#Ò²ÓÐÒ»¸öÏàËƵı»³Æ×÷lockµÄ¹Ø½¡×Ö¡£³ýÁËlockÕâ¸ö¹Ø½¡×ÖÍ⣬C#»¹ÌṩÁËÄÚÖõĻñµÃºÍÊÍ·ÅËøµÄ·½·¨£º ......
×Ô¼ºµÄÔ´³ÌÐòÊÇÔÚF:\parser\ParserDemo.java£¬
ʹÓÃÃüÁîÐУºjavac -classpath stanford-parser.jar;. ParserDemo.java±àÒ룬
ÃüÁîÐУºjava -cp stanford-parser.jar;. ParserÔËÐÐ
¶¼Ã»ÓÐÎÊÌâ¡£
µ«Êǵ±ÎÒÔÚc++³ÌÐòÖÐʹÓÃÓÃÃüÁîÐУ¨java -cp stanford-parser.jar;. Parser£©µ÷ÓøijÌÐò¾Í»á³ö´í¡£Ìáʾ£ºjava.lang.NoClassDefFoundError:...
ºóÀ´·¢ÏÖÖ»Òª¸ü¸ÄÃüÁîÐе±Ç°Â·¾¶¾Í»á³ö´í£¬²Â²âÔ´´úÂë·¾¶²»¶à£¬Ìí¼ÓÒ»¸ö·¾¶
java -cp F:\\parser\\stanford-parser.jar;f:\\parser; ParserDemo
ÔÙÊÔÒ»ÇÐok¡£
×¢Ò⣺ÔÚ³ÌÐòÖÐÈç¹ûÓÐʹÓÃÏà¶Ô·¾¶µÄÎļþ£¬±ÈÈç´ò¿ªÒ»¸öÎļþaaa.txt£¬ËûÕýºÃÔÚf:\parserĿ¼Ï£¬µ±Äã´ÓÃüÁîÐÐÔËÐгÌÐòʱ£¬Èç¹ûµ±Ç°Â·¾¶²»ÔÚf:\parser£¬ÄÇô¾Í»á±¨´í£¬ÌáʾÕÒ²»µ½¸ÃÎļþ£¬ËùÒÔÒªÔÚ±ðµÄµØ·½µ÷ÓøóÌÐò£¬×îºÃʹÓþø¶Ô·¾¶¡£ ......
ÖØÔØ£º·½·¨ÃûÏàͬ ·µ»ØÀàÐͺͲÎÊýÖÁÉÙÓÐÒ»Ïͬ£¨²ÎÊý°üÀ¨ÀàÐÍ ºÍ ÊýÁ¿£©
ÖØд£º·¢ÉúÔÚ×ÓÀà ·½·¨Ãû ·µ»ØÀàÐÍ ²ÎÊý¶¼Ïàͬ Ö»ÊǰѸ¸ÀàµÄ´Ë·½·¨ÖØÐÂд¶øÒÑ
Ò»Ö±ÒÔÀ´ÎÒ¶ÔFacther f = new Son()ÕâÑùµÄÒýÓñäÁ¿ÒýÓÃ×ÓÀàµÄʵÀý¶¼²»ÊǺܶ®¡£
»¹ÓоÍÊÇÏòÉÏÏòÏÂתÐÍ
È磺Animal animal = new Dog() // ÒýÓñäÁ¿ÒýÓÃÁËÀ´×Ô×ÓÀàµÄʵÀý
Dog dog = (Dog)animal; //½«animalÏòÏÂתÐÍ
Creature creature = (Creature)animal //½«animalÏòÉÏתÐÍ
³ÉÔ±±äÁ¿¡¢¾²Ì¬±äÁ¿, ¾²Ì¬·½·¨°´ÕÕÒýÓñäÁ¿ÉùÃ÷µÄÀàÐ;²Ì¬°ó¶¨£»ÊµÀý·½·¨°´ÕÕÒýÓñäÁ¿ÒýÓõÄʵÀý¶¯Ì¬°ó¶¨¡£
ÀýÈ磬¶ÔÓÚÒÔÏÂÕâ¶Î´úÂ룺
Fathers f£½new Sons();
System.out.println(“f.var=”+f.var);
System.out.println(“f.staticVar=”+f.staticVar);
f.method();
f.staticMethod();
ÔËÐÐʱ½«»áÊä³öÈçϽá¹û£º
f.var=FatherVar // ³ÉÔ±±äÁ¿°´ÕÕÒýÓñäÁ¿£¨f£©µÄÉùÃ÷µÄÀàÐÍ£¨Father£©¾²Ì¬°ó¶¨
f.staticVar=StaticFaterVar // ¾²Ì¬±äÁ¿°´ÕÕÒýÓñäÁ¿£¨f£©µÄ ......
½ñÌì´ÓͬѧÃÇÄÇÀï¸ãÁËÁ½¸ö·Ç½Èí¼þ£¬Ò»¸öÊÇÎ޽磬һ¸öÊÇ×ÔÓÉÃÅ£¬¸ÕÌýµ½·Ç½Èí¼þ´ó¼ÒÒ»¶¨ºÜÃÔºý°É£¬ÎÒÒ²ÊǸÕÖªµÀÓÐÕâÖÖ¶«Î÷£¬Ìý˵ÓÃÕâÖÖÈí¼þ¿ÉÒÔ·ÃÎÊһЩ±»¹ú¼Ò½ûÖ¹·ÃÎʵÄÍøÕ¾£¬È·ÇеÄ˵¾ÍÊÇÒ»ÖÖ´úÀí»úÖÆ£¬´ó¼Ò²»Òª¶àÏ룬ÎÒŪÕâ¸ö¶«Î÷û±ðµÄÄ¿µÄ£¬¶¯»úÊǺܵ¥´¿µÄ£¬¾ÍÊÇÏë¿´Ò»¿´È«Çò×î´óµÄÊÓƵÍøÕ¾YouTuBe£¬Õâ¸öÍøÕ¾²»¾ÃÇ°±»½ûÖ¹·ÃÎÊÁË£¬ºÃÏñÊÇ˵ÓÐʲô²»½¡¿µºÍ·´¶¯ÐÅÏ¢£¬ÓÐЩÈËÅÄÊֳƿ죬µ«Ò²ÓÐÐí¶àÈË·´¶Ô£¬ÍøÉϳ³µÃ·Ð·ÐÑïÑ×Ô¼ºÃ»ÕæÕý¿´¹ý×ܸоõÓÐÒ»µãÒź¶£¬ÍíÉÏ»ØÀ´ÎҾͳ¢ÊÔÁËһϣ¬Èí¼þȷʵͦºÃÓ㬵«Éϵ½YouTuBeºóÎÒ¾ÍʧÍûÁË£¬ÊÓƵÖÖÀàȷʵͦ¶àͦȫ£¬µ«ÊÇʲôÎÚÆß°ËÔã¡¢°¢Ã¨°¢¹·µÄÊÓƵ¶¼ÓУ¬¾ßÌå²»Ïêϸ½éÉÜ£¬Ö»¿ÉÒâ»á²»¿ÉÑÔ´«£¬¿´À´¹ú¼Ò¸øËû½ûÁË»¹ÊǺÜÕýÈ·µÄ£¡
°´ÕտαíµÄ°²ÅÅ£¬ÐÝϢʱ¼äÓÖ¸ÄÁË£¬ÓÉÿÖܵÄÖܶþÖÜÎå¸Ä³ÉÖÜÒ»ÖÜËÄ£¬Æäʵ¶¼Ò»Ñù£¬Ã»Ê²Ã´¸Ð¾õ¡£½ñÌìÉϿν²µÄÊÇJDBCµÄÁ¬½Ó³Ø£¬×ܽáÈçÏ£º
Êý¾Ý¿âÁ¬½Ó³ØµÄ»ù±¾Ë¼Ïë¾ÍÊÇΪÊý¾Ý¿âÁ¬½Ó½¨Á¢Ò»¸ö“»º³å³Ø”¡£Ô¤ÏÈÔÚ»º³å³ØÖзÅÈëÒ»¶¨ÊýÁ¿µÄÁ¬½Ó£¬µ±ÐèÒª½¨Á¢Êý¾Ý¿âÁ¬½Óʱ£¬Ö»Ðè´Ó“»º³å³Ø”ÖÐÈ¡³öÒ»¸ö£¬Ê¹ÓÃÍ ......
Ctrl+1 ¿ìËÙÐÞ¸´(×î¾µäµÄ¿ì½Ý¼ü,¾Í²»Óöà˵ÁË)
Ctrl+D: ɾ³ýµ±Ç°ÐÐ
Ctrl+Alt+↓ ¸´ÖƵ±Ç°Ðе½ÏÂÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Ctrl+Alt+↑ ¸´ÖƵ±Ç°Ðе½ÉÏÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Alt+↓ µ±Ç°ÐкÍÏÂÃæÒ»Ðн»»¥Î»ÖÃ(ÌرðʵÓÃ,¿ÉÒÔÊ¡È¥ÏȼôÇÐ,ÔÙÕ³ÌùÁË)
Alt+↑ µ±Ç°ÐкÍÉÏÃæÒ»Ðн»»¥Î»ÖÃ(ͬÉÏ)
Alt+← Ç°Ò»¸ö±à¼µÄÒ³Ãæ
Alt+→ ÏÂÒ»¸ö±à¼µÄÒ³Ãæ(µ±È»ÊÇÕë¶ÔÉÏÃæÄÇÌõÀ´ËµÁË)
Alt+Enter ÏÔʾµ±Ç°Ñ¡Ôñ×ÊÔ´(¹¤³Ì,or Îļþ orÎļþ)µÄÊôÐÔ
Shift+Enter ÔÚµ±Ç°ÐеÄÏÂÒ»ÐвåÈë¿ÕÐÐ(ÕâʱÊó±ê¿ÉÒÔÔÚµ±Ç°ÐеÄÈÎһλÖÃ,²»Ò»¶¨ÊÇ×îºó)
Shift+Ctrl+Enter ÔÚµ±Ç°ÐвåÈë¿ÕÐÐ(ÔÀíͬÉÏÌõ)
Ctrl+Q ¶¨Î»µ½×îºó±à¼µÄµØ·½
Ctrl+L ¶¨Î»ÔÚijÐÐ (¶ÔÓÚ³ÌÐò³¬¹ý100µÄÈ˾ÍÓи£ÒôÁË)
Ctrl+M ×î´ó»¯µ±Ç°µÄEdit»òView (ÔÙ°´Ôò·´Ö®)
Ctrl+/ ×¢Ê͵±Ç°ÐÐ,ÔÙ°´ÔòÈ¡Ïû×¢ÊÍ
Ctrl+O ¿ìËÙÏÔʾ OutLine
Ctrl+T ¿ìËÙÏÔʾµ±Ç°ÀàµÄ¼Ì³Ð½á¹¹
Ctrl+W ¹Ø±Õµ±Ç°Editer
Ctrl+K ²ÎÕÕÑ¡ÖеÄWord¿ìËÙ¶¨Î»µ½ÏÂÒ»¸ö
Ctrl+E ¿ìËÙÏÔʾµ±Ç°EditerµÄÏÂÀÁбí(Èç¹ûµ±Ç°Ò³ÃæûÓÐÏÔʾµÄÓúÚÌå±íʾ)
Ctrl+/(С¼üÅÌ) ÕÛµþµ±Ç°ÀàÖеÄËùÓдúÂë
Ctrl+×(С¼üÅÌ) Õ¹¿ªµ±Ç°ÀàÖеÄËùÓдúÂë
Ctrl+Space ´úÂëÖúÊÖÍê³ÉÒ» ......