首页 软件开发 代码片段 groovy ( Page 4 )

groovy 77

#Groovy
页面循环分块显示

<g:each in="${subjectInstance.articles}" var='article' status="i"> <g:if test="${…

2015-12-14 166

#Groovy
在Groovy中调用Groovy脚本

package com.test println a b = a * 2 c = { -> println a * 3 }

2015-12-14 470

#Groovy
groovy实现的简易tree命令

path = "." as File if (args) { path = args[0] as File } printDir path,0 def printDir(File …

2015-12-14 653

#Groovy
用 Gretty 编写一个简单的 HTTP 服务器【Groovy版】

/* * Copyright 2009-2010 MBTE Sweden AB. * * Licensed under the Apache License, Version 2.…

2015-12-14 219

#Groovy
grails导出excel

/** * 构建excel * @param block 闭包,封装构建逻辑 */ def build(dataList,titleList,out,Closure block){…

2015-12-14 992

#Groovy
Top n 动态查询

def bjSectionInstance = BjSection.get(params.id) if (!bjSectionInstance) { flash.message =…

2015-12-14 740

#Groovy
在 Gwitter 中添加 File 菜单

import groovy.swing.SwingBuilder import javax.swing.* import java.awt.* class Gwitter{ sta…

2015-12-14 164

#Groovy
grails 发送邮件

首先在buildConfig中的plugins { compile ":mail:1.0.1" } 然后再config中配置 grails.mail.default.from = …

2015-12-14 685

#Groovy
groovy加水印

// cf. http://kyle-in-jp.blogspot.com/2008/08/java2d.html // cf. http://d.hatena.ne.jp/tos…

2015-12-14 229

#Groovy
Groovy 构建和解析 XML

<langs type="current"> <language>Java</language> <language>Groovy&…

2015-12-14 690

#Groovy
Groovy 监控 HttpClient 上传进度

/** * A utility that contains all of the client functionality needed to perform the upload…

2015-12-14 930

#Groovy
groovy使用SwingBuilder构建swing

import groovy.swing.SwingBuilder import javax.swing.* def swingBuilder = new SwingBuilder(…

2015-12-14 136