自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

boogie's blog

JAVA开发

  • 博客(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 131

原创 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 108

原创 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 138

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 92

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 70

List of all domain classes in BootStrap

import org.codehaus.groovy.grails.commons.ApplicationHolderclass BootStrap {    def init = {servletContext -&gt;        ApplicationHolder.application.domainClasses.each() {            println it...

2008-06-14 22:02:46 93

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 101

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 84

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 4167

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 189

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 -&gt; println "row.dump():${row.dump()}" ...

2008-06-08 10:20:42 343

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 142

Configure a bean with map property

1、Using XML &lt;bean id="sqlService" class="SqlService"&gt; &lt;property name="dataSourceMap"&gt; &lt;map&gt; &lt;entry key="a"&gt; &lt;ref bean=&quot

2008-05-26 10:33:07 86

Configure a bean with factory using Spring DSL

1、How do I configure a bean like this using Spring DSL? &lt;bean id="mailSession" class="javax.mail.Session" factory-method="getInstance"&gt; &lt;constructor-arg&gt; &lt;pro...

2008-05-22 17:38:42 83

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 140

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 224

设置正确的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 2401

在Hibernate中使用数据库字段默认值的配置

1、在相关表的映射XML文件的class项增加:dynamic-insert="true"2、同时需在相关字段设置:not-null="false"

2008-01-10 14:47:30 1131

在Hibernate中使用oracle的sequence产生主键

在很多情况下,我们使用Hibernate在已经建立好数据库的基础上。在oracle中,如果已经建立好的数据库中使用了sequence,则可以按照下面的步骤把它引入到Hibernate中: 1、在oracle 首先创建sequence create sequence seq_id minvalue 1 start with ...

2008-01-01 11:49:14 80

Ubuntu下安装PHP GD

sudo apt-get install php5-gdsudo /etc/init.d/apache2 restart

2007-12-07 10:05:09 100

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 83

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 1088

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 63

在CAS3.1配置PersonDirectory以获取除UserName外更多的属性

修改deployerConfigContext.xml文件xml 代码  &lt;bean                       class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" &gt;                 ...

2007-08-22 17:45:05 115

Spring基础教程.pdf

http://www.51leifeng.net/index.php

2007-05-21 16:43:54 252

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 102

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 65

CSS精彩实例教学资料收集

1、How to make sexy buttons with CSS

2007-05-10 09:48:27 109

设置 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 132

Ext Community Forums精要贴子收藏

1、Creating Ajax tabs in center region of BorderLayout( 03-29-2007, 04:14 PM)

2007-04-04 16:31:50 124

Eclipse下的JavaScript编辑器中文无法保存问题解决

依次选择 window&gt;&gt;preferences&gt;&gt;general&gt;&gt;content types在右边的窗口中打开列表,选中"JavaScript",在下面的"default encoding"右边的输入框中输入"GBK"或"GB2312",再点"update"按钮,我选的中"GBK",就可以了...

2007-04-04 16:28:21 93

在DWR中实现直接获取一个JAVA类的返回值的两种方法

第一种实现(来源网上转贴):js 代码  function Test()   {       var _data = "";             this.getString = function()       {           //设置成同步           DWREngine.setAsync(false)...

2007-03-27 16:13:05 109

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 215 1

从BIRT报表文件中获取其使用数据源的数据库连接信息

java 代码  design = engine.openReportDesign("test.rptdesign");      ReportDesignHandle report = (ReportDesignHandle) design.getDesignHandle( );      OdaDataSourceHandle dataSource...

2007-03-19 11:02:10 452

用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 934

删除最后一个字符“,”

str.deleteCharAt(str.lastIndexOf(","));

2007-03-08 10:58:23 127

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 48

[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 171

Re: eXtremeCompon<ec:exportXls 在weblogic 9i 下,不是提示下载,而是直接打开,

在web.xml加上红色部分即可解决此问题,我也碰到,不过是在weblogic8.14,应该一样。 &lt;filter&gt; &lt;filter-name&gt;eXtremeExport&lt;/filter-name&gt; &lt;filter-class&gt;org.extremecomponents.table.filter.ExportFilte...

2007-01-24 12:49:34 147

参照Pentaho资源库结构进行项目资源管理

最近因数据分析需要在研究Pentaho,额外地发现它的资源库结构很合理,于是就将自己的项目资源库进行参照改造。 实际上Pentaho资源库结构跟《版本控制之道——使用CVS》里写的思想是一致的,只不过通过这个实例更直观更易于参考,它在每个项目目录下建立三个子目录:[b]trunk(主干)、branches(分支)、tags(标记)[/b]。在branches里存在两种分支类型...

2007-01-18 10:42:00 156

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除