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

groovy 77

#Groovy
Groovy的times循环方法

for (i = 0; i < 5; ++i) { println i }

2015-12-14 504

#Groovy
Groovy菜鸟来解决"易语言难题”

(123..329).each {if(((it+"${it*2}"+it*3).replaceAll('0','').toCharArray() as Set).size()==…

2015-12-14 405

#Groovy
给标准Java库的Math类的方法穿了件外衣

/** * */ @Typed package org.lucifer.util import static java.lang.Math.* /** * @author Luci…

2015-12-14 792

#Groovy
解决grails导出excel的中文件名乱码问题

class XlsController{ /** * 字符串编码 */ final def encode(String value,String charSet='UTF-8'){…

2015-12-14 899

#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 993

#Groovy
Top n 动态查询

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

2015-12-14 741

#Groovy
在 Gwitter 中添加 File 菜单

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

2015-12-14 165

#Groovy
grails 发送邮件

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

2015-12-14 686