groovy 77

#Groovy
groovy实现的简易tree命令

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

2015-12-14 665

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

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

2015-12-14 233

#Groovy
grails导出excel

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

2015-12-14 1,014

#Groovy
Top n 动态查询

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

2015-12-14 763

#Groovy
在 Gwitter 中添加 File 菜单

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

2015-12-14 180

#Groovy
grails 发送邮件

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

2015-12-14 700

#Groovy
groovy加水印

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

2015-12-14 244

#Groovy
Groovy 构建和解析 XML

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

2015-12-14 705

#Groovy
Groovy 监控 HttpClient 上传进度

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

2015-12-14 942

#Groovy
groovy使用SwingBuilder构建swing

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

2015-12-14 153

#Groovy
xfire服务器的注解开发及客户端的调用

服务器端: @WebService(name="Test",serviceName="Test", targetNamespace="http://www.oksonic.cn/x…

2015-12-14 778

#Groovy
身份证校验算法

def id = params.id+"" if(id){ def v = [7 ,9 ,10 ,5 ,8 ,4 ,2 ,1 ,6 ,3 ,7 ,9 ,10 ,5 ,8,4,2] …

2015-12-14 624
1 2 3 7