groovy 77

#Groovy
Groovy脚本替换多文件中的文本

def currentDir = new File("d:/bakup"); def backupFile; def fileText; //Replace the content…

2015-12-14 209

#Groovy
对db4o的再包装

/** * */ @Typed package org.lucifer.db4o import org.lucifer.util.MyLogger import com.db4o.…

2015-12-14 480

#Groovy
重命名文件

//---------------------------------------------------------------------------------- names…

2015-12-14 349

#Groovy
groovy对双目运算符语法的改进

//一般的双目运算符是这样 String name=""; String txt = (!name.equals("")) ? name : "123" //groovy小改进了一…

2015-12-14 829

#Groovy
Groovy的times循环方法

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

2015-12-14 502

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

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

2015-12-14 403

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

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

2015-12-14 790

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

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

2015-12-14 897

#Groovy
页面循环分块显示

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

2015-12-14 164

#Groovy
在Groovy中调用Groovy脚本

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

2015-12-14 468

#Groovy
groovy实现的简易tree命令

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

2015-12-14 651

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

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

2015-12-14 217
1 2 3 7