This file contains hidden or 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 StaticClass { | |
| static def hello() { | |
| println "hello" | |
| } | |
| } | |
| StaticClass.hello() // prints "hello" | |
| StaticClass.metaClass.static.hello = { println "bye" } |
This file contains hidden or 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 printAandB() { | |
| print "A" | |
| b() | |
| } | |
| def printB() { | |
| print "B" | |
| } |
This file contains hidden or 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
| grails dev schema-export |
This file contains hidden or 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
| <script type="text/javascript"> | |
| var ios = (/iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase())); | |
| if (ios) { | |
| document.location = "https://itunes.apple.com/us/app/moviz-guess-the-movie/id705337240?l=es&ls=1&mt=8"; | |
| } | |
| var android = (/android/i.test(navigator.userAgent.toLowerCase())); | |
| if(android) { | |
| document.location = "https://play.google.com/store/apps/details?id=com.app.android.moviequiz"; | |
| } |
This file contains hidden or 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 List<A> differenceBetween(List<A> minuend, List<A> subtrahend) { | |
| List<A> difference = Lists.newArrayList(); | |
| Set<A> subtrahendSets = Sets.newHashSet(subtrahend); | |
| for (A m1 : minuend) { | |
| if (!subtrahendSets.contains(m1)) { | |
| difference.add(m1); | |
| } | |
| } | |
| return difference; | |
| } |
This file contains hidden or 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 | |
| .classpath | |
| .project | |
| .settings | |
| /target/* | |
| # Package Files # | |
| *.jar | |
| *.war |
This file contains hidden or 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
| -- you need to have brew installed | |
| brew update | |
| brew install mongodb | |
| -- run mongod which fires the mongo service | |
| mongod | |
| -- open another terminal and run mongo, this opens MongoDB Shell | |
| mongo |
This file contains hidden or 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
| mvn archetype:create -DgroupId=com.test -DartifactId=mytest |