- 博客(59)
- 收藏
- 关注
原创 Reload an IFram with jQuery
Accessing the contentWindow property to obtain the location object.$('#iframe').each(function() { this.contentWindow.location.reload(true);});Callback for IFrame LoadingWith the onload even...
2008-10-02 09:13:40 154
原创 Reading XML with jQuery
1、sites.xml<?xml version="1.0" encoding="ISO-8859-1"?><sites> <site id="0"> <title>Think2Loud</title> <url>http://www.think2loud.c
2008-09-09 11:05:13 130
原创 Property configuration of dataSource
def props = new Properties()InputStream is = new BufferedInputStream(new FileInputStream("${System.getenv("SITEHOME")}/config/cms.properties"))props.load(is)is.close()environments { test { ...
2008-07-11 08:42:59 154
Writing the <g:if> tag in a tag library
The internal if/else tags that come with Grails translate directlyinto if(..) {} else {} at the syntax level to improve performance ofsuch core tags. But you can quite easily write if/else tag...
2008-06-24 11:51:52 110
Calling static methods on metaclass
1、MyClass with a static methodclass MyClass{ static processList(list) { // does something }} 2、Calling static met...
2008-06-15 09:37:26 83
List of all domain classes in BootStrap
import org.codehaus.groovy.grails.commons.ApplicationHolderclass BootStrap { def init = {servletContext -> ApplicationHolder.application.domainClasses.each() { println it...
2008-06-14 22:02:46 107
Grails ORM id generator in Oracle
默认自动建立名称为HIBERNATE_SEQUENCE的sequence,可以在domain里用以下方法指定: static mapping = { id generator: 'sequence', params: [sequence: 'seq_name'] }...
2008-06-14 20:18:53 117
Get applicationContext in Bootstrap
import org.codehaus.groovy.grails.commons.ApplicationAttributesdef ctx = servletContext.getAttribute(ApplicationAttributes.APPLICATION_CONTEXT) http://www.nabble.com/Bootstrap-and-application...
2008-06-14 20:00:04 100
Groovy字符串替换一例
将param替换成paramValue def queryContent = "select * from query where id=${param}"def regex = '\\$\\{param\\}'def matcher = (queryContent =~ /${regex}/)queryContent = matcher.replaceAll('paramValue')...
2008-06-12 17:11:29 4203
GORM many-to-many namimg convention
I have class named User and another one named Role and they arerelated to each other in a many-to-many way, a user has many roles andin a role there are many usersBesides the user and role t...
2008-06-10 11:50:05 208
Difference between sql.rows().each and sql.eachRow
1、sql.rows returns a List of g.sql.GroovyRowResult which implements Mapdef results = []sql.rows(queryString, args).each {Map row -> println "row.dump():${row.dump()}" ...
2008-06-08 10:20:42 361
The main advantage of using the Spring DSL
The main advantage of using the Spring DSL is that you can now mix logic in within your bean definitions, for example based on the environment:import grails.util.*beans { switch(GrailsUtil.enviro...
2008-05-26 10:56:09 162
Configure a bean with map property
1、Using XML <bean id="sqlService" class="SqlService"> <property name="dataSourceMap"> <map> <entry key="a"> <ref bean="
2008-05-26 10:33:07 101
Configure a bean with factory using Spring DSL
1、How do I configure a bean like this using Spring DSL? <bean id="mailSession" class="javax.mail.Session" factory-method="getInstance"> <constructor-arg> <pro...
2008-05-22 17:38:42 102
Eclipse3.2 (Ubuntu)与Ant出错解决
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/134537 出错原因:Eclipse 3.2 requires ant 1.6. However, gutsy only includes ant 1.7 解决方法如下: cd /tmpmkdir antcd antunzip /usr/share/java/ant-launch...
2008-02-18 23:15:26 153
Ext Community Forums (2.0)有用帖子收集
1、How to get the column width in a renderer function?http://extjs.com/forum/showthread.php?t=241372、 [AutoResize Issue]http://extjs.com/forum/showthread.php?t=242213、Colour Entire Rowsht...
2008-01-26 15:25:17 241
设置正确的Content-Type以解决Ext的中文乱码问题
1、前后台所有文件统一用utf-8编码方式。2、在Request Headers中设置Content-Type:application/x-www-form-urlencoded; charset=utf-8,具体方法:将Ext.lib.Ajax.defaultPostHeader += '; charset=utf-8'加在Ext.onReady块里,此方法可以解决用EXT在POST时的中文乱...
2008-01-24 12:24:38 2431
在Hibernate中使用数据库字段默认值的配置
1、在相关表的映射XML文件的class项增加:dynamic-insert="true"2、同时需在相关字段设置:not-null="false"
2008-01-10 14:47:30 1151
在Hibernate中使用oracle的sequence产生主键
在很多情况下,我们使用Hibernate在已经建立好数据库的基础上。在oracle中,如果已经建立好的数据库中使用了sequence,则可以按照下面的步骤把它引入到Hibernate中: 1、在oracle 首先创建sequence create sequence seq_id minvalue 1 start with ...
2008-01-01 11:49:14 94
Ubuntu下安装PHP GD
sudo apt-get install php5-gdsudo /etc/init.d/apache2 restart
2007-12-07 10:05:09 113
Grails学习笔记-1
1、安装JDK和Grails后,设置JAVA_HOME和GRAILS_HOMEsudo gedit /etc/environment加入以下: 1. JAVA_HOME=/usr/lib/j2sdk15-sun //JDK安装路经 2. GRAILS_HOME=/home/boogie/dev/grails //GRails路径 3. P...
2007-11-22 11:52:00 100
ORACLE中表、索引的表空间的批量更改方法
1、查询当前用户下的所有表select 'alter table '|| table_name ||' move tablespace tablespacename;' from user_all_tables;2、查询当前用户下的所有索引select 'alter index '|| index_name ||' rebuild tablespace tablespacename;...
2007-09-19 14:37:20 1107
TOP 10 Eclipse Shortcuts
Ctrl + Shift + O : Organize imports Ctrl + Shift + T : Open Type Ctrl + Shift + F4 : Close all Opened Editors Ctrl + O : Open declarations Ctrl + E : Open Editor Ctrl + / : Li...
2007-09-18 09:22:19 84
在CAS3.1配置PersonDirectory以获取除UserName外更多的属性
修改deployerConfigContext.xml文件xml 代码 <bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" > ...
2007-08-22 17:45:05 131
unicode学习资料
1、http://www.jorendorff.com/articles/unicode/index.html2、http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF
2007-05-11 15:36:36 115
jQuery知识点滴
4function FunkyStuff() { 5 $("dd label").append(":"); 6} 7 8 9$(document).ready(FunkyStuff);looks for every label within every “dd” in the page and adds a colon inside the label at the end...
2007-05-11 10:39:04 84
设置 WebLogic jDriver for Oracle 的使用环境
要使用 weblogic.jdbc.oci.Driver,请按如下所示设置环境。请注意,需要设置 jDriver 许可证。 将下列更改添加到 startWebLogic.cmd 文件。 指定 Oracle 的 bin 目录的路径和 WebLogic Oracle Oci 驱动程序本地库的 bin 目录的路径。请根据 Oracle 版本使用相应的 Oci 驱动程序。 ...
2007-04-17 23:06:54 149
Ext Community Forums精要贴子收藏
1、Creating Ajax tabs in center region of BorderLayout( 03-29-2007, 04:14 PM)
2007-04-04 16:31:50 142
Eclipse下的JavaScript编辑器中文无法保存问题解决
依次选择 window>>preferences>>general>>content types在右边的窗口中打开列表,选中"JavaScript",在下面的"default encoding"右边的输入框中输入"GBK"或"GB2312",再点"update"按钮,我选的中"GBK",就可以了...
2007-04-04 16:28:21 113
在DWR中实现直接获取一个JAVA类的返回值的两种方法
第一种实现(来源网上转贴):js 代码 function Test() { var _data = ""; this.getString = function() { //设置成同步 DWREngine.setAsync(false)...
2007-03-27 16:13:05 128
Using Connection Pool Support
Re: Using Connection Pool Support Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=131662#c7 for a description of this JNDI feature. It has been tested to work fine with WebLogic 8.1. To...
2007-03-19 12:58:43 239 1
从BIRT报表文件中获取其使用数据源的数据库连接信息
java 代码 design = engine.openReportDesign("test.rptdesign"); ReportDesignHandle report = (ReportDesignHandle) design.getDesignHandle( ); OdaDataSourceHandle dataSource...
2007-03-19 11:02:10 471
用jakarta commons JEXL在JAVA中运算表达式
java 代码 1. import org.apache.commons.jexl.Expression; 2. import org.apache.commons.jexl.ExpressionFactory; 3. import org.apache.commons.jexl.JexlContext; 4. import ...
2007-03-12 13:00:01 946
Setup a Subversion Server in 4 Minutes
You are going to need to type fast but I think you can do it in 4 minutes. These are my notes on what worked for me on my Fedora core 6 with svn lib already installed by the package manager:1. Cre...
2007-03-05 10:33:58 62
[CAS mail]Making CAS authentication parameterizable
You don't have to have the CAS server pass the info back, you could also have the application look up the necessary fields in your directory system (database, LDAP, whatever). I just feel that's a...
2007-02-06 09:32:27 201
Re: eXtremeCompon<ec:exportXls 在weblogic 9i 下,不是提示下载,而是直接打开,
在web.xml加上红色部分即可解决此问题,我也碰到,不过是在weblogic8.14,应该一样。 <filter> <filter-name>eXtremeExport</filter-name> <filter-class>org.extremecomponents.table.filter.ExportFilte...
2007-01-24 12:49:34 166
参照Pentaho资源库结构进行项目资源管理
最近因数据分析需要在研究Pentaho,额外地发现它的资源库结构很合理,于是就将自己的项目资源库进行参照改造。 实际上Pentaho资源库结构跟《版本控制之道——使用CVS》里写的思想是一致的,只不过通过这个实例更直观更易于参考,它在每个项目目录下建立三个子目录:[b]trunk(主干)、branches(分支)、tags(标记)[/b]。在branches里存在两种分支类型...
2007-01-18 10:42:00 170
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人