 2007年3月7日
	2007年3月7日		  
		
						
			http://ubuntu.dormforce.net/使用说明
 打开Software Manager,点击Edit⇒Software Sources 
 在Download from中选择Other 
 选择China⇒mirrors.ustc.edu.cn 
 点击Choose Server 
			
			
		 
	
		
						
			a wonderful Eclipse plugin:        
WindowBuilder, which can be used to develope       Swing/SWT UI:          
       WindowBuilder is built as a plug-in to Eclipse and the       various Eclipse-based IDEs (RAD, RSA, MyEclipse, JBuilder,       etc.). The plug-in builds an abstract syntax tree (AST) to       navigate the source code and uses GEF to display and manage       the visual presentation.     
            Develop Java graphical user interfaces in minutes for       Swing, SWT, RCP and XWT with WindowBuilder Pro's WYSIWYG,       drag-and-drop interface. Use wizards, editors and intelligent       layout assist to automatically generate clean Java code, with       the visual design and source always in sync.     
            The project website: http://www.eclipse.org/windowbuilder/     
            To install the plugin in Eclipse: http://www.eclipse.org/windowbuilder/download.php     
             
     
 
	
		
						
			Example:
 abc  1000   3452   2463   2343   2176   7654   3452   8765   5643   3452
 abc  1000   3452   2463   2343   2176   7654   3452   8765   5643   3452
 tas   3420   3562   2123   1343   2176   7654   3252   8765   5643   3452
 aer   1000   3452   2463   2343   2176   7654   3452   8765   5643   3452
 tas   3420   3562   2123   1343   2176   7654   3252   8765   5643   3452
UNIX:display the no of occurance and the record
> sort f1.txt|uniq -c
   2 abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
   1 aer 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
   2 tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452
display only the duplicate records
> sort f1.txt|uniq -dabc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452
display distinct records
> sort f1.txt|uniqabc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
aer 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452
Reference:
Shell: How To Remove Duplicate Text Lines
Windows:
Notepad++ can sort by line, and remove the duplicate lines at the same time. 
- Open the menu under: TextFX-->TextFX Tools
- Make sure "sort outputs only unique..." is checked 
- select a block  of text (ctrl-a to select the entire document). 
- click "sort lines  case sensitive"  or "sort lines case insensitive" 
  
	
		
						
			1.安装JAVA环境
sudo apt-get install sun-java5-jre
2.下载tomcat: http://tomcat.apache.org/
3.解压tomcat
$sudo tar zxvf apache-tomcat-7.0.26.tar.gz -C /opt 
 $sudo mv /opt/apache-tomcat-7.0.26.tar.gz /opt/tomcat
4.启动tomcat
$sudo /opt/tomcat/bin/startup.sh
如果能看到下列提示,就表明启动成功了!
>Using CATALINA_BASE:   /opt/tomcat 
 >Using CATALINA_HOME:   /opt/tomcat 
 >Using CATALINA_TMPDIR: /opt/tomcat/temp 
 >Using JRE_HOME:       /usr/lib/j2sdk1.5-sun
打开Firefox,在地址栏中输入http://localhost:8080,如果出来Tomcat的缺省界面,说明测试通过!
5.停止Tomcat服务
$sudo /opt/tomcat/bin/shutdown.sh
			
			
		 
	
		
						
			1.下载安装 RubyInstaller: http://rubyforge.org/frs/?group_id=167&release_id=46588
2. 检查 RubyGems 版本,须高于 1.3.6
gem -v
3.如果版本不是最新,可以通过下面的命令更新至最新版本:
gem update --system
gem uninstall rubygems-update
4.安装 Rails:
gem install rails
 
	
		
						
			 1.按照github上的指南配置(
http://help.github.com/win-set-up-git/)基础的git环境。 
 2.在github上创建一个Repository。 
 3.在Eclipse中通过“Eclipse Marketplaces”,在Market Places里安装egit。 
 4.在Eclipse中生public key, 并添加到GitHub Repository中。
 Eclipse中通过:performance -> SSH2 -> Key Management -> Gernerate RSA Key 生成 SSH 的 public key。
在GitHub中通过:edit your profile -> ssh key -> Add SSH Key 添加SSH Key, 把上面生成的 public key 拷贝到这里,保存。
5.Eclipse里File菜单,Import,即可从git导入刚添加到git的项目了。  
6.修改,并提交。在项目上点右键–>team–>commit。commit是commit到本机的git库,而push才是同步到github。			
			
		
 
	
		
						
			 1.下载最新版 Eclipse:
官方下载:http://www.eclipse.org/downloads/
2.解压下载的压缩包:
$sudo tar xvfz eclipse-SDK-3.1.2-linux-gtk.tar.gz -C /opt
这个时候,就可以在 /opt 文件夹中看到出现了一个eclipse的文件夹,双击其中的eclipse文件就可以运行eclipse了。
3.在菜单设置Eclipse选项:    $gedit ~/.local/share/applications/eclipse-user.desktop
     
 插入一下内容:
     [Desktop Entry]
Comment=Java IDE
Name=Eclipse
Exec=/opt/eclipse/eclipse
Encoding=UTF-8
Terminal=false
Type=Application
Categories=Application;Development;
Icon=/opt/eclipse/icon.xpm 
     
       
	
		
						
			方法1: 用SET PASSWORD命令 
  mysql -u root 
  mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); 
方法2:用mysqladmin 
  mysqladmin -u root password "newpass" 
  如果root已经设置过密码,采用如下方法 
  mysqladmin -u root password oldpass "newpass" 
方法3: 用UPDATE直接编辑user表 
  mysql -u root 
  mysql> use mysql; 
  mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root'; 
  mysql> FLUSH PRIVILEGES; 
方法4: 在丢失root密码的时候,可以这样 
  mysqld_safe --skip-grant-tables& 
  mysql -u root mysql 
  mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='root'; 
  mysql> FLUSH PRIVILEGES; 
--------------------------------------- 
经测试,方法三修改成功,其他三种方法没有测试。
			
			
		 
	
		
						
			一.问题环境: 
  Eclipse3.4 + Tomcat6.0.20 
二.问题现象: 
  在Eclipse下启动Tomcat6时,控制台会有下面警告信息 
  警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:...' did not find a matching property. 
三.详细解决办法: 
   1.打开服务器视图:窗口 > 显示视图 > 服务器 > 服务器 
   2.双击服务器列表中的Tomcat,打开“服务器概述”窗口 
   3.选中"Publish module contexts to separate XML files"选项。 
   小提示:如果Tomcat处于启动状态,请先停止,否则,在保存服务器设置时,提示不能保存。
			
			
		 
	
		
						
			Here is a simple way to generate a analyze report by using FindBugs plugins in RSA:  
 - Using FindBugs to scan the code and save the result as XML file
 - the XML report is in a bad format for reading, we can use XSL file to make it easy and clear to read:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="summary.xsl"?>
  - Use Internet Explore to open the XML report, now we get a report:
Note: FindBugs provided following xsl files for different format:  1、default.xsl;
2、fancy.xsl;
3、fancy-hist.xsl;
4、plain.xsl;
5、summary.xsl;
			
			
		 
	
		
						
			     摘要: GZIP 
1. Compressing a File in the GZIP Format
2. Uncompressing a File in the GZIP Format
ZIP 
1. Creating a ZIP File
2. Listing the Contents of a ZIP File
3. Retrieving a Compressed File from a ZIP File   
阅读全文			
			
		 
	
		
						
			     摘要: 使用 JSEclipse,JavaScript 程序员现在有了自己的 Eclipse 插件,该插件将提供许多重要功能来辅助开发 JavaScript 应用程序。像 Eclipse 多年来为 Java™ 语言和其他语言提供了易用性一样,JSEclipse 为 JavaScript 开发人员提供了同样的优点。  
阅读全文			
			
		 
	
		
						
			
		分享一个不错的编写properties文件的Eclipse插件(plugin),有了它我们在编辑一些简体中文、繁体中文等
Unicode文本时,就不必再使用native2ascii编码了。您可以通过Eclipse中的软件升级(Software
Update)安装此插件,步骤如下:
		
				1、展开Eclipse的Help菜单,将鼠标移到Software Update子项,在出现的子菜单中点击Find and Install;
2、在Install/Update对话框中选择Search for new features to install,点击Next;
3、在Install对话框中点击New Remote Site;
4、在New Update Site对话框的Name填入“PropEdit”或其它任意非空字符串,在URL中填入http://propedit.sourceforge.jp/eclipse/updates/;
5、在Site to include to search列表中,除上一步加入的site外的其它选项去掉,点击Finsih;
6、在弹出的Updates对话框中的Select the features to install列表中将所有结尾为“3.1.x”的选项去掉(适用于Eclipse 3.2版本的朋友);
7、点击Finish关闭对话框;
8、在下载后,同意安装,再按提示重启Eclipse,在工具条看到形似vi的按钮表示安装成功,插件可用。此时,Eclpise中所有properties文件的文件名前有绿色的P的图标作为标识。 
		
			
			
		 
	
		
						
			     摘要: 在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下:  
阅读全文			
			
		 
	
		
						
			     摘要: 要對資料庫管理系統進行操作,最基本的就是使用SQL(Standard Query Language)語句,大部份的資料庫都支援標準的SQL語句,然而也有一些特定於資料庫的SQL語句,應用程式配合SQL語句進行資料庫查詢時,若使用到特定於資料庫的SQL語句,程式本身會有相依於特定資料庫的問題。
使用Hibernate時,即使您不了解SQL的使用與撰寫,也可以使用它所提供的API來進行SQL語句查詢,org.hibernate.Criteria對SQL進行封裝,您可以從Java物件的觀點來組合各種查詢條件,由Hibernate自動為您產生SQL語句,而不用特別管理SQL與資料庫相依的問題。  
阅读全文			
			
		 
	
		
						
			
		
				整理自: 
				
						SpringSide中文论坛
				
				
				
						
				
		
		实际执行任务的Class: CourseService
		
				
						
								 
								 public
								 
								class
								 CourseService
								public
								 
								class
								 CourseService 
								
										 {
								
						
				
				
						
								
										{ 


 public
										 
										void
										 sendCourseEnrollmentReport()
  
										public
										 
										void
										 sendCourseEnrollmentReport()
										
												 {
										
								
						
						
								
										
												{ 
 System.out.println(
												"
												HelloWorld
												"
										
								
								
										);
    System.out.println(
												"
												HelloWorld
												"
										
								
								
										); 
 }
  }
								
						
						
								 

 }
}
						
				
		 
		
		调度任务的Class: TaskApp
		
				
						
								 import
						
				
				
						
								 org.springframework.beans.factory.BeanFactory;
								import
						
				
				
						
								 org.springframework.beans.factory.BeanFactory; 
 import
						
				
				
						
								 org.springframework.beans.factory.xml.XmlBeanFactory;
								import
						
				
				
						
								 org.springframework.beans.factory.xml.XmlBeanFactory; 
 import
						
				
				
						
								 org.springframework.core.io.FileSystemResource;
								import
						
				
				
						
								 org.springframework.core.io.FileSystemResource; 


 public
								 
								class
								 TaskApp
								public
								 
								class
								 TaskApp 
								
										 {
								
						
				
				
						
								
										{ 


 public
										 
										static
										 
										void
										 main(String[] args) 
										throws
										 Exception
  
										public
										 
										static
										 
										void
										 main(String[] args) 
										throws
										 Exception 
										
												 {
										
								
						
						
								
										
												{ 
 BeanFactory factory 
												=
												 
												new
												 XmlBeanFactory(
												new
												 FileSystemResource( 
												"
												WebRoot/WEB-INF/classes/scheduleTask.xml
												"
										
								
								
										
												));
    BeanFactory factory 
												=
												 
												new
												 XmlBeanFactory(
												new
												 FileSystemResource( 
												"
												WebRoot/WEB-INF/classes/scheduleTask.xml
												"
										
								
								
										
												)); 
 factory.getBean(
												"
												z
												"
										
								
								
										);
    factory.getBean(
												"
												z
												"
										
								
								
										); 
 }
  }
								
						
						
								 
 
    
 }
}
						
				
				
						 
				
		 
		
		配置调度执行任务的配置文件: 
		
				scheduleTask.xml
		
		
				
						
								 <?
								xml version="1.0" encoding="UTF-8"
								?>
								<?
								xml version="1.0" encoding="UTF-8"
								?>
						
				
				
						
								 
 <!
								DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"
								>
								<!
								DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"
								>
						
				
				
						
								 
 <
								beans
								>
								<
								beans
								>
						
				
				
						
								 
 <!--
								起动Bean
								-->
  
								<!--
								起动Bean
								-->
						
				
				
						
								 
 <
								bean 
								id
								="z"
								 class
								="org.springframework.scheduling.quartz.SchedulerFactoryBean"
								>
  
								<
								bean 
								id
								="z"
								 class
								="org.springframework.scheduling.quartz.SchedulerFactoryBean"
								>
						
				
				
						
								 
 <
								property 
								name
								="triggers"
								>
    
								<
								property 
								name
								="triggers"
								>
						
				
				
						
								 
 <
								list
								>
      
								<
								list
								>
						
				
				
						
								 
 <
								ref 
								bean
								="cronReportTrigger"
								 
								/>
    
								<
								ref 
								bean
								="cronReportTrigger"
								 
								/>
						
				
				
						
								 
 </
								list
								>
      
								</
								list
								>
						
				
				
						
								 
 </
								property
								>
    
								</
								property
								>
						
				
				
						
								 
 </
								bean
								>
  
								</
								bean
								>
						
				
				
						
								 
 <!--
								实际的工作Bean
								-->
  
								<!--
								实际的工作Bean
								-->
						
				
				
						
								 
 <
								bean 
								id
								="courseService"
								 class
								="CourseService"
								>
  
								<
								bean 
								id
								="courseService"
								 class
								="CourseService"
								>
						
				
				
						
						
								 </
								bean
								>
  
				
				
						
								</
								bean
								>
						
				
				
						
								 
 <!--
								jobBean用于设定启动时运用的Bean与方法
								-->
  
								<!--
								jobBean用于设定启动时运用的Bean与方法
								-->
						
				
				
						
								 
 <
								bean 
								id
								="scheduledReportJobDetail"
								 class
								="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
								>
  
								<
								bean 
								id
								="scheduledReportJobDetail"
								 class
								="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
								>
						
				
				
						
								 
 <
								property 
								name
								="targetObject"
								>
    
								<
								property 
								name
								="targetObject"
								>
						
				
				
						
								 
 <
								ref 
								bean
								="courseService"
								 
								/>
    
								<
								ref 
								bean
								="courseService"
								 
								/>
						
				
				
						
								 
 </
								property
								>
    
								</
								property
								>
						
				
				
						
								 
 <
								property 
								name
								="targetMethod"
								>
    
								<
								property 
								name
								="targetMethod"
								>
						
				
				
						
								 
 <
								value
								>
								sendCourseEnrollmentReport
								</
								value
								>
      
								<
								value
								>
								sendCourseEnrollmentReport
								</
								value
								>
						
				
				
						
								 
 </
								property
								>
    
								</
								property
								>
						
				
				
						
								 
 </
								bean
								>
  
								</
								bean
								>
						
				
				
						
								 
 <!--
								定时器设定起动频率&启动时间我设的是每5秒起动一次 (0 0 4 * * ?每日四点起动
  
								<!--
								定时器设定起动频率&启动时间我设的是每5秒起动一次 (0 0 4 * * ?每日四点起动 .)
								-->
.)
								-->
						
				
				
						
								 
 <
								bean 
								id
								="cronReportTrigger"
								 class
								="org.springframework.scheduling.quartz.CronTriggerBean"
								>
  
								<
								bean 
								id
								="cronReportTrigger"
								 class
								="org.springframework.scheduling.quartz.CronTriggerBean"
								>
						
				
				
						
								 
 <
								property 
								name
								="jobDetail"
								>
    
								<
								property 
								name
								="jobDetail"
								>
						
				
				
						
								 
 <
								ref 
								bean
								="scheduledReportJobDetail"
								 
								/>
    
								<
								ref 
								bean
								="scheduledReportJobDetail"
								 
								/>
						
				
				
						
								 
 </
								property
								>
    
								</
								property
								>
						
				
				
						
								 
 <
								property 
								name
								="cronExpression"
								>
    
								<
								property 
								name
								="cronExpression"
								>
						
				
				
						
								 
 <
								value
								>
								10,15,20,25,30,35,40,45,50,55 * * * * ?
								</
								value
								>
      
								<
								value
								>
								10,15,20,25,30,35,40,45,50,55 * * * * ?
								</
								value
								>
						
				
				
						
								 
 </
								property
								>
    
								</
								property
								>
						
				
				
						
								 
 </
								bean
								>
  
								</
								bean
								>
						
				
				
						
								 
 </
								beans
								>
								</
								beans
								>
						
				
		 
		
		关于配置文件中参数cronExpression的说明:
		
				
						 字段 允许值 允许的特殊字符
				
				
						
								字段 允许值 允许的特殊字符 
 秒 
								0
								-
								59
								 
								,
						
				
				
						
								 - * /
秒 
								0
								-
								59
								 
								,
						
				
				
						
								 - * / 
 分 
								0
								-
								59
								 
								,
						
				
				
						
								 - * /
分 
								0
								-
								59
								 
								,
						
				
				
						
								 - * / 
 小时 
								0
								-
								23
								 
								,
						
				
				
						
								 - * /
小时 
								0
								-
								23
								 
								,
						
				
				
						
								 - * / 
 日期 
								1
								-
								31
								 
								,
						
				
				
						
								 - * ? / L W C
日期 
								1
								-
								31
								 
								,
						
				
				
						
								 - * ? / L W C 
 月份 
								1
								-
								12
								 或者 JAN-DEC 
								,
						
				
				
						
								 - * /
月份 
								1
								-
								12
								 或者 JAN-DEC 
								,
						
				
				
						
								 - * / 
 星期 
								1
								-
								7
								 或者 SUN-SAT 
								,
						
				
				
						
								 - * ? / L C #
星期 
								1
								-
								7
								 或者 SUN-SAT 
								,
						
				
				
						
								 - * ? / L C # 
 年(可选) 留空
								,
								 
								1970
								-
								2099
								 
								,
								 - * /
年(可选) 留空
								,
								 
								1970
								-
								2099
								 
								,
								 - * / 
						
				
		 
		
		表达式意义:
		
				
						
								 "
								0 0 12 * * ?
								"
						
				
				
						
								 每天中午12点触发
								"
								0 0 12 * * ?
								"
						
				
				
						
								 每天中午12点触发 
 "
								0 15 10 ? * *
								"
						
				
				
						
								 每天上午10:15触发
								"
								0 15 10 ? * *
								"
						
				
				
						
								 每天上午10:15触发 
 "
								0 15 10 * * ?
								"
						
				
				
						
								 每天上午10:15触发
								"
								0 15 10 * * ?
								"
						
				
				
						
								 每天上午10:15触发 
 "
								0 15 10 * * ? *
								"
						
				
				
						
								 每天上午10:15触发
								"
								0 15 10 * * ? *
								"
						
				
				
						
								 每天上午10:15触发 
 "
								0 15 10 * * ? 2005
								"
						
				
				
						
								 2005年的每天上午10:15触发
								"
								0 15 10 * * ? 2005
								"
						
				
				
						
								 2005年的每天上午10:15触发 
 "
								0 * 14 * * ?
								"
						
				
				
						
								 在每天下午2点到下午2:59期间的每1分钟触发
								"
								0 * 14 * * ?
								"
						
				
				
						
								 在每天下午2点到下午2:59期间的每1分钟触发 
 "
								0 0/5 14 * * ?
								"
						
				
				
						
								 在每天下午2点到下午2:55期间的每5分钟触发
								"
								0 0/5 14 * * ?
								"
						
				
				
						
								 在每天下午2点到下午2:55期间的每5分钟触发 
 "
								0 0/5 14,18 * * ?
								"
						
				
				
						
								 在每天下午2点到2:55期间和下午6点到6:55期间的每5分钟触发
								"
								0 0/5 14,18 * * ?
								"
						
				
				
						
								 在每天下午2点到2:55期间和下午6点到6:55期间的每5分钟触发 
 "
								0 0-5 14 * * ?
								"
						
				
				
						
								 在每天下午2点到下午2:05期间的每1分钟触发
								"
								0 0-5 14 * * ?
								"
						
				
				
						
								 在每天下午2点到下午2:05期间的每1分钟触发 
 "
								0 10,44 14 ? 3 WED
								"
						
				
				
						
								 每年三月的星期三的下午2:10和2:44触发
								"
								0 10,44 14 ? 3 WED
								"
						
				
				
						
								 每年三月的星期三的下午2:10和2:44触发 
 "
								0 15 10 ? * MON-FRI
								"
						
				
				
						
								 周一至周五的上午10:15触发
								"
								0 15 10 ? * MON-FRI
								"
						
				
				
						
								 周一至周五的上午10:15触发 
 "
								0 15 10 15 * ?
								"
						
				
				
						
								 每月15日上午10:15触发
								"
								0 15 10 15 * ?
								"
						
				
				
						
								 每月15日上午10:15触发 
 "
								0 15 10 L * ?
								"
						
				
				
						
								 每月最后一日的上午10:15触发
								"
								0 15 10 L * ?
								"
						
				
				
						
								 每月最后一日的上午10:15触发 
 "
								0 15 10 ? * 6L
								"
						
				
				
						
								 每月的最后一个星期五上午10:15触发
								"
								0 15 10 ? * 6L
								"
						
				
				
						
								 每月的最后一个星期五上午10:15触发 
 "
								0 15 10 ? * 6L 2002-2005
								"
						
				
				
						
								 2002年至2005年的每月的最后一个星期五上午10:15触发
								"
								0 15 10 ? * 6L 2002-2005
								"
						
				
				
						
								 2002年至2005年的每月的最后一个星期五上午10:15触发 
 "
								0 15 10 ? * 6#3
								"
						
				
				
						
								 每月的第三个星期五上午10:15触发
								"
								0 15 10 ? * 6#3
								"
						
				
				
						
								 每月的第三个星期五上午10:15触发 
 0
								 
								6
						
				
				
						
								 * * *          每天早上6点
								0
								 
								6
						
				
				
						
								 * * *          每天早上6点  
 0
								 */
								2
						
				
				
						
								 * * *        每两个小时
								0
								 */
								2
						
				
				
						
								 * * *        每两个小时  
 0
								 
								23
								-
								7
								/
								2
								,
								8
						
				
				
						
								 * * *  晚上11点到早上8点之间每两个小时,早上八点
								0
								 
								23
								-
								7
								/
								2
								,
								8
						
				
				
						
								 * * *  晚上11点到早上8点之间每两个小时,早上八点  
 0
								 
								11
								 
								4
								 * 
								1
								-
								3
						
				
				
						
								       每个月的4号和每个礼拜的礼拜一到礼拜三的早上11点
								0
								 
								11
								 
								4
								 * 
								1
								-
								3
						
				
				
						
								       每个月的4号和每个礼拜的礼拜一到礼拜三的早上11点  
 0
								 
								4
								 
								1
								 
								1
								 *          1月1日早上4点
								0
								 
								4
								 
								1
								 
								1
								 *          1月1日早上4点 
						
				
		 
		
		
				Download:
		
				Quartz
		
		
		
		
				相关文档:
		
				http://blog.csdn.net/ezerg/archive/2004/09/24/115894.aspx
		
		
		
				http://blog.csdn.net/yujiebo025/archive/2005/09/13/479049.aspx
		
		
		
				http://blog.csdn.net/mengz/archive/2005/01/13/252267.aspx
		
		
		
				http://blog.csdn.net/jorwang/archive/2005/05/12/374111.aspx
		
		
		
				http://blog.csdn.net/Mailbomb/archive/2005/10/26/517128.aspx
		
		
		
				http://blog.csdn.net/stonecai/archive/2007/01/06/1475745.aspx
		
		
		
				http://landerchan.spaces.live.com/Blog/cns!8759A7C5A9737DC!116.entry
		
		
		
				http://hanxinyu.javaeye.com/blog/37000
		
		
		
				http://www.onjava.com/pub/a/onjava/2004/03/10/quartz.html
		
		
			
			
		 
	
		
						
			     摘要: JDK 5 新增一些特性来简化开发,这些特性包括泛型,for-each 循环,自动装包/拆包,枚举,可变参数, 静态导入 。使用这些特性有助于我们编写更加清晰,精悍,安全的代码。  
阅读全文			
			
		 
	
		
						
			
				
						 <
						ec:table 
						items
						="itemList"
						 var
						="item"
						 action
						="${pageContext.request.contextPath}/query.do"
						<
						ec:table 
						items
						="itemList"
						 var
						="item"
						 action
						="${pageContext.request.contextPath}/query.do"
				
				
						
						
								 retrieveRowsCallback
						
				
				
						
								="limit"
								retrieveRowsCallback
						
				
				
						
								="limit"
						
				
				
						
								 
 filterRowsCallback
								="limit"
filterRowsCallback
								="limit"
						
				
				
						
								 
 sortRowsCallback
								="limit"
						
						 
						>
sortRowsCallback
								="limit"
						
						 
						>
				
				
						
						
								 <
						ec:exportXls 
						fileName
						="CouponList.xls"
						 tooltip
						="导出 Excel"
						/>
  
				
				
						<
						ec:exportXls 
						fileName
						="CouponList.xls"
						 tooltip
						="导出 Excel"
						/>
				
				
						
						
								 <
						ec:row
						>
						
				
				
						<
						ec:row
						>
				
				
						
						
								 <
						ec:column 
						property
						="rowcount"
						 cell
						="rowCount"
						 sortable
						="false"
						 title
						="序号"
						/>
     
				
				
						<
						ec:column 
						property
						="rowcount"
						 cell
						="rowCount"
						 sortable
						="false"
						 title
						="序号"
						/>
				
				
						
						
								 <
						ec:column 
						property
						="id"
						 title
						="编号"
						/>
     
				
				
						<
						ec:column 
						property
						="id"
						 title
						="编号"
						/>
				
				
						
						
								 <
						ec:column 
						property
						="type"
						 title
						="种类"
						>
     
				
				
						<
						ec:column 
						property
						="type"
						 title
						="种类"
						>
				
				
						
						
								 ${typeMap[item.type]}
          ${typeMap[item.type]}
 </
						ec:column
						>
     
				
				
						</
						ec:column
						>
				
				
						
						
								 <
						ec:column 
						property
						="name"
						 title
						="名称"
						/>
     
				
				
						<
						ec:column 
						property
						="name"
						 title
						="名称"
						/>
				
				
						
						
								 <
						ec:column 
						property
						="beginDate"
						 title
						="开始时间"
						 cell
						="calendar"
						 format
						="date"
						 
						/>
     
				
				
						<
						ec:column 
						property
						="beginDate"
						 title
						="开始时间"
						 cell
						="calendar"
						 format
						="date"
						 
						/>
				
				
						
						
								 <
						ec:column 
						property
						="endDate"
						 title
						="结束时间"
						 cell
						="calendar"
						 format
						="date"
						 
						/>
     
				
				
						<
						ec:column 
						property
						="endDate"
						 title
						="结束时间"
						 cell
						="calendar"
						 format
						="date"
						 
						/>
				
				
						
						
								 <
						ec:column 
						property
						="state"
						 title
						="状态"
						>
     
				
				
						<
						ec:column 
						property
						="state"
						 title
						="状态"
						>
				
				
						
						
								 ${statusmap[coupon.status]}
        ${statusmap[coupon.status]}
 </
						ec:column
						>
     
				
				
						</
						ec:column
						>
				
				
						
						
								 <
						ec:column 
						property
						="edit"
						 title
						="操作"
						 sortable
						="false"
						 viewsAllowed
						="html"
     
				
				
						<
						ec:column 
						property
						="edit"
						 title
						="操作"
						 sortable
						="false"
						 viewsAllowed
						="html"
				
				
						
						
								 style 
				
				
						="width: 56px;text-align: center"
						>
                       style 
				
				
						="width: 56px;text-align: center"
						>
				
				
						
						
								 <
						A 
						href
						="<c:url value="
						/security/user.do?method
						=selectRoles&userId=${user.id}" 
						/>
						"> 
						<
				
				
						img
                 
				
				
						<
						A 
						href
						="<c:url value="
						/security/user.do?method
						=selectRoles&userId=${user.id}" 
						/>
						"> 
						<
				
				
						img
 src
						="<c:url value="
						/images/icon/16x16/manage.gif"
						/>
						" border="0"/> 
						</
						A
						>
                        
						src
						="<c:url value="
						/images/icon/16x16/manage.gif"
						/>
						" border="0"/> 
						</
						A
						>
				
				
						
						
								 </
						ec:column
						>
             
				
				
						</
						ec:column
						>
				
				
						
						
								 </
						ec:row
						>
         
				
				
						</
						ec:row
						>
				
				
						
						
								 </
						ec:table
						>
     
				
				
						</
						ec:table
						>
				
		 
		
		其中:
      
		
				retrieveRowsCallback="limit" 
     filterRowsCallback="limit" 
     sortRowsCallback="limit"
指定了callback函数 limit
在controller 中的处理:
		
				
						 /**
  
				
						
								/** 
						
						
								
								
										 * 列表查看
  * 列表查看
 */
						
						
								*/ 
						
				
				
						
						
								 
								 protected
						 
						void
						 onList(HttpServletRequest request,HttpServletResponse response, ModelAndView mav) 
						throws
						 Exception
						
				
				
						protected
						 
						void
						 onList(HttpServletRequest request,HttpServletResponse response, ModelAndView mav) 
						throws
						 Exception 
						
								 {
						
				
				
						
								{
 Limit limit 
								
										=
								
						
						
								
										 ExtremeTablePage.getLimit(request);
   Limit limit 
								
										=
								
						
						
								
										 ExtremeTablePage.getLimit(request);
										 Map map 
								=
								 WebUtils.getParametersStartingWith(request, 
								"
								search_
								"
						
						
								);
   Map map 
								=
								 WebUtils.getParametersStartingWith(request, 
								"
								search_
								"
						
						
								);
 Page page
								=
						
						
								service.queryForPage(map,ExtremeTablePage.getSort(limit),limit.getPage(), limit.getCurrentRowsDisplayed());
   Page page
								=
						
						
								service.queryForPage(map,ExtremeTablePage.getSort(limit),limit.getPage(), limit.getCurrentRowsDisplayed());
 mav.addObject(
								"
								itemList
								"
						
						
								, page.getResult());
   mav.addObject(
								"
								itemList
								"
						
						
								, page.getResult());
 mav.addObject(
								"
								totalRows
								"
						
						
								,page.getTotalCount());
   mav.addObject(
								"
								totalRows
								"
						
						
								,page.getTotalCount());
 }
} 
						
				
		 			
			
		 
	
		
						
			
		
				摘自: 
				
						chinaunix
				
				
						
								SELECT
								  S.SID SESSION_ID, S.USERNAME, DECODE(LMODE, 
								0
								, 
								'
								None
								'
								, 
								1
								, 
								'
								Null
								'
								, 
								2
								, 
								'
								Row-S (SS)
								'
								, 
								3
								, 
								'
								Row-X (SX)
								'
								,  
								4
								, 
								'
								Share
								'
								, 
								5
								, 
								'
								S/Row-X (SSX)
								'
								,  
								6
								, 
								'
								Exclusive
								'
								, TO_CHAR(LMODE)) MODE_HELD, DECODE(REQUEST, 
								0
								, 
								'
								None
								'
								, 
								1
								, 
								'
								Null
								'
								, 
								2
								, 
								'
								Row-S (SS)
								'
								, 
								3
								, 
								'
								Row-X (SX)
								'
								, 
								4
								, 
								'
								Share
								'
								, 
								5
								, 
								'
								S/Row-X (SSX)
								'
								, 
								6
								, 
								'
								Exclusive
								'
								, TO_CHAR(REQUEST)) MODE_REQUESTED, O.OWNER
								||
								'
								.
								'
								||
								O.
								OBJECT_NAME
								||
								'
								 (
								'
								||
								O.OBJECT_TYPE
								||
								'
								)
								'
						
						
								, S.TYPE LOCK_TYPE, L.ID1 LOCK_ID1, L.ID2 LOCK_ID2 
								FROM
						
						
								 V$LOCK L, SYS.DBA_OBJECTS O, V$SESSION S 
								WHERE
								 L.SID 
								=
								 S.SID 
								AND
								  L.ID1 
								=
								 O.
								OBJECT_ID
						
				
		 
		
		执行上记SQL语句,可以查寻到数据库中的锁的情报.
SESSION_ID, USERNAME,  MODE_HELD,  MODE_REQUESTED, OBJECT_NAME, LOCK_TYPE, LOCK_ID
分别是 拥有锁的SESSION_ID,拥有锁的USERNAME,锁的执行模式MODE_HELD,锁的请求MODE_REQUESTED,锁所在的数据库对象名
,锁的类型,锁的ID
			
			
		 
	
		
						
			     摘要: Java中的多线程使用synchronized关键字实现同步.为了避免线程中使用共享资源的冲突,当线程进入synchronized的共享对象时,将为共享对象加上锁,阻止其他的线程进入该共享对象.但是,正因为这样,当多线程访问多个共享对象时,如果线程锁定对象的顺序处理不当话就有可能线程间相互等待的情况,即常说的: 死锁现象.  
阅读全文			
			
		 
	
		
						
			     摘要: Java Socket简单入门例子.  
阅读全文			
			
		 
	
		
	
		
						
			
		Dear all: 
result love(boy, girl) 
{ 
  if ( boy.有房() and boy.有车() ) 
   {boy.set(nothing); 
    return girl.嫁给(boy); } 
		  if ( girl.愿意等() ) 
  { 
		while( ! (boy.赚钱 > 100,000 and girl.感情 > 8 ) 
   {for ( day=1; day <=365; day++) 
    {if ( day == 情人节 ) 
     if ( boy.give girl(玫瑰) ) 
      girl.感情++; 
     else 
      girl.感情--; 
     if( day == girl.生日) 
     if ( boy.give girl(玫瑰) ) 
      girl.感情++; 
     else 
      girl.感情--; 
      boy.拼命赚钱(); 
      } 
     } 
		  if ( boy.有房() and boy.有车() ) 
   { boy.set(nothing); 
 return girl.嫁给(boy); 
 } 
    年龄++; 
   girl.感情--; 
  return girl.goto( another_boy); 
} 
(注:稍懂点C语言的应该都能看懂吧!) 
			
			
		 
	
		
						
			     摘要: 组件(Component)类必须在类一级定义@Embeddable注解.
在特定的实体的关联属性上使@Embedded和@AttributeOverride注解可以覆盖该属性对应的嵌入式对象的字段映射:  
阅读全文			
			
		 
	
		
						
			     摘要: 1.简单主键:
使用@Id注解可以将实体bean中的某个属性定义为标识字段.使用 @GeneratedValue注解可以定义标识字段的生成策略:
AUTO - 可以是identity类型的字段,或者sequence类型或者table类型,取决于不同的底层数据库.
TABLE - 使用表保存id值
IDENTITY - identity字段
SEQUENCE - sequence  
阅读全文			
			
		 
	
		
						
			     摘要: 1. 基本属性映射
通过 @Basic 可以声明属性的存取策略:
@Basic(fetch=FetchType.EAGER)   即时获取(默认的存取策略)
@Basic(fetch=FetchType.LAZY)    延迟获取  
阅读全文