posts - 11,  comments - 4,  trackbacks - 0
    xmarks是firefox的一个插件,它的原名叫做foxmakrs。
    安装xmakrs后,只需要在它的网站注册一个账号,你收藏的网站就会定期备份到你的账号中。这样就可以方便的备份你的收藏网址了。
    在你收藏某个网站的时候,它会根据别人收藏该网站时使用的标签,给你推荐一个使用人数最多的标签。
    由此,它给出了我认为最好的一个功能:在你使用google进行搜索的时候,它会自动在google的每一个搜索结果后面,加上一个该搜索结果在相关领域内收藏次数的名次。
    以我的搜索:UML为例,它就会在每个google的搜索结果后面给出其在xmarks中被以UML标签收藏的次数的排名。由此我就能很容易的发现,argouml是被人以UML标签收藏次数最多的网站,所以我想argouml应该就是我想找的最火的开源UML建模工具
posted @ 2010-06-09 10:33 新蜂 阅读(157) | 评论 (0)编辑 收藏

Tab and window shortcuts

Ctrl+N Opens a new window.
Ctrl+T Opens a new tab.
Ctrl+Shift+N Opens a new window in incognito mode.
Ctrl+B Toggles the bookmarks bar on and off.
Press Ctrl+O, then select file. Opens a file from your computer in Google Chrome.
Press Ctrl and click a link. Or click a link with your middle mouse button (or mousewheel). Opens the link in a new tab in the background .
Press Ctrl+Shift and click a link. Or pressShift and click a link with your middle mouse button (or mousewheel). Opens the link in a new tab and switches to the newly opened tab.
Press Shift and click a link. Opens the link in a new window.
Ctrl+Shift+T Reopens the last tab you've closed. Google Chrome remembers the last 10 tabs you've closed.
Drag a link to a tab. Opens the link in the tab.
Drag a link to a blank area on the tab strip. Opens the link in a new tab.
Drag a tab out of the tab strip. Opens the tab in a new window.
Drag a tab out of the tab strip and into an existing window. Opens the tab in the existing window.
Press Esc while dragging a tab. Returns the tab to its original position.
Ctrl+1 through Ctrl+8 Switches to the tab at the specified position number on the tab strip.
Ctrl+9 Switches to the last tab.
Ctrl+Tab orCtrl+PgDown Switches to the next tab.
Ctrl+Shift+Tab orCtrl+PgUp Switches to the previous tab.
Ctrl+Shift+Q Closes Google Chrome.
Ctrl+W or Ctrl+F4 Closes the current tab or pop-up.
Click a tab with your middle mouse button (or mousewheel). Closes the tab you clicked.
Right-click, or click and hold either the Back or Forward arrow in the browser toolbar. Displays your browsing history in the tab.
Press Backspace Goes to the previous page in your browsing history for the tab.
PressShift+Backspace Goes to the next page in your browsing history for the tab.
Click either the Back arrow, Forward arrow, or Go button in the toolbar with your middle mouse button (or mousewheel). Opens the button destination in a new tab in the background.
Double-click the blank area on the tab strip. Maximizes or minimizes the window.

Address bar shortcuts

Use the following shortcuts in the address bar:

Type a search term, then press Enter. Performs a search using your default search engine.
Type a search engine keyword, press Space, type a search term, and press Enter. Performs a search using the search engine associated with the keyword.
Begin typing a search engine URL, pressTab when prompted, type a search term, and press Enter. Performs a search using the search engine associated with the URL.
Ctrl+L Highlights the URL.
Ctrl+E Places a '?' in the address bar. Type a search term after the question mark to perform a search using your default search engine.
Press Ctrl+Shift and the left arrow together. Moves your cursor to the preceding key term in the address bar
Press Ctrl+Shift and the right arrow together. Moves your cursor to the next key term in the address bar
Ctrl+Backspace Deletes the key term that precedes your cursor in the address bar
Select an entry in the address bar drop-down menu with your keyboard arrows, then press Shift+Delete. Deletes the entry from your browsing history, if possible.
Click an entry in the address bar drop-down menu with your middle mouse button (or mousewheel). Opens the entry in a new tab in the background.
Press Page Up orPage Down when the address bar drop-down menu is visible. Selects the first or last entry in the drop-down menu.

Webpage shortcuts

Ctrl+P Prints your current page.
Ctrl+S Saves your current page.
Ctrl+R Reloads your current page.
Esc Stops the loading of your current page.
Ctrl+F Opens the find bar.
Ctrl+G or Enter Finds the next match for your input in the find bar.
Ctrl+Shift+G orShift+Enter Finds the previous match for your input in the find bar.
Press Alt and click a link. Downloads the target of the link.
Drag a link to bookmarks bar Bookmarks the link.
Ctrl+D Bookmarks your current webpage.
Space bar Scrolls down the web page.
Home Goes to the top of the page.
End Goes to the bottom of the page.

Text shortcuts

Ctrl+C Copies highlighted content to the clipboard.
Ctrl+V or Shift+Insert Pastes content from the clipboard.
Ctrl+Shift+V Paste content from the clipboard without formatting.
Ctrl+X or Shift+Delete Deletes the highlighted content and copies it to the clipboard.
posted @ 2010-05-10 16:05 新蜂 阅读(161) | 评论 (0)编辑 收藏
视图的字体是用的系统字体。

桌面属性-->外观-->高级: 下拉列表里选“消息框”,把字体改大些就行了。

不 过这个设置会改变所有的窗口的字体
posted @ 2010-04-11 11:23 新蜂 阅读(153) | 评论 (0)编辑 收藏
extension points即接口,是插件暴露给其他插件的接口。

每一个插件都是在现有扩展点上开发,并且留有自己的扩展点。

除了小型的运行时内核之外,eclipse中的所有东西都是插件



org.eclipse.ui.editors 编辑器窗口

org.eclipse.ui.views 视图窗口





posted @ 2010-04-11 10:33 新蜂 阅读(137) | 评论 (0)编辑 收藏
 Java   程序是由若干个   .class   文件组成的。这些   .class   文件必须根据它们所属的包不同而分级分目录存放;运行前需要把所有用到的包的根目录指定给   CLASSPATH   环境变量或者   java   命令的   -cp   参数;运行时还要到控制台下去使用   java   命令来运行,如果需要直接双击运行必须写   Windows   的批处理文件   (.bat)   或者   Linux   的   Shell   程序。因此,许多人说,Java   是一种方便开发者苦了用户的程序设计语言。  
    
  其实不然,如果开发 者能够制作一个可执行的   JAR   文件包交给用户,那么用户使用起来就方便了。在   Windows   下安装   JRE   (Java   Runtime   Environment)   的时候,安装文件会将   .jar   文件映射给   javaw.exe   打开。那么,对于一个可执行的   JAR   文件包,用户只需要双击它就可以运行程序了,和阅读   .chm   文档一样方便   (.chm   文档默认是由   hh.exe   打开的)。那么,现在的关键,就是如何来创建这个可执行的   JAR   文件包。  
posted @ 2010-04-09 17:00 新蜂 阅读(148) | 评论 (0)编辑 收藏
85 90 212
posted @ 2010-04-08 23:01 新蜂 阅读(207) | 评论 (1)编辑 收藏
Jiri Mares wrote:

Hi,

I'm trying to change font size for my package explorer and it's not working. Is it right or not (I tried to find such a bug but I didn't).

It's based on the font of your OS. You'll have to change the font in the standard OS settings.


Dani
posted @ 2010-04-08 22:59 新蜂 阅读(416) | 评论 (0)编辑 收藏
Technically, an Eclipse application is a plug-in that creates an extension for the extension point org.eclipse.core.runtime.applications.
posted @ 2010-04-08 21:13 新蜂 阅读(146) | 评论 (0)编辑 收藏
JVM内存的设置的原理
 
默认的java虚拟机的大小比较小,在对大数据进行处理时java就会报错:java.lang.OutOfMemoryError。
设置jvm内存的方法,对于单独的.class,可以用下面的方法对Test运行时的jvm内存进行设置。
java -Xms64m -Xmx256m Test
-Xms是设置内存初始化的大小
-Xmx是设置最大能够使用内存的大小(最好不要超过物理内存大小)


Heap设定与垃圾回收
Java Heap分为3个区,Young,Old和Permanent。Young保存刚实例化的对象。当该区被填满时,GC会将对象移到Old区。 Permanent区则负责保存反射对象,本文不讨论该区。JVM的Heap分配可以使用-X参数设定,


-Xms
初始Heap大小
-Xmx
java heap最大值
-Xmn
young generation的heap大小
posted @ 2010-04-08 21:02 新蜂 阅读(190) | 评论 (0)编辑 收藏

在一些规模稍大的应用中,Java虚拟机(JVM)的内存设置尤为重要,想在项目中取得好的效率,GC(垃圾回收)的设置是第一步。

PermGen space:全称是Permanent Generation space.就是说是永久保存的区域,用于存放Class和Meta信息,Class在被Load的时候被放入该区域Heap space:存放Instance。

GC(Garbage Collection)应该不会对PermGen space进行清理,所以如果你的APP会LOAD很多CLASS的话,就很可能出现PermGen space错误

Java Heap分为3个区
1.Young
2.Old
3.Permanent

Young保存刚实例化的对象。当该区被填满时,GC会将对象移到Old区。Permanent区则负责保存反射对象,本文不讨论该区。

JVM的Heap分配可以使用-X参数设定,

-Xms
初始Heap大小

-Xmx
java heap最大值 

-Xmn
young generation的heap大小

JVM有2个GC线程
第一个线程负责回收Heap的Young区
第二个线程在Heap不足时, 遍历Heap,将Young 区升级为Older区

Older区的大小等于-Xmx减去-Xmn,不能将-Xms的值设的过大,因为第二 个线程被迫运行会降低JVM的性能。
为什么一些程序频繁发生GC?

有如下原因:
1.程序内调用了System.gc()或Runtime.gc()。
2.一些中间件软件调用自己的GC方法,此时需 要设置参数禁止这些GC。
3.Java的Heap太小,一般默认的Heap值都很小。
4.频繁实例化对象,Release对象 此时尽量保存并重用对象,例如使用StringBuffer()和String()。

如果你发现每次GC后,Heap的剩余空间会是总空间的50%,这表示你的Heap处于健康状态,许多Server端的Java程序每次GC后最好 能有65%的剩余空间

经验之谈:

1.Server端JVM最好将-Xms和-Xmx设为相同值。为了优化GC,最好让-Xmn值约等于-Xmx的1/3。
2.一个GUI程 序最好是每10到20秒间运行一次GC,每次在半秒之内完成。

注意:

1.增加Heap的大小虽然会降低GC的频率,但也增加了每次GC的时间。并且GC运行时,所有的用户线程将暂停,也就是GC期间,Java应用程 序不做任何工作。
2.Heap大小并不决定进程的内存使用量。进程的内存使用量要大于-Xmx定义的值,因为Java为其他任务分配内存,例如每 个线程的Stack等。

Stack的设定
每个线程都有他自己的Stack。

-Xss
每个线程的Stack大小

Stack的大小限制着线程的数量。如果Stack过大就好导致内存溢漏。-Xss参数决定Stack大小,例如-Xss1024K。如果 Stack太小,也会导致Stack溢漏。

硬件环境

硬件环境也影响GC的效率,例如机器的种类,内存,swap空间,和CPU的数量。
如果你的程序需要频繁创建很多transient对象, 会导致JVM频繁GC。这种情况你可以增加机器的内存,来减少Swap空间的使用。

4种GC

1、第一种为单线程GC,也是默认的GC,该GC适用于单CPU机器。
2、第二种为Throughput GC,是多线程的GC,适用于多CPU,使用大量线程的程序。第二种GC与第一种GC相似,不同在于GC在收集Young区是多线程的,但在Old区和第 一种一样,仍然采用单线程。-XX:+UseParallelGC参数启动该GC。
3、第三种为Concurrent Low Pause GC,类似于第一种,适用于多CPU,并要求缩短因GC造成程序停滞的时间。这种GC可以在Old区的回收同时,运行应用程序。 -XX:+UseConcMarkSweepGC参数启动该GC。
4、第四种为Incremental Low Pause GC,适用于要求缩短因GC造成程序停滞的时间。这种GC可以在Young区回收的同时,回收一部分Old区对象。-Xincgc参数启动该GC。

单文件的JVM内存进行设置

默认的java虚拟机的大小比较小,在对大数据进行处理时java就会报错:java.lang.OutOfMemoryError。
设置 jvm内存的方法,对于单独的.class,可以用下面的方法对Test运行时的jvm内存进行设置。
java -Xms64m -Xmx256m Test
-Xms是设置内存初始化的大小
-Xmx是设置最大能够使用内存的大小(最好不要超过物理内存大小)

tomcat启动jvm内存设置

Linux:

在/usr/local/apache-tomcat-5.5.23/bin目录下的catalina.sh添加:JAVA_OPTS='- Xms512m -Xmx1024m'要加“m”说明是MB,否则就是KB了,在启动tomcat时会报内存不足。
-Xms:初始值
-Xmx: 最大值
-Xmn:最小值Windows
在catalina.bat最前面加入
set JAVA_OPTS=-Xms128m -Xmx350m 如果用startup.bat启动tomcat,OK设置生效.够成功的分配200M内存.但是如果不是执行startup.bat启动tomcat而是 利用windows的系统服务启动tomcat服务,上面的设置就不生效了,就是说set JAVA_OPTS=-Xms128m -Xmx350m 没起作用.上面分配200M内存就OOM了..windows服务执行的是bin"tomcat.exe.他读取注册表中的值,而不是 catalina.bat的设置.解决办法:

修改注册表HKEY_LOCAL_MACHINE"SOFTWARE"Apache Software Foundation"Tomcat Service Manager"Tomcat5"Parameters"JavaOptions

原值为

-Dcatalina.home="C:"ApacheGroup"Tomcat 5.0"
-Djava.endorsed.dirs="C:"ApacheGroup"Tomcat 5.0"common"endorsed"
-Xrs加入 -Xms300m -Xmx350m

重起tomcat服务,设置生效

weblogic启动jvm内存设置

在weblogic中,可以在startweblogic.cmd中对每个domain虚拟内存的大小进行设置,默认的设置是在 commEnv.cmd里面。

JBoss

默认可以使用的内存为64MB
$JBOSSDIR$/bin/run.config
JAVA_OPTS = "-server -Xms128 -Xmx512"

Eclipse

在所在目录下,键入
eclipse.exe -vmargs -Xms256m -Xmx512m
256m表示JVM堆内存最 小值
512m表示JVM堆内存最大

Websphere

进入控制台去设置:应用程序服务器 > server1 > 进程定义 > Java 虚拟机

posted @ 2010-04-08 21:02 新蜂 阅读(617) | 评论 (1)编辑 收藏
仅列出标题  下一页
<2024年3月>
252627282912
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿

随笔分类

随笔档案

文章档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜