2009年10月24日
查了半天,終于發(fā)現(xiàn)了,在項(xiàng)目dependency里依賴到的第三方的一個(gè)包里它依賴到了我需要查找的包,導(dǎo)致這個(gè)包被貌似莫名其妙的進(jìn)入到了deploy/lib下面。
Attended Scrum training theses two days.
Some highlights from the training:
- Scrum master is a facilitator, does not assign task. Team owns tasks itself.
- Each feature has a unique rank, decided by product owner and scrum master and the team. Always finish rank high feature first, before continue rank low feature.
- Scrum always encourage communication and collaboration.
- Scrum is not a project management, but a framework for all the teams to do the things in same way. Project management methodology is still needed in Scrum.
- Scrum deliver value sooner than waterfall method.
- Scrum fits the product/project that requirements are not so fixed.
- Each team/person has its own customer.
- Successful software development projects are mainly based on people interactions.
- Advocate zero defect in iterations, ready to release after each iteration.
- XP is next level of Agile after Scrum.
I upgraded to IntelliJ IDEA 7.0 the day it came out and was, at first, let down by how poorly it performed on my machine. Since then, I tweaked a bunch of settings, and now have it performing just as fast as IDEA 5 ever did on the same box. Enjoy, and happy coding!
1. Change your Look and Feel
Change your look and feel to something other than native. On Windows, the “IDEA (4.5 Default)” look and feel performs much better than the native one. On Mac, just pick something other than the native. The new graphics will bother you for about 30 minutes and then you’ll forget all about them. This setting is in the Settings (Ctrl+Alt+S) -> Appearance (B) dialog. (Tip courtesy of Howard Lewis Ship)
2. Use Structure View Instead of Project View
In IDEA 7.0.2 on Windows, I seem to pay a heavy performance price for the Project View (Alt+1), especially with autoscrolling to and from source enabled. My alternative is to use the Structure View (Alt+2) as my default sidebar and rely on the Navigation Bar (View->Navigation Bar) for project navigation. I find I actually prefer this setup and 7.0.2 performs noticeably faster.
3. Turn off Synchronize Files
When you activate the IDEA frame, IDEA will scan the disk for file changes, giving you a nice progress bar to wait for. If you’re not editing files outside of IDEA then turn this feature off in Settings (Ctrl+Alt+S) -> General (A). Uncheck “Synchronize Files on Frame Activation”. Now you’ll have to manually synchronize the files using Ctrl+Alt+Y (File->Synchronize on the menu). (Tip courtesy of Tyler)
4. Disable Spring Model Validation on Build
I used to get a progress bar every time I ran or debugged my project, with the message “Validating Spring Model”. I don’t need this feature except when I’m working on the Spring files, so I turned it off. Settings (Ctrl+Alt+S) -> Project Settings (1) -> Modules… then click Spring, then click the Options Tab. Deselect the checkbox for “Enable Spring model validation on build”.
5. Disable Unused Plugins
Disable all of the plugins you are not currently using. For example, if you’re not using Geronimo, Commander or Jabber, then turn them off. Settings (Ctrl+Alt+S) -> Plugins (T). Uncheck anything you have installed that is unused (Tip courtesy of Carl)
6. Use Scopes to Speed Up Searches
I rarely really want to search my entire project for a string or reference. Any search dialog allows you to pick a custom scope, such as production files or test files. But “Changed Files” is a helpful option too. On large, monolithic projects you may want to define your own to only search certain packages. A little time creating new scopes will save you a lot of time in waiting for searches to complete. Define scopes in Settings (Ctrl+Alt+S) -> Scopes (5).
7. Increase Your Heap Size
Several sources include directions on increasing your heap size in IDEA. This is changed in your idea.exe.vmoptions file.
8. Always Get the Latest Version
I’ve already suggested this, so I’ll be brief. Each minor release seems to have good performance improvements.
9. Reduce Size of Local History
Another blog recommended that you turn off or reduce Local History. I love this feature so I’ll never turn it off, but the default is to save 3 days worth of work. I typically check in to version control more often than that, so I trimmed it up to 1 day of history. Do this in Settings (Ctrl+Alt+S) -> Local History (J).
10. Optimize Your Disk?
I haven’t tried this myself, but the tip came directly from JetBrains. Beyond just defragmenting, you can also optimize the MFT tables, disk folder structure, and the paging file. Direction appear on their site. Simply upgrading to a newer hard drive is find at home, but I don’t have that much control of my work machine. It’s Friday, so I’ll try this today. If things go horribly wrong I’ll redact the entry!
————————————————————————————————————————————————————————————————————————————
IntelliJ IDEA Performance
There're some concerns about IntelliJ IDEA Performance. And here is the tips that I used to make mine run fast. Some of them come from my own experience, some of them come from the know-everything internet.
* Make sure you have all your libraries on your local harddrive (as opposed to mounted network drive). After I moved all my libraries from a network drive to local harddrive, the time for a 'make' on the project is reduced from around 60 seconds to just 5-7 seconds!
* Defragment your Disk and reboot your computer. IDEA creates lots of small files and too much fragmentation is a nightmare.
* Turn off Anti Virus completely. Yes I mean completely. It affects the performance dramatically.
* Turning off Local History or even reducing the number of history days improved the performance significantly.
* Adjust VM settings. Here is my idea.exe.vmoptions file (on windows):
-Xms512m
-Xmx512m
-XX:MaxPermSize=99m
-ea
Change it as you see fit per your hardware configuration.
More information is available at http://blogs.jetbrains.com/idea/2006/04/configuring-intellij-idea-vm-options/.
* The Debugger in IDEA may work slowly if the Force classic VM option is not selected in the File Project Properties Debugger dialog. Using Method Breakpoints may also slow down the debugging process. I had two breakpoints on the method name instead of the first line of the method. It was taking a half hour to get to the breakpoint Changing these to line breakpoints gave me two orders of magniture
* You may notice IDEA hang for several seconds when you switch to it from other applicationDisable Settings General Synchronize files on frame activation.
* Disable windows paging file if you have enough memory. Get more memory if you don't have enough. Swapping is a performance nightmare.
* Turn off windows indexing services, either set it to Disabled or Manual unless you do lots of file system search (even you do, I recommend Google Desktop Search). IDEA use lots of small files so background indexing can have a big negative effect on it's performance.
* Control Panel/System/Properties/Advanced/Visual Effcts, Adjust for best performance. Unless you're willing to sacrify performance for visual effects like windows animation, fading/sliding etc.
一般而言,兔子在出生兩個(gè)月后,就有繁殖能力,一對(duì)兔子每個(gè)月能生出一對(duì)小兔子來(lái)。如果所有兔都不死,那么一年以后可以繁殖多少對(duì)兔子?
我們不妨拿新出生的一對(duì)小兔子分析一下:
第一個(gè)月小兔子沒(méi)有繁殖能力,所以還是一對(duì);
兩個(gè)月后,生下一對(duì)小兔民數(shù)共有兩對(duì);
三個(gè)月以后,老兔子又生下一對(duì),因?yàn)樾⊥米舆€沒(méi)有繁殖能力,所以一共是三對(duì);
------
依次類推可以列出下表:
所經(jīng)過(guò)月數(shù):0、1、2、3、4、5、6、7、8、9、10、11、12
兔子對(duì)數(shù):1、1、2、3、5、8、13、21、34、55、89、144、233
表中數(shù)字1,1,2,3,5,8---構(gòu)成了一個(gè)序列。這個(gè)數(shù)列有關(guān)十分明顯的特點(diǎn),那是:前面相鄰兩項(xiàng)之和,構(gòu)成了后一項(xiàng)。
這個(gè)數(shù)列是意大利中世紀(jì)數(shù)學(xué)家斐波那契在<算盤(pán)全書(shū)>中提出的,這個(gè)級(jí)數(shù)的通項(xiàng)公式,除了具有a(n+2)=an+a(n+1)/的性質(zhì)外,還可以證明通項(xiàng)公式為:an=1/√5[(1/2+√5/2)^ n-(1/2-√5/2)^ n](n=1,2,3.....)(√5表示根號(hào)5)
這個(gè)通項(xiàng)公式中雖然所有的an都是正整數(shù),可是它們卻是由一些無(wú)理數(shù)表示出來(lái)的
If you want the entry to be garbage collected, use WeakHashMap. Once the key is not strongly referenced, the entry will be automatically reclaimed.
Here is a good article to understand this:
http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html
附錄 A. 需要搞清楚幾個(gè)問(wèn)題
A.1. Maven2的優(yōu)點(diǎn)
1.
對(duì)第三方依賴庫(kù)進(jìn)行統(tǒng)一的版本管理。
只要用了Maven2就不用再為每個(gè)項(xiàng)目復(fù)制spring.jar和hibernate.jar了,Maven2會(huì)在你需要的時(shí)候,自動(dòng)把這些第三方依賴庫(kù)找到,你需要編譯,Maven2就把這些jar包放到classpath里,你需要打包,Maven2就幫你把需要的jar包都復(fù)制到WEB- INF/lib/目錄下。
2.
統(tǒng)一項(xiàng)目的目錄結(jié)構(gòu)。
可以保證所有項(xiàng)目的目錄結(jié)構(gòu)都是一樣的,目錄結(jié)構(gòu)統(tǒng)一的好處就是,你要找源代碼就去src/main/java/下,你要找需要放到classpath下的資源,就去src/main/resources/下,你要找單元測(cè)試對(duì)應(yīng)的代碼和資源,就去src/test/下。每個(gè)目錄下放什么東西,程序編譯,發(fā)布的時(shí)候,每個(gè)目錄起什么作用都很清楚明了,不會(huì)出現(xiàn)打開(kāi)項(xiàng)目找不到要找的文件的情況。
3.
統(tǒng)一軟件構(gòu)建階段
Maven2把軟件開(kāi)發(fā)的過(guò)程劃分成了幾個(gè)經(jīng)典階段,比如你先要生成一些java代碼,再把這些代碼復(fù)制到特定位置,然后編譯代碼,復(fù)制需要放到 classpath下的資源,再進(jìn)行單元測(cè)試,單元測(cè)試都通過(guò)了才能進(jìn)行打包,發(fā)布。
以前使用Ant,最令人頭疼的就是要為不同的項(xiàng)目寫(xiě)很多build.xml腳本,而且這些腳本還不太通用,現(xiàn)在我們可以使用Maven2提供的這些經(jīng)典構(gòu)建階段,讓每個(gè)項(xiàng)目就經(jīng)過(guò)相同的步驟,從源代碼一步一步變成可以部署的成品。如果想要什么附加功能,把對(duì)應(yīng)的插件綁定到一個(gè)構(gòu)建階段上,那么到了執(zhí)行這個(gè)構(gòu)建階段的時(shí)候,就會(huì)執(zhí)行綁定的插件了。
4.
支持多種插件
在http://maven.apache.com/和http://mojo.codehaus.org/上可以找到大量的Maven2插件,通過(guò)這些插件可以完成多種多樣的擴(kuò)展功能。
不過(guò),如果比插件的易用性,Ant的插件實(shí)際上更簡(jiǎn)單方便,與之相比,在Maven2中配置插件的步驟太復(fù)雜了,既要配置groupId和 artifactId,還要配置綁定在哪個(gè)階段運(yùn)行。
不過(guò)因?yàn)镸aven2可以把插件連同第三方依賴一起進(jìn)行統(tǒng)一版本管理,所以這方面也算比Ant有一點(diǎn)兒優(yōu)勢(shì),至少使用時(shí)不需要自己再去下載插件的發(fā)布包了。
5.
自動(dòng)生成項(xiàng)目網(wǎng)站和報(bào)表
如果說(shuō)Ant可以使用ivy實(shí)現(xiàn)第三方依賴庫(kù)的統(tǒng)一管理,如果說(shuō)Ant可以自己統(tǒng)一項(xiàng)目的目錄結(jié)果,如果說(shuō)Ant支持插件更靈活,那么這個(gè)特性絕對(duì)是 Ant無(wú)法比擬的。
Maven2 可以自動(dòng)為項(xiàng)目生成一個(gè)網(wǎng)站,里面包含了項(xiàng)目信息,參與人,項(xiàng)目管理相關(guān)的資源,第三方依賴庫(kù),使用的插件,以及通過(guò)其他擴(kuò)展插件生成的各種報(bào)表。Ant 使用某些插件也可以生成html格式的報(bào)表,但是各個(gè)報(bào)表之間都沒(méi)什么關(guān)聯(lián),不像Maven2中將網(wǎng)站和報(bào)表都關(guān)聯(lián)在一起,查看起來(lái)十分方便。
A.2. Maven2的問(wèn)題
1.
Maven2使用前需要像Ant一樣需要配置環(huán)境變量。
本來(lái)綠色安裝是一件好事,但是因?yàn)樘嗳硕贾粫?huì)用IDE,不了解如何配置環(huán)境變量,所以這第一步就很成問(wèn)題。
2.
Maven- 2.1.0本身只有2.844M,可是這只是一個(gè)核心,實(shí)際使用時(shí),還需要去公網(wǎng)上的資源庫(kù)下載各種插件,然后才能實(shí)現(xiàn)各種功能,問(wèn)題是公網(wǎng)上的資源庫(kù)一般都是在國(guó)外,網(wǎng)路速度稍慢就無(wú)法完成下載,沒(méi)法下載就沒(méi)法使用Maven2里提供的那些功能,Maven2就用不起來(lái)。
尤其對(duì)于新手來(lái)說(shuō),第一次下載插件的過(guò)程,實(shí)在是太痛苦了,大多數(shù)人都在這一階段放棄了對(duì)Maven2的嘗試。
3.
第三方依賴庫(kù)版本混亂。
java的依賴庫(kù)管理一直沒(méi)有約定規(guī)范,導(dǎo)致多個(gè)項(xiàng)目,引用多個(gè)第三方依賴,這些第三方依賴又使用同一個(gè)項(xiàng)目的不同版本的發(fā)布包,最后就是弄得一團(tuán)糟。
Maven2 嘗試通過(guò)一些約定解決這個(gè)版本混亂的問(wèn)題,但實(shí)際上并沒(méi)有達(dá)到預(yù)想中的效果。例如,commons.apache.org中的項(xiàng)目,本來(lái)應(yīng)該放在 org/apache/commons/目錄下,現(xiàn)在卻都各自放在commons-logging,commons-lang,commons- beanutils目錄下,估計(jì)這是因?yàn)閯傞_(kāi)始使用Maven2的那些人,懶得把常用包放到那么深的目錄結(jié)構(gòu)中,偷懶放到了頂級(jí)目錄下。可隨著 Maven2的發(fā)展,加入資源庫(kù)的包越來(lái)越多,他們又把新發(fā)布的依賴包按照正常的方式,放到了org/apache/commons/目錄下,而舊依賴還有很多人在用,所以也不能刪除,這就造成了現(xiàn)在這種一種依賴庫(kù)多種存放形式的問(wèn)題。
每次在資源庫(kù)上找依賴都要花費(fèi)很多時(shí)間,因?yàn)槟悴磺宄烤故褂玫哪姆N目錄形式,比如sourceforge.net上的項(xiàng)目就有兩種目錄形式,一些項(xiàng)目放在net/sf /目錄下,而另一些例子放在net/sourceforge/目錄下,所以你就算知道項(xiàng)目的網(wǎng)站地址,也要在多個(gè)目錄下都找一遍。
4.
缺乏詳細(xì)的教程
入門(mén)教程一般都很簡(jiǎn)略,現(xiàn)在似乎使用的人多了起來(lái),可以在網(wǎng)上找到一些新手教程,但是一般都很簡(jiǎn)略,只能自己玩玩,實(shí)際中遇到問(wèn)題的話,還是很難解決。
實(shí)際上Maven2的教程一直是一塊短板,就算是國(guó)外的兩本書(shū)《Maven: The Definitive Guide 》和《Better Build With Maven》也沒(méi)有涉及到富含價(jià)值高級(jí)技術(shù)。
就算是講的比較詳細(xì)的Maven2教程,也都是停留在Maven2本身的使用上,或者稍微提及一下使用到得官方插件,對(duì)于很多強(qiáng)力的擴(kuò)展插件都沒(méi)有介紹。
至今很多人用Maven2都處在摸索階段,沒(méi)看到誰(shuí)總結(jié)出使用Maven2最佳實(shí)踐。這點(diǎn)上,一般都是把國(guó)外開(kāi)源項(xiàng)目中的pom.xml拿來(lái)研究學(xué)習(xí)。
5.
資源庫(kù)不完整
一般來(lái)說(shuō),我們可以從Maven2的資源庫(kù)上下載到我們所需要的第三方依賴庫(kù),但是有些依賴庫(kù)在Maven2的資源庫(kù)上是找不到的。
其中有因?yàn)榘l(fā)布協(xié)議的限制,比如j2ee的一些規(guī)范api。有因?yàn)轫?xiàng)目所在廠商的原因,比如jbpm。有因?yàn)轫?xiàng)目社區(qū)的問(wèn)題,比如birt。還有很多情況是因?yàn)镸aven2官方處理事情太慢,很多小型開(kāi)源項(xiàng)目,比如dozer,雖然兩個(gè)月前就已經(jīng)提出了最新版本的上傳申請(qǐng),但是遲遲沒(méi)有給予答復(fù)。
在這種情況下,我們只能自己在本地資源庫(kù)中安裝需要的依賴了,造成的問(wèn)題是,如果相關(guān)的項(xiàng)目使用了Maven2的項(xiàng)目管理文件,那么可以使用Maven2 將項(xiàng)目發(fā)布到本地庫(kù)中,這樣一來(lái)就可以獲得項(xiàng)目自身的依賴設(shè)置。如果相關(guān)項(xiàng)目沒(méi)有使用Maven2的項(xiàng)目管理文件,那么需要自己再去為這個(gè)項(xiàng)目找到所需要的依賴,并配置到對(duì)應(yīng)的pom文件中,著實(shí)非常麻煩。
6.
Maven2沒(méi)有IDE支持
沒(méi)有良好的IDE支持也是個(gè)大問(wèn)題,雖然說(shuō)有m2eclipse,但是實(shí)際上似乎沒(méi)那么易用。
本身我們沒(méi)有使用m2eclipse,而是使用maven2 + editplus的組合,不過(guò)介于廣大開(kāi)發(fā)者還是要用eclipse的,所以稍后我們還是會(huì)討論到m2eclipse的相關(guān)知識(shí)。
follow steps 不用netbean,按照下文的指示手工操作。
http://dev.firnow.com/course/3_program/java/javajs/20090507/166773.html
碰到問(wèn)題:
在執(zhí)行 ant -f build.xml setup的時(shí)候會(huì)報(bào)一個(gè)錯(cuò)誤
連接到端口1527上的服務(wù)器localhost 時(shí)出錯(cuò),消息未connetion refused:connect
原因是java derby db 沒(méi)有啟動(dòng)。
解決方法:?jiǎn)?dòng)它
<glassfish_dir>/bin/asadmin start-database
<glassfish_dir>指的是glassfish的安裝目錄
I got above error notes shows google take serious consideration about its security.
- must end with a new line
- Main-Class attribute is case sensitive
- file name is random, file extension is mf, eg. mymanifest.mf
- example jar command to package a app: jar cfm myapp.jar MANIFEST.MF *.*
Manifest-Version: 1.0
Main-Class: ButtonTest
When developing a Java program it is important to select the appropriate Java Graphical User Interface (GUI) components. There are two basic sets of components that you will most likely build your Java programs with. These two groups of components are called the Abstract Window Toolkit (AWT) and Swing. Both of these groups of components are part of the Java Foundation Classes (JFC).
An Overview of the AWT
AWT stands for Abstract Window ToolKit. The Abstract Window Toolkit supports GUI Java programming. It is a portable GUI library for stand-alone applications and/or applets. The Abstract Window Toolkit provides the connection between your application and the native GUI. The AWT provides a high level of abstraction for your Java program since it hides you from the underlying details of the GUI your program will be running on.
AWT features include:
- A rich set of user interface components.
- A robust event-handling model.
- Graphics and imaging tools, including shape, color, and font classes.
- Layout managers, for flexible window layouts that don't depend on a particular window size or screen resolution.
- Data transfer classes, for cut-and-paste through the native platform clipboard.
The AWT components depend on native code counterparts (called peers) to handle their functionality. Thus, these components are often called "heavyweight" components.
An Overview of Swing
Swing implements a set of GUI components that build on AWT technology and provide a pluggable look and feel. Swing is implemented entirely in the Java programming language, and is based on the JDK 1.1 Lightweight UI Framework.
Swing features include:
- All the features of AWT.
- 100% Pure Java certified versions of the existing AWT component set (Button, Scrollbar, Label, etc.).
- A rich set of higher-level components (such as tree view, list box, and tabbed panes).
- Pure Java design, no reliance on peers.
- Pluggable Look and Feel.
Swing components do not depend on peers to handle their functionality. Thus, these components are often called "lightweight" components.
AWT vs. Swing
There are, of course, both pros and cons to using either set of components from the JFC in your Java applications. Here is a summary:
AWT:
Pros
- Speed: use of native peers speeds component performance.
- Applet Portability: most Web browsers support AWT classes so AWT applets can run without the Java plugin.
- Look and Feel: AWT components more closely reflect the look and feel of the OS they run on.
- Portability: use of native peers creates platform specific limitations. Some components may not function at all on some platforms.
- Third Party Development: the majority of component makers, including Borland and Sun, base new component development on Swing components. There is a much smaller set of AWT components available, thus placing the burden on the programmer to create his or her own AWT-based components.
- Features: AWT components do not support features like icons and tool-tips.
Swing:
Pros
- Portability: Pure Java design provides for fewer platform specific limitations.
- Behavior: Pure Java design allows for a greater range of behavior for Swing components since they are not limited by the native peers that AWT uses.
- Features: Swing supports a wider range of features like icons and pop-up tool-tips for components.
- Vendor Support: Swing development is more active. Sun puts much more energy into making Swing robust.
- Look and Feel: The pluggable look and feel lets you design a single set of GUI components that can automatically have the look and feel of any OS platform (Microsoft Windows, Solaris, Macintosh, etc.). It also makes it easier to make global changes to your Java programs that provide greater accessibility (like picking a hi-contrast color scheme or changing all the fonts in all dialogs, etc.).
- Applet Portability: Most Web browsers do not include the Swing classes, so the Java plugin must be used.
- Performance: Swing components are generally slower and buggier than AWT, due to both the fact that they are pure Java and to video issues on various platforms. Since Swing components handle their own painting (rather than using native API's like DirectX on Windows) you may run into graphical glitches.
- Look and Feel: Even when Swing components are set to use the look and feel of the OS they are run on, they may not look like their native counterparts.
- System event
- system timer
- system finish on an asynchronous event
- user event
- user move mouse
- user click mouse
- user input via keyboard
激勵(lì)你一生的36句話
1、有識(shí)有膽,有膽有識(shí),知識(shí)與膽量是互相促進(jìn)的。
2、體育鍛煉可以(有時(shí)可以迅速)使人樂(lè)觀(科學(xué)實(shí)驗(yàn)證明)。
3、勤奮,機(jī)會(huì),樂(lè)觀是成功的三要素。(注意:傳統(tǒng)觀念認(rèn)為勤奮和機(jī)會(huì)是成功的要素,但是經(jīng)過(guò)統(tǒng)計(jì)學(xué)和成功人士的分析得出,樂(lè)觀是成功的第三要素)
4、自信是人格的核心。
5、獲得的成功越大,就越令人高興。(野心是使人勤奮的原因,節(jié)制使人枯萎)
6、熱愛(ài)你所擁有的。——列夫·托爾斯泰
7、(一般情況下)不想三年以后的事,只想現(xiàn)在的事(現(xiàn)在有成就,以后才能更輝煌)
8、把問(wèn)題看寬廣些,沒(méi)有解決不了的事。(真理路廣,人欲路窄;當(dāng)然不要超越時(shí)代去想現(xiàn)在任何人都解決不了的事)
9、不問(wèn)收獲,只問(wèn)耕耘。(如同種樹(shù),先有根莖,再有枝葉,爾后花實(shí),好好勞動(dòng),不要想太多,那樣只會(huì)使人膽小、懶惰)
10、忍耐和信仰
11、有恒則斷無(wú)不成之事。
12、智慧之泉必須暢飲才能使人清醒。
13、生活的樂(lè)趣的大小取決于我們對(duì)生活的關(guān)心程度。
14、中年以前不要怕,中年以后不要悔。
15、機(jī)遇對(duì)于有準(zhǔn)備的頭腦有特別的親和力。
16、守業(yè)最好的辦法就是不斷的發(fā)展
17、心急吃不了熱湯圓
18、必死則生,幸生則死——《吳子兵法》(武經(jīng)典籍中僅次于《孫子兵法》)
19、要改變命運(yùn),首先改變自己
20、走自己的路,讓別人說(shuō)去吧!
21、學(xué)習(xí)的關(guān)鍵——重復(fù)
22、只為成功找方法,不為失敗找借口(蹩腳的工人總是說(shuō)工具不好)
23、困難就是機(jī)遇——溫斯頓·丘吉爾
24、我?jiàn)^斗,所以我快樂(lè)——格林斯潘(挽救東南亞金融危機(jī)的人,我的偶像)
25、好奇者,知識(shí)之門(mén)
26、生氣是用別人的錯(cuò)誤懲罰自己。——康德(這個(gè)哲學(xué)家讓人眉開(kāi)眼笑)
27、失去金錢(qián)的人損失甚少,失去健康的人損失極多,失去勇氣的人損失一切。
28、只要下定決心克服恐懼,便幾乎能克服任何恐懼。因?yàn)椋?qǐng)記住,除了在腦海中,恐懼無(wú)處藏身。——戴爾·卡耐基
29、害怕時(shí),把心思放在必須做的事情上,如果曾經(jīng)徹底準(zhǔn)備,便不會(huì)害怕。——戴爾·卡耐基
30、“不可能”這個(gè)字(法語(yǔ)是一個(gè)字),只在愚人的字典中找得到。——拿破侖
31、去做你害怕的事,害怕自然就會(huì)消失。——羅夫·華多·愛(ài)默生
32、這世上的一切都借希望而完成。農(nóng)夫不會(huì)播下一粒玉米,如果他不曾希望它長(zhǎng)成種籽;單身漢不會(huì)娶妻,如果他不曾希望有小孩;商人或手藝人不會(huì)工作,如果他不曾希望因此而有收益。——馬丁·路德
33、目標(biāo)的堅(jiān)定是性格中最必要的力量泉源之一,也是成功的利器之一。沒(méi)有它,天才也會(huì)在矛盾無(wú)定的迷徑中,徒勞無(wú)功。——查士德斐爾爵士
34、要冒一次險(xiǎn)!整個(gè)生命就是一場(chǎng)冒險(xiǎn)。走得最遠(yuǎn)的人,常是愿意去做,并愿意去冒險(xiǎn)的人。“穩(wěn)妥”之船,從未能從岸邊走遠(yuǎn)。——戴爾·卡耐基
35、當(dāng)一個(gè)青年人站起來(lái)面對(duì)這個(gè)大莽漢——這個(gè)世界——并勇敢地抓住他的胡須時(shí),常會(huì)吃驚地發(fā)現(xiàn),胡須脫落在他手上,原來(lái)它只是系上去嚇唬膽怯的冒險(xiǎn)者的。——羅夫·華多·愛(ài)默生
36、勇氣很有理由被當(dāng)作人類德性之首,因?yàn)檫@種德性保證了所有其余的德性。——溫斯頓·丘吉爾
Following is the syntax of vararg method.
public
void
testVar(
int
count, String... vargs) { }
String.. . actualy is a list of String.
You may use for(String s : vargs) to iterate through it.
Mainly used in Reflection API, when you do not know exactly how many parameters of a method has.
When evaluating open-source software for an enterprise Web or application
platform, the following are important considerations:
? Size and activity level of the open-source community. There is a lot happening in open source and the most popular projects (determined by downloads and community involvement numbers) are the ones that will likely survive and thrive, providing a steady stream of innovation
? Open-source license (not just free). Projects must have an open-source license (GPL, CDDL, Apache, etc.) that is endorsed by the Open Source Initiative (OSI—
http://www.opensource.org/) This is the only way to determine if it is truly open source; otherwise, it is just another proprietary license
? Active deployments. Are there other customers using this in production? You probably don’t want to be first unless there are compelling business reasons.
Linux + Apache + Mysql + PHP