int a =-5, b=10;
a=a+b;
b=a-b;
a=a-b;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ant = new AntBuilder() | |
ant.concat(destfile: "myfile", append: true, "hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass { | |
def x | |
MyClass() { | |
println "hello" | |
} | |
} | |
println new MyClass(x:10).x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
void prettyPrint(Person p) { | |
System.out.println("Main Person: " + p); | |
} | |
void prettyPrint(Employee e) { | |
System.out.println("Main Employee: " + e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
def call (){println "hello"} | |
} | |
def a = new A() | |
a() |
This script is created as an example to show how easy it is to use gstorm to crunch and consume data from rest apis.
Either download the script and run:
groovy ghstarred.groovy <your_github_id>
Or hotload it:
checking if a node is pure value of consists of neseted element
scala> (<a x="x">value</a>).child.forall(_.isAtom)
res67: Boolean = true
scala> (<a x="x"><b>value</b></a>).child.forall(_.isAtom)
res68: Boolean = false
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in $(find . -type d -maxdepth 3 -name bin); do; echo $f;done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.metaClass.methods*.name.sort().unique() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L http://git.io/nixstall | bash -s get http://download.jboss.org/wildfly/8.0.0.Final/wildfly-8.0.0.Final.zip |
OlderNewer