sunchaohui_koko
sunchaohui_koko · 共 40 篇文章
Java中根据模板导出数据到word的解决方案
我们需求如下:给你一个模板,里面有一个表格,标题已经给好,程序主要就是完成把数据填写到word中并提供给用户下载。 网上找了很久,发现主要两种开源包:POI和Jacob,Jacob首先被否决掉了,因为他最后必须运行在windows平台上。Excel导入导出我就是用的POI,但是POI中的word操作实在不行,读取还可以,写入数据远不能满足项目的需要。后面尝试诸如生成PDF然后转Word,生成XML转Word,生成Html转word,生成rtf转word。这些都是可行的办法,但是网上开源包的功能有限,iText对PDF操作是很强,但是对PDF内容的解析不行。 最后这个事情拖了四天,我看文档的时…
2010-02-25 10:06 · java · 评论(0) · Java · velocity · .net · Bean · Excel
SQL树查询
引用: --测试数据 深度排序 DECLARE @t TABLE(ID char(3),PID char(3),Name nvarchar(10)) INSERT @t SELECT '001',NULL ,'山东省' UNION ALL SELECT '002','001','烟台市' UNION ALL SELECT '004','002','招远市' UNION ALL SELECT '003','001','青岛市' UNION ALL SELECT '005',NULL ,'四会市' UNION ALL SELECT '006','005','清远市' UNION ALL SELE…
2010-02-24 17:36 · java · 评论(0) · Go · Blog · SQL · .net · F#
基于java的程序OutOfMemory问题的解决及Xms/Xmx/Xss的解释和应用
长期以来一直都是做java应用的开发,所使用的开发工具基本上也都是基于java的,经常用的有eclipse, netbeans, ant, maven, cruisecontrol, tomcat, findbugs等。在使用这些工具的时候,有时候会碰到OutOfMemory的问题。 问题 -------------------------------------------------------------------------------- 一般在遇到这个问题的时候,我们的第一印象是:一定是机器的内存不够用了。 可是通过进程管理器查看,物理内存都还有好多空余呢,根本就没有被占满。 那…
2010-02-24 16:44 · java · 评论(0) · 应用服务器 · Java · Eclipse · maven · Ant
老外的lovcombo 使用注意点
{ xtype : 'lovcombo', fieldLabel : '通知到达人与新生儿关系', width : 250, store:dstorehr02_18_001, name : 'hr02_18_001', valueField : "code", displayField : "name", mode : 'local', triggerAction : 'all', beforeBlur : function() { } } 没有 beforeBlur 的覆盖,会使得出现莫名其妙的错误,譬如,鼠标离开控件时,上面的值就自动清除啦
2009-10-13 17:07 · EXT · 评论(1)
XTemplate
XTemplate是Extjs里面的模板组件. 下面我们看个最简单的例子. 效果图: js代码: <!-- Code highlighting produced by Actipro CodeHighlighter (freeware) -->Ext.onReady(function(){ //数据源 var data={ name:"博客园", read:[{ book:'<<道不远人>>', date:'2007-7-7' },{ book:"<<大话设计模式>>", date:"2006-6-6" }] } //呈现组件 var mypanel=new Ext.Panel({ widt…
2009-09-27 15:14 · EXT · 评论(0) · CSS · Ajax · EXT · json · 设计模式
fckedit
http://www.blogjava.net/chengang/archive/2007/08/25/139287.html <noscript type="text/javascript"></noscript> Download and extract the tar in your plugins directory Run ‘rake fckeditor:install’ from the root of your rails application Add to the layout / head of the page you wish to use the editor on…
2009-01-13 13:01 · rails · 评论(0) · fckeditor · Ajax · .net · Rails · JavaScript
login_engine
http://svn.rails-engines.org/plugins/login_engine/README = Before we start This is a Rails Engine version of the Salted Login Generator, a most excellent login system which is sufficient for most simple cases. For the most part, this code has not been altered from its generator form, with the follo…
2009-01-13 11:10 · rails · 评论(0) · Flash · MySQL · Rails · Security · SVN
attachment_fu plug
Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp. C:\Documents and Settings\sunchaohui>cd D:\radrails-0.7.2-win32\workspace\mm C:\Documents and Settings\sunchaohui>d: D:\radrails-0.7.2-win32\workspace\mm>ruby script/plugin install attachment_fu svn: No repository found in 'svn:/…
2009-01-07 12:06 · rails · 评论(0) · EXT · Ruby · XP · Rails · SVN
acts_as_attachme
http://techno-weenie.net/articles/acts_as_attachment
2009-01-07 09:22 · rails · 评论(0) · .net
安装action_mailer_tls
ruby script/plugin install http://svn.xlsuite.org/trunk/vendor/plugins/action_mailer_tls/ http://code.openrain.com/rails/action_mailer_tls
2009-01-06 18:14 · rails · 评论(0) · Ruby · Rails · SVN
日志:get_tree 方法加强快照,十分注意",:method=>:get参数
module DepartmentsHelper def get_tree(trees, parent) tree_html = ""; trees.each do |tree| if tree.is_root? tree_html += "var tree_#{tree.id} = new WebFXTreeItem('#{tree.name}',\"javascript:link_to_remote_#{tree.id}()\");\r\n" tree_html +="function link_to_remote_#{tree.id}(){#{remote_function :url=…
2008-12-26 14:10 · rails · 评论(0) · HTML · JavaScript
日志:plugin discover终于能够plugin install 了啊,小东西还是挺有用的
D:\radrails-0.7.2-win32\workspace\cms>ruby script\plugin discover Add http://www.agilewebdevelopment.com/plugins/ ? [Y/n] y Add svn://rubyforge.org/var/svn/expressica/plugins/? [Y/n] y Add http://soen.ca/svn/projects/rails/plugins/ ? [Y/n] y Add http://technoweenie.stikipad.com/plugins/ ? [Y/n] y A…
2008-12-25 14:38 · rails · 评论(0) · CMS · Ruby · .net · Rails · SVN
ImageMagick + fleximage
参考: http://rmagick.rubyforge.org/install-faq.html How do I install RMagick on Microsoft Windows? Use the rmagick-win32 gem. This gem is bundled with a a copy of the ImageMagick Windows installer so you don't need to download your own copy. Download the rmagick-win32 gem from the RMagick project pag…
2008-12-23 17:33 · rails · 评论(0) · HTML · PHP · Windows · .net · Microsoft