博文

目前显示的是 三月, 2013的博文

Maven 配置

Unzip the distribution archive, i.e. apache-maven-3.0.5-bin.zip to the directory you wish to install Maven 3.0.5. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.0.5 will be created from the archive. Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value C:\Program Files\Apache Software Foundation\apache-maven-3.0.5. Be sure to omit any quotation marks around the path even if it contains spaces. Note: For Maven   2.0.9, also be sure that the M2_HOME doesn't have a '\' as last character. In the same dialog, add the M2 environment variable in the user variables with the value %M2_HOME%\bin.Optional: In the same dialog, add the MAVEN_OPTS environment variable in the user variables to specify JVM properties, e.g. the …

Obj.toString()和String.valueOf(Obj)的区别

如果object为空,   Obj.toString() ,会出现Exception in thread "main" java.lang.NullPointerException


每日总结

String.format %s 替换字符串

ex:
 String.format("Test %s","suessful")

匹配字符串,使用忽略大小写的方法。


SQl:

oracle 获取当前时间 sysdate, 日期转换方法to_date("1900-01-01","YYYY-mm-dd")

MSSQl  getdate ,covent

mysql  now   dataformat("1900-01-01","%y-%m-%d")


Code Complete (1)

Chapter 18

18.1

表驱动法,

编码中,可以适当的将IF条件写入表中,来达到减少代码量,提供可读性和维护性。



18.2

直接访问表。