def currentDir = new File("d:/bakup"); def backupFile; def fileText; //Replace the content…
/** * */ @Typed package org.lucifer.db4o import org.lucifer.util.MyLogger import com.db4o.…
//---------------------------------------------------------------------------------- names…
//一般的双目运算符是这样 String name=""; String txt = (!name.equals("")) ? name : "123" //groovy小改进了一…
for (i = 0; i < 5; ++i) { println i }
(123..329).each {if(((it+"${it*2}"+it*3).replaceAll('0','').toCharArray() as Set).size()==…
/** * */ @Typed package org.lucifer.util import static java.lang.Math.* /** * @author Luci…
class XlsController{ /** * 字符串编码 */ final def encode(String value,String charSet='UTF-8'){…
<g:each in="${subjectInstance.articles}" var='article' status="i"> <g:if test="${…
package com.test println a b = a * 2 c = { -> println a * 3 }
path = "." as File if (args) { path = args[0] as File } printDir path,0 def printDir(File …
/* * Copyright 2009-2010 MBTE Sweden AB. * * Licensed under the Apache License, Version 2.…
演示用Groovy开发Android程序,实现一个IOS风格计算器界面(无计算器逻辑)