2009 年文章归档
共 72 篇文章
删除file控件的内容
删除file控件的内容: [code="java"] [/code] 其中onclick="channel.select();document.execCommand('delete')"中的channel为对应file控件的id;
2009-05-15 17:24 · javascript · Java
WAITFOR DELAY使用
使用系统ps WAITFOR DELAY 设置延迟执行时间: select '1' WAITFOR DELAY '00:00:01'; --00:00:00 <=>hh:mm:ss select '2' 延时一秒钟执行第二条语句
2009-05-12 17:59 · sqlserver
Eclipse/MyEclipse快捷键失效
转自:http://hi.baidu.com/ujjboy/blog/item/31b7888fa7595bfc503d9214.html 装了个MyEclipse6.5,发现不能用快捷键Alt+/来提示代码了,google了一下,发现解决办法如下: 1、Eclipse下进入Windows ->Preperences ->General ->keys 2、把word completion的快捷键设置alt+/删掉! 3、把Content Assist的快捷键由ctrl+space改成alt+/ (ctrl+space一般被输入法占用) 4、window->Preferences->Java-…
2009-05-07 17:26 · eclipse · Java · Google · Myeclipse · Windows · Eclipse
java SimpleDateFormat sqlserver日期字段格式化
问题描述: 从sqlserver数据库中有时间字段值2009-05-31 17:00:00.000 取出到页面后得到 2009-05-31 17:00:00.0 解决方法: SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); format.format(rs.getTimestamp("BeginDate"));
2009-05-07 17:04 · Java · Java
javascript trim方法
在javascript中的string对象没有trim方法,所以trim功能需要自己实现: 代码如下: ﹤scriptlanguage=”javascript”﹥ /** *删除左右两端的空格 */ String.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, ''); } /** *删除左边的空格 */ String.prototype.ltrim=function() { return this.replace(/(^s*)/g,''); } /** *删除右边的空格 */ String.prototype…
2009-04-24 10:44 · javascript · Java · prototype · JavaScript
设置s:radio为默认选中
<s:radio name="free" list="#{'1':'是','0':'否'}" listKey="key" listValue="value" value="1"></s:radio> 其中value指定默认选中
2009-04-23 23:32 · struts 2.x
如何把resin安装成window service(windows服务)?
问题描述: 如何把resin安装成window service(windows服务)? 解决办法: 可以通过resin.exe的参数install和remove完成,例如: dos:> ${resin_home}\resin.exe -install dos:> ${resin_home}\resin.exe -remove 另外,安装时可以指定服务名,用以标明服务对应哪些应用application,例如: dos:> ${resin_home}\resin.exe -install-as dos:> ${resin_home}\resin.exe -remove-as dos:> ${re…
2009-04-17 14:47 · resin 3.x · Windows · DOS
native2ascii转换中文properties文件
问题描述: 在property文件中的中文,如果不经过encode的话,会以乱码的形式呈现; 解决办法: 可以通过${java_home}/jdk/bin下的native2ascii.exe来encode中文; 例如: 在dos下输入: native2ascii ApplicationResources.properties ApplicationResources_zh_CN.properties 这样就将中文encode成类似如下的字符串: errors.invalid={0} \u65E0\u6548\u3002
2009-04-13 20:37 · Java · Java · DOS · JDK
nexus-maven-repository-index.zip手动下载与设置
问题描述: 在启动eclipse的时候,在maven控制台经常会看到更新nexus-maven-repository-index.zip,用eclipse更新速度会很慢,甚至有不能完成下载的情况; 问题解决: 1.在你的eclipse里的这个配置会使你在启动eclipse的时候自动去更新: "window"->"preferences"->"MyEclipse Enterprise Workbeanch"->"Maven4MyEclipse"->"Maven"中能看到"Update Maven projects on startup"被打勾 2.手动去下载nexus-maven-reposi…
2009-04-11 20:37 · maven · Myeclipse · Eclipse · maven · IDE
Maven2.0.10学习笔记
2.7使用Maven Help插件: 在dos上输入:mvn help:describe -Dplugin=help -Dfull 会看到dos输出help插件的所有目标(golds),我使用的Maven版本是2.0.10,其有9个golds,分别为: help:active-profiles help:all-profiles help:describe help:effective-pom help:effective-settings help:evaluate help:expressions help:help help:system 控制台中输出了其对应的描述和可用参数; 在mv…
2009-04-11 19:18 · maven · junit · 项目管理 · maven · MySQL · DOS
org.maven.ide.eclipse\nexus\local\_a.fdx
1.问题描述: 在MyEclipse中使用MAVEN时,经常会报告如下错误: Error on adding indexing context central; ${workspace.metadata.plugins\org.maven.ide.eclipse\nexus\central_a.fdx (系统找不到指定的文件。) 2.解决方法: 删除 ${workspace}.metadata.plugins\org.maven.ide.eclipse这个目录 maven会自己重建索引的
2009-04-11 17:39 · maven · Myeclipse · Eclipse · maven · IDE
struts2中多action间传递ActionMessage,ActionError
问题描述: 在我的struts.xml中有如下片段 [code="java"] index [/code] 由于result type="redirect-action"所以index.action中获取不到delete方法中处理得到的ActionMessage,ActionError; 解决办法: 修改index为: index即可; result type的类型说明如下: Chain : 用来处理Action链 Dispatcher : 用来转向页面,通常处理JSP FreeMarker : 处理FreeMarker模板 HttpHeader : 用来控制特殊的Http行为 Redire…
2009-04-01 11:26 · struts 2.x · velocity · Struts · freemarker · XML · JSP