ITeye博客

jackdraw

jackdraw · 共 23 篇文章

关于solr QueryElevationComponent 的问题

版本 solr 1.4 在配置关于solr QueryElevationComponent的elevate.xml配置都正确,在一台机子上可以运行,另一台机子上去不可以运行,检查发现 当id 为sint 类型 的时候,QueryElevationComponent不能工作 另外根据elevate.xml注释 If this file is found in the config directory, it will only be loaded once at startup. If it is found in Solr's data directory, it will be re-lo…

2009-11-18 09:53 · 评论(0)

关于prototype与jquery 的一起协作问题

在项目中引用第三方的webEdit,由于此组件用到了prototype, 而我们对于ajax的处理是用jquery Lib ,主要是基于jquery 优美的框架哲学,但在使用的过程进导致webedit不能使用,由于prototype与jquery都有$ ,应该是由此引起,因为以此找到一个篇关于此的解决方案 记录如下 PrototypeAnd jquery Back Overview jquery gets a lot of its inspiration from the power behind the Prototype library. This is immediately noti…

2008-06-24 09:03 · 评论(2)

Tapestry上传多附件 [转]

以发送5个附件为实例: private IUploadFile file0; public IUploadFile getFile0() { return file0; } public void setFile0(IUploadFile value) { file0 = value; } protected void initialize() { file0 = null; } private IUploadFile file1; public IUploadFile getFile1() { return file1; } public void setFile1(IUploadFile…

2007-08-29 17:13 · 评论(0)

appfuse xdoclet 生成hbm.xml中的序列号

/** * @hibernate.id column="id" generator-class="sequence" type="long" unsaved-value="null" * @hibernate.generator-param name="sequence" value="s_role" */ public Long getId() { return id; } 结果 <!-- The generator-class attribute of @hibernate.id is deprecated, use the @hibernate.generator tag instea…

2007-08-25 09:11 · 评论(0)

使用Appfuse开发应用程序经常需要使用开发包中定义好的Ant 任务,这里是Ant 任务的详细说明:

使用 Appfuse开发应用程序经常需要使用开发包中定义好的Ant 任务,这里是Ant 任务的详细说明: 任务名 说明 bin 创建war程序包,jdbc驱动,和XML文件 checkstyle 检查代码是否符合代码规范要求 clean 清除制作好的各种产品 compile compile-web的别名 compile-dao 编译dao模块 compile-service 编译service模块 compile-web 编译web模块 copy-resources 从原程序目录中拷贝.properties和.xml文件 copy-web-files 拷贝静态文件 db-create 创建 …

2007-08-23 14:13 · 评论(0)

hibernate 关于中文查询

hibernate当中使用hql进行查询的时候,如果参数是中文,这hql打印为乱码。以前从来没有遇到过的问题,郁闷。经过无数次的尝试之后都无法解决,查找资料突然发现这个hibernate3的一个bug。在hibernate3当中使用antlr来解析hql,估计是这个的问题。 解决方法为: 1、采用占位符,然后setString 2、将 hibernate.query.factory_class 属性设置成 org.hibernate.hql.classic.ClassicQueryTranslatorFactory <script type="text/javascript"> // </s…

2007-08-21 14:05 · 评论(0)

appfuse 关于hbm的生成问题1

我的是1.9.3 appfuse的hbm文件是通过bean的注释生成的 如 /** * @hibernate.property column="buycount" length="20" */ 在id的时候要注意它的类型,oracle的话应该把type改为long

2007-08-21 11:01 · 评论(0)

使用appgen自动生成pojo

使用 Appfuse 自動生成Pojo和hbm檔 參考資源 使用 AppFuse 的七個理由 http://www.ibm.com/developerworks/cn/java/j- appfuse /index.html 使用 AppFuse 快速構建 J2EE 應用 http://www.ibm.com/developerworks/cn/java/j-lo- appfuse /index.html Appfuse 包含的東西很多,我們這邊只會主要是使用到 appgen 這個工具 1.準備好DB環境,這邊是使用 Oracle 。本來是想用DB2來測,可是出現了錯誤訊息:不支援的encor…

2007-08-21 08:37 · 评论(0)

基于oracle数据库的appfuse项目

终于搞定基于oracle数据库的appfuse项目 一、环境 1、appfuse1.9.4 2. jdk1.5 3. tomcat5.5 4.ant 1.7 二、环境变量设置 JAVA_HOME=你的jdk安装目录,例如: JAVA_HOME=C:\Program Files\Java\jdk1.5.0 ANT_HOME=你下载解压后的Ant目录,例如: ANT_HOME=F:\apache-ant-1.7.0 注意:要拷贝一个 junit.jar 到 %ANT_HOME%/lib 下,如果 lib 下没有 junit.jar,AppFuse 的脚本在运行时会给出警告信息。 CATALINA…

2007-08-20 17:25 · 评论(1)

关于多个文件上传

上传多个文件上传参阅了 http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/ http://www.flex888.com/2007/03/23/multiple-file-upload-with-ruby-on-rails-acts_as_attachment.html http://www.flex888.com/2007/03/23/multiple-file-upload-with-ruby-on-rails-acts_as_attach…

2007-07-21 10:00 · 评论(5)

再谈rRMagick与file column上传文件

在做文件上传的时候,参考了这篇文章, http://airport.iteye.com/blog/33216 由于其中少了一些步骤,所以弄了一个早上没有成功,现在把自己的过程记录如下 第一步,下载rmagick地址 http://rubyforge.org/frs/?group_id=12&release_id=12242 第二步,初始化, 由于我是windows是所以下载的是一个zip 包,解开有一个gem为后缀的 文件 gem install rmagick-1.14.1-win32.gem 然后就报gem install rmagick-1.14.1-win32.gem说明安装好了, …

2007-07-20 14:47 · 评论(1)

关于typo中tag中的keywords_to_tags

在用typo发布文章的时候我在标签栏如果我只填写一个词 jjj 的话 如果两个就不会有问题, 就会报 Tag expected, got NilClass错误,下面是tag中关于分词到tags表的一个方法 def keywords_to_tags Article.transaction do tags.clear keywords.to_s.scan(/((['"]).*?\2|[\.\w]+)/).collect do |x| x.first.tr("\"'", '') end.uniq.each do |tagword| tags << Tag.get(tagword) end end …

2007-07-18 08:50 · 评论(0)

批量增加更新原来如此

在想了好几天怎么去一个form如何更新两个关联表,回过来的却发现如此简单 原来我是这样子处理的,用传过去的params是一个[{"id"=>"12",name=>"jj"},{"id"=>"13",name=>"jsdj"}]这样的一个数组,然后动态的组装成update的语句,然后用一个conntection 今天看了base.rb的源码,原来批量更新是如何简单 用upate方法就可以了 java 代码 <% form_tag :action => 'create' do %> <% for @provide in @provides %> <ul class="listul"> <li c…

2007-07-16 14:01 · 评论(0)

关于apache 在2003中的运行错误

今天把服务器重启了一下,结果网站过了三四个小时就不能访问了,去看了错误日志 事件类型: 错误 事件来源: Apache Service 事件种类: 无 事件 ID: 3299 日期: 2007-7-14 事件: 8:37:38 用户: N/A 计算机: JJLOU 描述: The Apache service named reported the following error: >>> [Sat Jul 14 08:37:38 2007] [notice] Disabled use of AcceptEx() WinSock2 API . 有关更多信息,请参阅在 http://go.mic…

2007-07-14 08:52 · 评论(1)

wrong number of arguments (2 for 0) 错误

今天在想着怎么样来批量修改 params = [{"id=>"1" ,"name="jj"},{"id=>"2" ,"name="jssj"},{"id=>"4" ,"name="lou"}] 我想把他转换成根据id批量更新的方法然后我去查看base.rb的源码,发现下面这种代码 # Example of updating one record: # Person.update(15, {:user_name => 'Samuel', :group => 'expert'}) # # Example of updating multiple records: # people = { 1 =…

2007-07-13 18:45 · 评论(2)